How to make when car hp is lower than 20% to dont explode ?
#4

pawn Код:
for(new i, vehicleid; i < MAX_PLAYERS; i++)
{
    if((vehicleid = GetPlayerVehicleID(i))) // Note: we want this assignment, so one '=' only.
    {
        new Float:vhp;
        GetVehicleHealth(vehicleid, vhp);

        if(vhp < 250.0)
        {
            SetVehicleHealth(vehicleid, 250.0);
        }
    }
}
Put that in a repeating global timer.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)