06.03.2011, 15:13
This is a nice and neat way:
pawn Код:
new bool:bPaused[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("pauseCheck", 1000, true);
return 1;
}
public pauseCheck()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(bPaused[i]) SetPlayerChatBubble(playerid, "Paused", 0xFF0000FF, 100.0, 1000);
//do your stuff hear
bPaused[i] = true;
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
bPaused[playerid] = false;
return 1;
}