clickable textdraw
#1

hey guys i've this td created:
Код:
TDEditor_PTD[playerid][20] = CreatePlayerTextDraw(playerid, 210.833267, 233.555587, "help");
	PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][20], 0.413333, 1.081481);
	PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][20], 1);
	PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][20], -1);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][20], 0);
	PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][20], 0);
	PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][20], 255);
	PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][20], 3);
	PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][20], 1);
	PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][20], 0);
	PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][20], true);
and I got this callback
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
	if(clickedid == TDEditor_PTD[playerid][20]) 
	{
		SendClientMessage(playerid, -1, "test");
	}

                     
	PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][7]);
	PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][8]);
 	PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][9]);
  	PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][10]);
   	PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][11]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][12]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][13]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][14]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][15]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][16]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][17]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][18]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][19]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][20]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][21]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][22]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][23]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][24]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][25]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][26]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][27]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][28]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][29]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][30]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][31]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][32]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][33]);
    PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][34]);
    TogglePlayerControllable(playerid, 1);
	CancelSelectTextDraw(playerid);
	return 1;
}
and once i try to compile i get this warning:
Код:
C:\Users\socky\Desktop\NZGaming\gamemodes\NZG.pwn(1625) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
needless to say it doesn't work ig either..can anyone sort this out to me please?

thanks in advance!
Reply
#2

Show line 1625
Reply
#3

Код:
if(clickedid == TDEditor_PTD[playerid][20])
Reply
#4

https://sampwiki.blast.hk/wiki/OnPlayerClickPlayerTextDraw
Reply
#5

Quote:
Originally Posted by Threshold
Посмотреть сообщение
thanks alot!
p.s. - do you maybe know why the textdraws get colored one after the other and not seperately?
when i am using this:
Код:
SelectTextDraw(playerid, COL_SYSTEM);
?

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)