15.12.2012, 15:50
Hello. I have created a speed-o-meter textdraw but it doesn't seem to want to show when I enter a vehicle.
This is up top with my other working textdraws
Then this is with my other working textdraws
And this..
Is under
There are no errors on compile and can't see how this can't work, looked through it loads of times.
If someone could help me I will +rep, been at it for hours! Thanks.
This is up top with my other working textdraws
pawn Код:
new Text:SpeedTD; // Speed TextDraw
pawn Код:
// Speed TextDraw
SpeedTD = TextDrawCreate(487.000000, 425.000000, "Speed");
TextDrawBackgroundColor(SpeedTD, 255);
TextDrawFont(SpeedTD, 1);
TextDrawLetterSize(SpeedTD, 0.500000, 1.300000);
TextDrawColor(SpeedTD, -1);
TextDrawSetOutline(SpeedTD, 1);
TextDrawSetProportional(SpeedTD, 1);
pawn Код:
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // Speed TextDraw
{
new string[64], speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
format(string, sizeof(string), "Speed: %d MPH", speed);
TextDrawSetString(SpeedTD, string);
}
pawn Код:
public OnPlayerUpdate(playerid)
{
If someone could help me I will +rep, been at it for hours! Thanks.