SA-MP Forums Archive
Clickable textdraw +Rep - 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: Clickable textdraw +Rep (/showthread.php?tid=563829)



Clickable textdraw +Rep - KingyKings - 17.02.2015

I have 5 clickable textdraws but the final 6th one doesn't seem to be working.

It doesn't change color when i hover over it either yet all the other ones do?


Top of the script

Код:
new Text:Textdraw12;
OnGamemodeinit
Код:
Textdraw12 = TextDrawCreate(461.000000, 351.000000, "Done");
TextDrawBackgroundColor(Textdraw12, 255);
TextDrawFont(Textdraw12, 1);
TextDrawLetterSize(Textdraw12, 0.500000, 2.900000);
TextDrawColor(Textdraw12, 16711935);
TextDrawSetOutline(Textdraw12, 0);
TextDrawSetProportional(Textdraw12, 1);
TextDrawSetShadow(Textdraw12, 1);
TextDrawUseBox(Textdraw12, 1);
TextDrawBoxColor(Textdraw12, 16777215);
TextDrawTextSize(Textdraw12, 504.000000, 0.000000);
TextDrawSetSelectable(Textdraw12, 1);
OnPlayerSpawn
Код:
TextDrawShowForPlayer(playerid, Textdraw12);
Onplayerclicktextdraw
Код:
if(clickedid == Textdraw12)
    	{
    	print("OMG YOU PRESSED DONEEEEEEE");
        return 1;
}
It compiles fine.. But like i said doesn't print anything or changes on hover. Any help would be appreciated +Rep.

thanks


Re: Clickable textdraw +Rep - HazardouS - 17.02.2015

I think textdraws are pretty tricky when it comes to selecting them. Just change the align or the sizes of the box, it should be fine.


Re: Clickable textdraw +Rep - Vince - 17.02.2015

Why doesn't anyone ever read the wiki? https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw
Very specific note.


Re: Clickable textdraw +Rep - KingyKings - 17.02.2015

Okay, I didn't notice that. Now i have sorted it out (Text size). It works as i hover over it. However it still doesn't work when i click it. Nothing happens. I have READ that link and nothing sorts out the problem.