20.01.2011, 11:30
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;
}