Jump to content

Spawn command script help.


Recommended Posts

Hello, i know i am very stupid and new at scripting, but i have a problem. I have a script, when player types /spawn command he will spawn at specifed co-ordinates, for some reason when i type the command, nothing happens.I am very new in LUA scripting and my scripts are probbably a mess, so please dont flame on me.

Here is my script: (i know i completely messed up), i hope to get friendly support from people, just as i got on my first thread.

    function spawn(cmd) 
        if cmd == "spawn" then 
        spawnplayer(source, 1959.55, -1714.46, 10) 
addEventHandler(getRootElement ( )) 
    end 
end 
  

Link to post
Thank you, i have another question, i have a script and when i type in /anim into chat the animation plays, how do i make the animation stop?
addEventHandler("onPlayerChat",root, 
function (msg,ped) 
if ( msg == "anim" ) then 
    setPedAnimation(ped,nil,nil,nil) 
          end 
      end 
) 

Edited by Guest
Link to post

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...