Clickable textdraw +Rep
#1

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
Reply
#2

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.
Reply
#3

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)