28.12.2014, 20:39
Does the player get freezed?
Try to set a variable after death and on the spawn freeze and set the player pos
Try to set a variable after death and on the spawn freeze and set the player pos
Код:
new PlayerDied[MAX_PLAYERS]; public OnPlayerConnect(playerid) { PlayerDied[playerid] = false; return 1; } public OnPlayerDeath(playerid, killerid, reason) { PlayerDied[playerid] = true; return 1; } public OnPlayerSpawn(playerid) { if(PlayerDied[playerid] == true) { SetPlayerPos(playerid, 2563.9680,-1821.03295,1223.7919); SetPlayerInterior(playerid, 2); TogglePlayerControllable(playerid,0); SetTimerEx("UnfreezePlayer", 10000, false, "i", playerid); //SetPlayerVirtualWorld(playerid, 0); PlayerDied[playerid] = false; } else { // Spawn the player on the spawn pos } return 1; }