CancelSelectTextDraw(playerid); - 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: CancelSelectTextDraw(playerid); (
/showthread.php?tid=511138)
CancelSelectTextDraw(playerid); -
audriuxxx - 04.05.2014
Hi,
This callback OnPlayerClickTextDraw is called when i use this function?
CancelSelectTextDraw(playerid);
Re: CancelSelectTextDraw(playerid); -
Galletziz - 04.05.2014
Not, this callback is called when you click on selectable textdraw i gonna make an example:
pawn Code:
public OnGameModeInit()
{
TextBotton1 = TextDrawCreate(40.000000, 220.500030, "Bad Reputation");
TextDrawLetterSize(TextBotton1, 0.449999, 1.600000);
TextDrawAlignment(TextBotton1, 1);
TextDrawColor(TextBotton1, -1);
TextDrawSetShadow(TextBotton1, 0);
TextDrawSetOutline(TextBotton1, 1);
TextDrawBackgroundColor(TextBotton1, 51);
TextDrawFont(TextBotton1, 3);
TextDrawSetProportional(TextBotton1, 1);
TextDrawSetSelectable(TextBotton1, true);
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == TextBotton1)
{
new skill[34];
format(skill,sizeof(skill),"BReputation");
pinfo[playerid][classe] = skill;
GivePlayerWeapon(playerid,24,137);
TextDrawHideForPlayer(playerid,Textbox);
TextDrawHideForPlayer(playerid,Intestatext);
TextDrawHideForPlayer(playerid,TextBotton1);
TextDrawHideForPlayer(playerid,TextBotton2);
TextDrawHideForPlayer(playerid,TextBotton3);
TextDrawHideForPlayer(playerid,TextBotton4);
TextDrawHideForPlayer(playerid,TextBotton5);
TextDrawHideForPlayer(playerid,TextBotton6);
TextDrawHideForPlayer(playerid,TextBotton7);
TextDrawHideForPlayer(playerid,TextBotton8);
TextDrawHideForPlayer(playerid,TextBotton9);
CancelSelectTextDraw(playerid);
classescelta[playerid] = 1;
}
return 1;
}
i hope this can help you
Enjoy.
Re: CancelSelectTextDraw(playerid); -
audriuxxx - 04.05.2014
But i head, when this function is called, then clickedid is INVALID_3D_TEXT or no?
Re: CancelSelectTextDraw(playerid); -
RajatPawar - 04.05.2014
Why not make a simple script, add a print below the callback and test it out for yourself? Would definitely save you the time you would otherwise need to bump this thread again.