micheal1230 Posted June 28, 2012 Share Posted June 28, 2012 (edited) i want to know what element to put when your using functions and how to find out what one also how can you set timers to lines of code for example -- THiS IS A EXAMPLE OF THE TIMER THING! -- Ignore the random stuff like hasHeDied. This is just trying to help you understand me function test() local test = hasHeDied if ( test == true ) then setTimer(spawnPlayer,0,0,0), 5000, 0) end end Edited June 28, 2012 by Guest Link to comment
micheal1230 Posted June 28, 2012 Author Share Posted June 28, 2012 What do you mean? I want to know how you know what element to put cuz sometimes i put player then people tell me its source im like how do you know that? Also how can i set a timer to a line of code like in the example Link to comment
TAPL Posted June 28, 2012 Share Posted June 28, 2012 function test() setTimer(spawnPlayer,5000,1,source,x,y,z) -- change x,y,z to the pos end addEventHandler ("onPlayerWasted",root,test) The source of this event is the player that died or got killed. https://wiki.multitheftauto.com/wiki/OnPlayerWasted remember that when you use spawnPlayer you will need to use setCameraTarget too. Note: setCameraTarget must be used to focus on the player. Also, all players have their camera initially faded out after connect. To ensure that the camera is faded in, please do a fadeCamera after https://wiki.multitheftauto.com/wiki/SpawnPlayer Link to comment
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