Vehicle health state
#1

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.

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);
Can someone help me?
Reply


Messages In This Thread
Vehicle health state - by iOxide - 14.01.2014, 09:33
Re: Vehicle health state - by SilentSoul - 14.01.2014, 09:41
Re: Vehicle health state - by Face9000 - 14.01.2014, 09:46
Re: Vehicle health state - by SilentSoul - 14.01.2014, 09:48
Re: Vehicle health state - by iOxide - 14.01.2014, 09:50
Re: Vehicle health state - by SilentSoul - 14.01.2014, 09:56
Re: Vehicle health state - by Vince - 14.01.2014, 10:02
Re: Vehicle health state - by iOxide - 14.01.2014, 10:39

Forum Jump:


Users browsing this thread: 2 Guest(s)