20.08.2009, 23:54
Hello again =)
I've tried to make a speedo, but it bugs a bit...
That's the speedo update. it updates the fuel and status...
The fuel shows 0 even if I set VehicleInfo[vehicleid][vInfo] to 100...
The status shows like 1000.0000000, I just want it to show 1000.0...
And also, how do I get a players speed?
Thank you
I've tried to make a speedo, but it bugs a bit...
pawn Код:
public Speedo(playerid)
{
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);
Textdraw0 = TextDrawCreate(568.000000,402.000000,"km/h:");
Textdraw1 = TextDrawCreate(568.000000,408.000000,fuel);
Textdraw2 = TextDrawCreate(568.000000,414.000000,status);
}
The fuel shows 0 even if I set VehicleInfo[vehicleid][vInfo] to 100...
The status shows like 1000.0000000, I just want it to show 1000.0...
And also, how do I get a players speed?
Thank you
![Smiley](images/smilies/smile.png)