14.01.2014, 09:33
Hey guys, this is my current vehicle health system. The health is showing like 1000.00, i want to make it either showing as a percentage Eg: 100%, or with state name Eg: Perfect, Good, Bad etc.
Can someone help me?
pawn Код:
GetVehicleHealth(vehicleid, vehiclehealth);
format(HPString, sizeof(HPString), "~w~Damage: %.2f", vehiclehealth);
if(vehiclehealth < 300)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective);
TextDrawSetString(APlayerData[playerid][VHealth], "~r~Engine broken");
}
else TextDrawSetString(APlayerData[playerid][VHealth], HPString);