SA-MP Forums Archive
Displaying TextDraw problem - 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: Displaying TextDraw problem (/showthread.php?tid=636333)



Displaying TextDraw problem - MrCesar - 25.06.2017

Hey guys, I've got this textdraws created
Код:
new PlayerText:TDEditor_PTD[MAX_PLAYERS][3];


	TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 304.166625, 143.851806, "Objects_Streaming~n~~n~~n~please_wait_5_seconds");
	PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.287500, 1.226665);
	PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][0], 0.000000, 225.000000);
	PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 2);
	PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -16776961);
	PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][0], 1);
	PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][0], 1344078079);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][0], 0);
	PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], -1743453953);
	PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 2);
	PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);

    
	TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 204.583267, 157.333328, "New_Zone_Gaming_T-DM");
	PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.412083, 1.828148);
	PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
	PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -40449);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 2);
	PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][1], 0);
	PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255);
	PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 2);
	PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 2);

    
	TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 196.666549, 121.037010, "Anti-Spawn_kill_enabled");
	PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][2], 0.400000, 1.600000);
	PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][2], 1);
	PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][2], -16514817);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], -1);
	PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][2], 0);
	PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][2], 255);
	PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][2], 2);
	PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][2], 1);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], -1);
and onplayerspawn i add this:

Код:
TextDrawShowForPlayer(playerid, PlayerText:TDEditor_PTD);
and i get this error:

Код:
C:\Users\socky\Desktop\NZGaming\gamemodes\NZG.pwn(642) : error 017: undefined symbol "TDEditor_PTD"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
can anyone please explain this to me?


Re: Displaying TextDraw problem - OneDay - 25.06.2017

It is probably local not global. And that is not an array anyway.


Re: Displaying TextDraw problem - MrCesar - 25.06.2017

Quote:
Originally Posted by OneDay
Посмотреть сообщение
It is probably local not global. And that is not an array anyway.
i've made it global and now getting tag mismatch
i've used tdeditor to generate the code and that's how i got it..


Re: Displaying TextDraw problem - jlalt - 25.06.2017

Quote:
Originally Posted by MrCesar
Посмотреть сообщение
i've made it global and now getting tag mismatch
i've used tdeditor to generate the code and that's how i got it..
use PlayerTextDrawShow(playerid, PlayerText:textdrawID);
PHP код:
PlayerTextDrawShow(playeridTDEditor_PTD[playerid]); 



Re: Displaying TextDraw problem - MrCesar - 25.06.2017

Quote:
Originally Posted by jlalt
Посмотреть сообщение
use PlayerTextDrawShow(playerid, PlayerText:textdrawID);
PHP код:
PlayerTextDrawShow(playeridTDEditor_PTD[playerid]); 
thank you so much!