OnPlayerClickTextDraw
#9

okey, lets say, this is your textdraw:
Код:
	AT_M_TD[3] = TextDrawCreate(179.000000, 336.000000, "News-Heli~n~~g~120000$");
	TextDrawBackgroundColor(AT_M_TD[3], 255);
	TextDrawFont(AT_M_TD[3], 1);
	TextDrawLetterSize(AT_M_TD[3], 0.500000, 1.200000);
	TextDrawColor(AT_M_TD[3], -1);
	TextDrawSetOutline(AT_M_TD[3], 0);
	TextDrawSetProportional(AT_M_TD[3], 1);
	TextDrawSetShadow(AT_M_TD[3], 1);
	TextDrawUseBox(AT_M_TD[3], 1);
	TextDrawBoxColor(AT_M_TD[3], -2038003969);
	TextDrawTextSize(AT_M_TD[3], 256.000000, 0.000000);
now if you would like to make it clickable, we add
"TextDrawSetSelectable(AT_M_TD[3],1);"
to it. But we're not done yet, to tell the server wich area is clickable,
we edit: "TextDrawTextSize(AT_M_TD[3], 256.000000, 0.000000);"
we will edit the Y acis part, as the X axis is always fine.
lets say we add 22 to the Y axis, the textdraw would now look like:
Код:
	AT_M_TD[3] = TextDrawCreate(179.000000, 336.000000, "News-Heli~n~~g~120000$");
	TextDrawBackgroundColor(AT_M_TD[3], 255);
	TextDrawFont(AT_M_TD[3], 1);
	TextDrawLetterSize(AT_M_TD[3], 0.500000, 1.200000);
	TextDrawColor(AT_M_TD[3], -1);
	TextDrawSetOutline(AT_M_TD[3], 0);
	TextDrawSetProportional(AT_M_TD[3], 1);
	TextDrawSetShadow(AT_M_TD[3], 1);
	TextDrawUseBox(AT_M_TD[3], 1);
	TextDrawBoxColor(AT_M_TD[3], -2038003969);
	TextDrawTextSize(AT_M_TD[3], 256.000000, 22.000000);
	TextDrawSetSelectable(AT_M_TD[3],1);
and is clickable
Reply


Messages In This Thread
OnPlayerClickTextDraw - by RandomDude - 31.07.2013, 14:33
Re: OnPlayerClickTextDraw - by RandomDude - 31.07.2013, 14:36
Re: OnPlayerClickTextDraw - by RandomDude - 31.07.2013, 15:12
Re: OnPlayerClickTextDraw - by RandomDude - 31.07.2013, 15:49
Re: OnPlayerClickTextDraw - by RandomDude - 31.07.2013, 18:06
Re: OnPlayerClickTextDraw - by RandomDude - 31.07.2013, 23:09
Respuesta: OnPlayerClickTextDraw - by Marricio - 01.08.2013, 01:47
Re: OnPlayerClickTextDraw - by RandomDude - 01.08.2013, 12:26
AW: OnPlayerClickTextDraw - by CutX - 01.08.2013, 12:35
Re: OnPlayerClickTextDraw - by RandomDude - 01.08.2013, 13:32

Forum Jump:


Users browsing this thread: 1 Guest(s)