20.01.2011, 11:29
I guess you wanna get the player id which has the most health .. I guess something like this should work;
pawn Код:
stock returnHighestHealthID()
{
new Float:_health[2], pMost = INVALID_PLAYER_ID;
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
GetPlayerHealth(i, _health[0]);
if(_health[0] > _health[1]) pMost = i, _health[1] = _health[0];
}
return pMost;
}