Speedometer... Help plx
#1

pawn Код:
{
    new vehicle = GetPlayerVehicleID(playerid);
    new status[256];
    new fuel[256];
    new Fuel = VehicleInfo[vehicle][vFuel];
    new Float:health;
    GetVehicleHealth(vehicle,health);
    format(status,256,"Status: ~p~%f",health);
    format(fuel,256,"Fuel: ~b~%d~w~\\l",Fuel);
    TextDrawSetString(Textdraw0,"km/h:");
    TextDrawSetString(Textdraw1,fuel);
    TextDrawSetString(Textdraw2,status);
    TextDrawHideForPlayer(playerid,Textdraw0);
    TextDrawHideForPlayer(playerid,Textdraw1);
    TextDrawHideForPlayer(playerid,Textdraw2);
    TextDrawShowForPlayer(playerid,Textdraw0);
    TextDrawShowForPlayer(playerid,Textdraw1);
    TextDrawShowForPlayer(playerid,Textdraw2);
}
That's my speedometer, it bugs... the Status shows like 1000.00000000
and the Fuel shows 0 whatever the VehicleInfo[vehicle][vFuel] is set to...
Reply
#2

Код:
format(status, sizeof(status),"Status: ~p~%f",health);
TextDrawSetString(TextDrawName,status);
Reply
#3

Quote:
Originally Posted by ► © The LuxurioN™
Код:
format(status, sizeof(status),"Status: ~p~%f",health);
TextDrawSetString(TextDrawName,status);
nothing changed...
Reply


Forum Jump:


Users browsing this thread: