recover between all the players which has the highest health
#4

pawn Код:
stock GETHHPPlayerID()
{
     new Float:phealth, Float:chealth, pid = INVALID_PLAYER_ID;
     for(new i=0; i<GetMaxPlayers(); i++)
     {
          if(!IsPlayerConnected(i)) continue;
          GetPlayerHealth(playerid, chealth);
          if(chealth > phealth) phealth = chealth, pid = i;
     }
     return pid;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)