Hazard| Posted June 27, 2014 Share Posted June 27, 2014 Hello, I need some help with a respawn thingy, it doesn't work. Everytime a player dies, he should respawn in 2 seconds, but he doesn't. (why?) function respawnMode (player) if ( getElementData ( getRootElement ( ), "cwRespawn" ) ) and not RaceMode.isPlayerFinished(source) then Countdown.create(2, restorePlayer, 'You will respawn in:', 255, 255, 255, 0.25, 2.5, true, self.id, player):start(player) else TimerManager.createTimerFor("map",player):setTimer(clientCall, 2000, 1, player, 'Spectate.start', 'auto') end RaceMode.setPlayerIsFinished(player) showBlipsAttachedTo(player, false) end addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ), function ( ) setElementData ( getRootElement ( ), "cwRespawn", true ) end) addEventHandler ( "onClientResourceStop", getResourceRootElement ( getThisResource ( ) ), function ( ) setElementData ( getRootElement ( ), "cwRespawn", nil ) end) a little bit of everything code. thx. Link to comment
Hazard| Posted June 27, 2014 Author Share Posted June 27, 2014 There is no errors/warnings in the debug Link to comment
Et-win Posted June 27, 2014 Share Posted June 27, 2014 Did you test it with more than 1 player? 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