SA-MP Forums Archive
Speedometer... Help plx - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Speedometer... Help plx (/showthread.php?tid=93343)



Speedometer... Help plx - introzen - 24.08.2009

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...


Re: Speedometer... Help plx - LuxurioN™ - 24.08.2009

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



Re: Speedometer... Help plx - introzen - 24.08.2009

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