04.04.2013, 17:46
Код:
public OnPlayerUpdate(playerid) { new Float:hp; GetPlayerHealth(playerid,hp); if(hp <= 1.0) return SetPlayerHealth(playerid,-1.0); if(Map[AllowWater] == 0) { if(IsPlayerInWater(playerid)) { SetPlayerHealth(playerid,0.0); } } PauseTime[playerid] = gettime(); return 1; }
Код:
forward pausecheck(); public pausecheck() { for(new i=0; i<MAX_PLAYERS; i++) { new PausedSeconds = gettime()-PauseTime[i]; if(PausedSeconds > 5) SetPlayerChatBubble(i, "Paused", COLOR_YELLOW, 100.0, 5000); } return 1; }