SA-MP Forums Archive
Help with Player Textdraws - 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)
+--- Thread: Help with Player Textdraws (/showthread.php?tid=629960)



Help with Player Textdraws - andrejc999 - 06.03.2017

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.


Re: Help with Player Textdraws - AlexPalermitano97 - 06.03.2017

CreatePlayerTextDraw(playerid, 503.333068, 339.177825, " ");


Re: Help with Player Textdraws - andrejc999 - 06.03.2017

Nah it's still the same.

EDIT:Nvm fixed it