Help with Player Textdraws
#1

Hi guys. I'm trying to make a speedometer with a picture of a vehicle model the player is in on top of that vehicle with id of 400. It works fine but it shows vehicle with id of 400 and id of the vehicle the player is in. Can someone help me?

Here is the code:

Код:
new PlayerText:TDEditor_PTD[MAX_PLAYERS][4]; //playertext

// under onplayerconnect

	TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 503.333068, 339.177825, "");
	PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.000000, 0.000000);
	PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][3], 75.000000, 79.000000);
	PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][3], 1);
	PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][3], 0);
	PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][3], 0);
	PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][3], TEXT_DRAW_FONT_MODEL_PREVIEW);
	PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][3], 0);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0);
	PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.000000, 0.000000);

// under onplayerstatechange

	new color1, color2;
	GetVehicleColor(GetPlayerVehicleI   D(playerid), color1, color2);
	PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][3],  GetVehicleModel(GetPlayerVehicleID(playerid)));
    	PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][3], -10.000000, 0.000000, 30.000000, 0.699999);
	PlayerTextDrawSetPreviewVehCol(playerid, TDEditor_PTD[playerid][3], color1, color2);
        PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][3]);
Thx in advanced.
Reply
#2

CreatePlayerTextDraw(playerid, 503.333068, 339.177825, " ");
Reply
#3

Nah it's still the same.

EDIT:Nvm fixed it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)