Benevolence Posted September 22, 2011 Posted September 22, 2011 So for learning purposes, I'm trying to make this code which will respawn you in the xyz cords given after 2 seconds then when you respawn it gives you a little message. The thing is, after I commit suicide it spawns me instantly. I want it to make me wait 2 seconds. It's not working, what am I doing wrong? function onPlayerWasted() local x = 1742.47546 local y = -1861.00513 local z = 13.57804 spawnPlayer(source, x, y, z) setTimer(spawnPlayer, 5000, 1) --setTimer(spawnPlayer, x, y, z, source, 0, 0, 3 ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("You've been respawned as a result of your death.", source) end addEventHandler("onPlayerWasted", getRootElement(), onPlayerWasted) Can other people connect to your server? Use this tool to check: http://nightly.mtasa.com/ports/ Formerly known as Tank07.
Castillo Posted September 22, 2011 Posted September 22, 2011 function onPlayerWasted() local x = 1742.47546 local y = -1861.00513 local z = 13.57804 setTimer(spawnPlayer, 5000, 1, source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("You've been respawned as a result of your death.", source) end addEventHandler("onPlayerWasted", getRootElement(), onPlayerWasted) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Benevolence Posted September 22, 2011 Author Posted September 22, 2011 Thanks. Can other people connect to your server? Use this tool to check: http://nightly.mtasa.com/ports/ Formerly known as Tank07.
Castillo Posted September 22, 2011 Posted September 22, 2011 You are welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now