Jump to content

Problem with script


UserToDelete

Recommended Posts

i created a script and i run in server 1.3.4. in the console output this.

[vD]/loginspawn/spawn.lua:14: Bad argument @ 'addEventHandle

r' [Expected element at argument 2, got nil]

puto = source 
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 (source, source) 
        outputChatBox("#00ffff[ATTENTION]#ff0000Use parachute for survive!",source,255,255,255,true) 
    end 
addEventHandler("onPlayerLogin",rootElement,fnt) 

Pls help me.

Link to comment
Hidden
function fnt() 
    spawnPlayer(source, math.random(0,200), math.random(0,200), 2000, math.random(0,179)) 
    giveWeapon(source, 46, 1, true) 
    setCameraTarget(source) 
    outputChatBox("#00ffff[ATTENTION]#ff0000Use parachute for survive!", source, 255, 255, 255, true) 
end 
addEventHandler("onPlayerLogin", root, fnt) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...