biggest health amount
#1

hi,

how to detect the name of the player that is driving the vehicle with the most health?
This code does not work...

pawn Код:
forward Detector(playerid);
public Detector(playerid)
{
    foreach(Player,i)
    {
            new Float:MostHealth, Float:vHealth, vDriver, veh;
            for(new c = 0; c < MAX_VEHICLES; c++)
            {
                 GetVehicleHealth(c, vHealth);
                 if(vHealth > MostHealth)
                 {
                      MostHealth = vHealth;
                      veh = c;
                 }
            }
            vDriver = GetVehicleDriver(veh);
            new name[24];
            GetPlayerName(vDriver,name,24);
       }
return 1;
}
Reply


Messages In This Thread
biggest health amount - by PawnoQ - 02.12.2011, 23:22
Respuesta: biggest health amount - by OPremium - 02.12.2011, 23:41
Re: biggest health amount - by PawnoQ - 03.12.2011, 02:05
Re: biggest health amount - by PawnoQ - 03.12.2011, 13:43
Re: biggest health amount - by PawnoQ - 04.12.2011, 12:02

Forum Jump:


Users browsing this thread: 3 Guest(s)