01.07.2012, 13:45
Quote:
If it's related with gametext then it will be much easy.
Show us the code |
For speed you can use the following function:-
pawn Код:
stock GetVehicleSpeed(vehicleid)
{
new Float:V[3];
GetVehicleVelocity(vehicleid, V[0], V[1], V[2]);
return floatround(floatsqroot(V[0] * V[0] + V[1] * V[1] + V[2] * V[2]) * 180.00);
}
For fuel you can just checkout the following tutorial made by gamer:-
https://sampforum.blast.hk/showthread.php?tid=169284
EDIT: I just realized you want to change the color and you have already made this code. Anyway to change the colors check in the timer if you are using something like GetVehicleSpeed you could use it something like:
pawn Код:
if( GetVehicleSpeed( vehicleid ) < 100 ) // if speed is less then 100
{
TextDrawSetString( YOURTD, "~r~%d" ); // I am sorry but I am on my internet tablet you have to format it before setting string into the textdraw and you should know that ~r~ is red colour ~b~ blue, ~g~ green, ~w~ white and etc..
}
FalconX