19.03.2017, 22:02
PHP код:
public OnPlayerUpdate(playerid)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
if(hp <= 1.0) return SetPlayerHealth(playerid,-1.0); // you check if the player has less than 1 hp, you set it to -1, then in the next OnPlayerUpdate(in about 33 milliseconds) it'll check for the same and do the same, it'll repeat until the player respawns
if(Map[AllowWater] == 0)
{
if(IsPlayerInWater(playerid))
{
UpdateKST();
pInfo[playerid][mostkills] = 0;
pInfo[playerid][Killstreak] = 0;
EnemyTeamSetup(playerid);
SpawnPlayer(playerid);
CurePlayer(playerid);
}
}
return 1;
}