Detect Vehicle HP
#1

I have:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new Float:health;
        new vehid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vehid, health);
        if(health <= 500)
        {
            SendClientMessage(playerid, -1, "BROKEN");
        }
    }
    return 1;
}
I think it's under the wrong callback put the point is it keeps spamming "BROKEN". I understand why I does spamm but I don't know where I need to put it so its working fine.
It should say "BROKEN" when the vehicle health is 500 or lower.
Reply


Messages In This Thread
Detect Vehicle HP - by arjanforgames - 21.07.2013, 19:31
Re: Detect Vehicle HP - by Boolean - 21.07.2013, 19:39
Re: Detect Vehicle HP - by Pottus - 21.07.2013, 19:59

Forum Jump:


Users browsing this thread: 1 Guest(s)