Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by SilentSoul
That should work.
pawn Код:
GetVehicleHealth(vehicleid, vehiclehealth); format(HPString, sizeof(HPString), "~w~Damage: %.0f", vehiclehealth);//You should use .0f to get the correct percentage. 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"); }
|
Why are you using TextDrawSetString if you aren't passing any string after [VHealth]?