MasterTobi Posted November 21, 2008 Share Posted November 21, 2008 Hey @ all i´m so stupid ^^. i need a code for respawn after dead. how can i help me Link to comment
robhol Posted November 21, 2008 Share Posted November 21, 2008 Read the scripting intro first, it will surely come in handy. Then, check out addEventHandler (and some basic info about the event system will also be useful) and the onPlayerWasted event. Then, the spawnPlayer function. Link to comment
MasterTobi Posted November 21, 2008 Author Share Posted November 21, 2008 thx now i can respawn the code for another people : function respawn() setTimer( spawnPlayer,--Time, 1, source, --x, --y, --z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) Link to comment
=FAS=Shigawire Posted November 21, 2008 Share Posted November 21, 2008 thxnow i can respawn the code for another people : function respawn() setTimer( spawnPlayer,--Time, 1, source, --x, --y, --z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) code should be function respawn(player, Time) local x,y,z = getElementPosition (player) setTimer( spawnPlayer,Time, 1, player, x, y, z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) -- will ignore the whole line, not just one word Link to comment
darkdreamingdan Posted November 21, 2008 Share Posted November 21, 2008 thxnow i can respawn the code for another people : function respawn() setTimer( spawnPlayer,--Time, 1, source, --x, --y, --z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) code should be function respawn(player, Time) local x,y,z = getElementPosition (player) setTimer( spawnPlayer,Time, 1, player, x, y, z ) end addEventHandler ( "onPlayerWasted", getRootElement(), respawn ) -- will ignore the whole line, not just one word I believe he was aware of that, just using them as placemarkers rather than actual code 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