20.06.2013, 15:58
try this:
pawn Код:
SetTimerEx("OnServerUpdate", 1, true);
public OnServerUpdate()
{
new count=0;
for(new i; i < MAX_PLAYERS; i++)
{
new Float:hp;
GetPlayerHealth(i, hp);
if(hp > 1.0)
{ count++; }
}
if(count > 1)
{
// DO your coding here
}
//if you need this code i mentioned above, so for your info. this will detect if there is only one player alive
if(count == 1)
{
// DO your coding here
}
return 1;
}

