04.02.2013, 08:23
Quote:
I said this to someone else just yesterday: vehicle health goes up to 1000. The vehicle catches fire at 250 health.
|
pawn Код:
forward Damage(playerid);
public Damage(playerid)
{
new Float:health;
new veh;
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, health);
if(IsPlayerInAnyVehicle(playerid))
{
if(health > 800)
{
TextDrawColor(Textdraw13[playerid], 0xFFFFFFFF);
}
else if(health <= 800 && health > 500)
{
TextDrawColor(Textdraw13[playerid], 0xFFFF00FF);
}
else if(health <= 400)
{
TextDrawColor(Textdraw13[playerid], 0xFF0000FF);
}
}
else {
TextDrawColor(Textdraw13[playerid], 0xD3D3D3FF);
}
return 1;
}