How to detect when all players are death
#1

I need to detect when all players are death for my gamemode

i will use that to make all players spectate alive players when only a player are alive i make a textdraw announcing the winner
in my gm http://forum.sa-mp.com/index.php?topic=129532.0
Reply
#2

I made a script like this but idk if I want to give it out. Crap I don't even know if it works or not xD
But here is detect if all players are dead.
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
   new dead,alive;
   for(new i=0; i<MAX_PLAYERS; i++){
     if(spectating[i] == 0) alive++;
   }
   else dead++
}
if(alive == 0)
{
//blah
}
idk something like that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)