05.10.2009, 14:36
i havent looked at your code properly but the answer is quite simple
hope this helps
Код:
new Death[MAX_PLAYERS]; // Top of the script public OnPlayerConnect(playerid) { Death[playerid] = 0; // make sure the death id is 0 on connect } public OnPlayerDeath(playerid) { Death[playerid] = 1; // set the player's id to dead } public OnPlayerSpawn(playerid) { if (Death[playerid] == 1) { // spawn them at the hospital Death[playerid] = 0; // reset the value for the next death } }