21.07.2013, 19:31
I have:
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.
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;
}
It should say "BROKEN" when the vehicle health is 500 or lower.