i created a script and get errors, What function is neccesary? sorry im noob
The error
WARNING: [vD]/loginspawn/spawn.lua:9: Bad argument @ 'spawnPlayer'
WARNING: [vD]/loginspawn/spawn.lua:10: Bad argument @ 'giveWeapon' [Expected element at argument 1, got nil]
WARNING: [vD]/loginspawn/spawn.lua:11: Bad argument @ 'setCameraTarget'
The script
--server
puto = thePlayer
x = math.random(0,200)
y = math.random(0,200)
z = 2000
rot = math.random(0,179)
int = 0
function fnt ()
spawnPlayer (puto, x, y, z, rot, int)
giveWeapon (puto, 46, 1, true)
setCameraTarget (puto, puto)
outputChatBox("#00ffff[ATTENTION]#ff0000Use parachute for survive!",puto,255,255,255,true)
end
addEventHandler("onPlayerLogin",root,fnt)
outputChatBox work, but giveWeapon and spawnPlayer and setCameraTarget no