30.04.2010, 08:37
Quote:
Originally Posted by Rac3r
Suppose the best way to do it would be to add a var when they die, check that when they spawn.
Code:
public OnPlayerDeath(playerid, killerid) { SetPlayerPos(playerid, 0.0, 0.0, 0.0); TogglePlayerControllable(playerid, 0); SetPlayerCameraPos(playerid, -2493.41, 645.15, 78.87); SetPlayerCameraLookAt(playerid, -2498.31, 644.39, 78.19); TextDrawShowForPlayer(playerid, Text:RecoveryText); Recovering[playerid]=1; SetTimerEx("DeathRecovery", 25000, 0, "i", playerid); return 1; } public DeathRecovery(playerid) { Recovering[playerid]=0; TogglePlayerControllable(playerid, 1); SetCameraBehindPlayer(playerid); TextDrawHideForPlayer(playerid, Text:RecoveryText); SpawnPlayer(playerid); SetCameraBehindPlayer(playerid); return 1; } public OnPlayerSpawn(playerid) { if( Recovering[playerid] ) { //SetPlayerCameraPos(playerid, -2493.41, 645.15, 78.87); //SetPlayerCameraLookAt(playerid, -2498.31, 644.39, 78.19); return 1; } //normal spawn code return 1; } |