Author Topic: My first lua script is wrong  (Read 1586 times)

0 Members and 1 Guest are viewing this topic.

Offline Professor_Smiley

  • Newbie
  • *
  • Posts: 45
  • Karma: -24
My first lua script is wrong
« on: November 22, 2016, 11:46:26 AM »
function Weaponz()
   if Player:IsAdmin() then
      Player:Give("weapon_mu_magnum")
      Player:Give("weapon_mu_knife")
      Player:Give("weapon_smg1")
   end
end

concommand.Add ( "weps", Weaponz )

[ERROR] lua/autorun/weaponz.lua:2: attempt to index global 'Player' (a function value)
  1. unknown - lua/autorun/weaponz.lua:2
   2. unknown - lua/includes/modules/concommand.lua:54

Help?

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given