SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/05/2020, 06:48 AM   #1
SharpenBlade
Huge Clucker
 
Join Date: May 2020
Posts: 203
Reputation: 25
Default Clickable textdraw problem

Hello guys! I have a new problem, it's kind of new for me. I can't figure out what is wrong. So, I created some register textdraws. The problem is that I can click everything, excepting Register button.
Picture: https://i.imgur.com/kuMI8cU.png
Code:
PHP Code:
RegisterTD[0] = TextDrawCreate(313.909484114.333381"Register");
    
TextDrawLetterSize(RegisterTD[0], 0.4499991.600000);
    
TextDrawTextSize(RegisterTD[0], 217.861938439.833343);
    
TextDrawAlignment(RegisterTD[0], 2);
    
TextDrawColor(RegisterTD[0], -1);
    
TextDrawUseBox(RegisterTD[0], true);
    
TextDrawBoxColor(RegisterTD[0], 255);
    
TextDrawSetShadow(RegisterTD[0], 0);
    
TextDrawSetOutline(RegisterTD[0], 1);
    
TextDrawBackgroundColor(RegisterTD[0], 51);
    
TextDrawFont(RegisterTD[0], 3);
    
TextDrawSetProportional(RegisterTD[0], 1);

    
RegisterTD[1] = TextDrawCreate(537.519714133.333358"usebox");
    
TextDrawLetterSize(RegisterTD[1], 0.000000, -0.316666);
    
TextDrawTextSize(RegisterTD[1], 89.3616330.000000);
    
TextDrawAlignment(RegisterTD[1], 1);
    
TextDrawColor(RegisterTD[1], 0);
    
TextDrawUseBox(RegisterTD[1], true);
    
TextDrawBoxColor(RegisterTD[1], 8388863);
    
TextDrawSetShadow(RegisterTD[1], 0);
    
TextDrawSetOutline(RegisterTD[1], 0);
    
TextDrawFont(RegisterTD[1], 0);

    
RegisterTD[2] = TextDrawCreate(201.121520138.583343"usebox");
    
TextDrawLetterSize(RegisterTD[2], 0.00000022.498149);
    
TextDrawTextSize(RegisterTD[2], 90.7671960.000000);
    
TextDrawAlignment(RegisterTD[2], 1);
    
TextDrawColor(RegisterTD[2], 0);
    
TextDrawUseBox(RegisterTD[2], true);
    
TextDrawBoxColor(RegisterTD[2], 102);
    
TextDrawSetShadow(RegisterTD[2], 0);
    
TextDrawSetOutline(RegisterTD[2], 0);
    
TextDrawFont(RegisterTD[2], 0);

    
RegisterTD[3] = TextDrawCreate(537.051208138.583343"usebox");
    
TextDrawLetterSize(RegisterTD[3], 0.00000022.562961);
    
TextDrawTextSize(RegisterTD[3], 203.2123100.000000);
    
TextDrawAlignment(RegisterTD[3], 1);
    
TextDrawColor(RegisterTD[3], 0);
    
TextDrawUseBox(RegisterTD[3], true);
    
TextDrawBoxColor(RegisterTD[3], 102);
    
TextDrawSetShadow(RegisterTD[3], 0);
    
TextDrawSetOutline(RegisterTD[3], 0);
    
TextDrawFont(RegisterTD[3], 0);

    
RegisterTD[4] = TextDrawCreate(537.051330345.083312"usebox");
    
TextDrawLetterSize(RegisterTD[4], 0.000000, -0.251846);
    
TextDrawTextSize(RegisterTD[4], 203.2123100.000000);
    
TextDrawAlignment(RegisterTD[4], 1);
    
TextDrawColor(RegisterTD[4], 0);
    
TextDrawUseBox(RegisterTD[4], true);
    
TextDrawBoxColor(RegisterTD[4], 8388863);
    
TextDrawSetShadow(RegisterTD[4], 0);
    
TextDrawSetOutline(RegisterTD[4], 0);
    
TextDrawFont(RegisterTD[4], 0);

    
RegisterTD[5] = TextDrawCreate(94.515365345.083404"usebox");
    
TextDrawLetterSize(RegisterTD[5], 0.000000, -0.234259);
    
TextDrawTextSize(RegisterTD[5], 197.5900260.000000);
    
TextDrawAlignment(RegisterTD[5], 1);
    
TextDrawColor(RegisterTD[5], 0);
    
TextDrawUseBox(RegisterTD[5], true);
    
TextDrawBoxColor(RegisterTD[5], 8388863);
    
TextDrawSetShadow(RegisterTD[5], 0);
    
TextDrawSetOutline(RegisterTD[5], 0);
    
TextDrawFont(RegisterTD[5], 0);

    
RegisterTD[6] = TextDrawCreate(525.338195144.416656"usebox");
    
TextDrawLetterSize(RegisterTD[6], 0.0000001.174075);
    
TextDrawTextSize(RegisterTD[6], 207.8975210.000000);
    
TextDrawAlignment(RegisterTD[6], 1);
    
TextDrawColor(RegisterTD[6], 0);
    
TextDrawUseBox(RegisterTD[6], true);
    
TextDrawBoxColor(RegisterTD[6], 102);
    
TextDrawSetShadow(RegisterTD[6], 0);
    
TextDrawSetOutline(RegisterTD[6], 0);
    
TextDrawFont(RegisterTD[6], 0);

    
RegisterTD[7] = TextDrawCreate(212.114181180.000015"usebox");
    
TextDrawLetterSize(RegisterTD[7], 0.000000, -2.108345);
    
TextDrawTextSize(RegisterTD[7], 521.3381950.000000);
    
TextDrawAlignment(RegisterTD[7], 1);
    
TextDrawColor(RegisterTD[7], 0);
    
TextDrawUseBox(RegisterTD[7], true);
    
TextDrawBoxColor(RegisterTD[7], 102);
    
TextDrawSetShadow(RegisterTD[7], 0);
    
TextDrawSetOutline(RegisterTD[7], 0);
    
TextDrawFont(RegisterTD[7], 0);

    
RegisterTD[8] = TextDrawCreate(524.869689185.250000"usebox");
    
TextDrawLetterSize(RegisterTD[8], 0.0000001.109259);
    
TextDrawTextSize(RegisterTD[8], 208.8345640.000000);
    
TextDrawAlignment(RegisterTD[8], 1);
    
TextDrawColor(RegisterTD[8], 0);
    
TextDrawUseBox(RegisterTD[8], true);
    
TextDrawBoxColor(RegisterTD[8], 102);
    
TextDrawSetShadow(RegisterTD[8], 0);
    
TextDrawSetOutline(RegisterTD[8], 0);
    
TextDrawFont(RegisterTD[8], 0);

    
RegisterTD[9] = TextDrawCreate(524.869689207.416687"usebox");
    
TextDrawLetterSize(RegisterTD[9], 0.0000001.174072);
    
TextDrawTextSize(RegisterTD[9], 209.3030850.000000);
    
TextDrawAlignment(RegisterTD[9], 1);
    
TextDrawColor(RegisterTD[9], 0);
    
TextDrawUseBox(RegisterTD[9], true);
    
TextDrawBoxColor(RegisterTD[9], 102);
    
TextDrawSetShadow(RegisterTD[9], 0);
    
TextDrawSetOutline(RegisterTD[9], 0);
    
TextDrawFont(RegisterTD[9], 0);

    
RegisterTD[10] = TextDrawCreate(524.763549231.333358"usebox");
    
TextDrawLetterSize(RegisterTD[10], 0.0000001.174072);
    
TextDrawTextSize(RegisterTD[10], 209.7716060.000000);
    
TextDrawAlignment(RegisterTD[10], 1);
    
TextDrawColor(RegisterTD[10], 0);
    
TextDrawUseBox(RegisterTD[10], true);
    
TextDrawBoxColor(RegisterTD[10], 102);
    
TextDrawSetShadow(RegisterTD[10], 0);
    
TextDrawSetOutline(RegisterTD[10], 0);
    
TextDrawFont(RegisterTD[10], 0);

    
RegisterTD[11] = TextDrawCreate(237.540267324.916564"Register"); // here is the problem
    
TextDrawLetterSize(RegisterTD[11], 0.3656661.600000);
    
TextDrawTextSize(RegisterTD[11], -2.34260261.250019);
    
TextDrawAlignment(RegisterTD[11], 2);
    
TextDrawColor(RegisterTD[11], -1);
    
TextDrawUseBox(RegisterTD[11], true);
    
TextDrawBoxColor(RegisterTD[11], 1272447231);
    
TextDrawSetShadow(RegisterTD[11], 0);
    
TextDrawSetOutline(RegisterTD[11], 1);
    
TextDrawBackgroundColor(RegisterTD[11], 51);
    
TextDrawFont(RegisterTD[11], 3);
    
TextDrawSetProportional(RegisterTD[11], 1);
    
TextDrawSetSelectable(RegisterTD[11], true);

    
RegisterTD[12] = TextDrawCreate(506.939910326.083404"Cancel");
    
TextDrawLetterSize(RegisterTD[12], 0.3656661.600000);
    
TextDrawTextSize(RegisterTD[12], 23.42605952.500015);
    
TextDrawAlignment(RegisterTD[12], 2);
    
TextDrawColor(RegisterTD[12], -1);
    
TextDrawUseBox(RegisterTD[12], true);
    
TextDrawBoxColor(RegisterTD[12], -16776961);
    
TextDrawSetShadow(RegisterTD[12], 0);
    
TextDrawSetOutline(RegisterTD[12], 1);
    
TextDrawBackgroundColor(RegisterTD[12], 51);
    
TextDrawFont(RegisterTD[12], 3);
    
TextDrawSetProportional(RegisterTD[12], 1);
    
TextDrawSetSelectable(RegisterTD[12], true);

    
RegisterTD[13] = TextDrawCreate(524.401184252.916656"usebox");
    
TextDrawLetterSize(RegisterTD[13], 0.0000001.044442);
    
TextDrawTextSize(RegisterTD[13], 209.7716060.000000);
    
TextDrawAlignment(RegisterTD[13], 1);
    
TextDrawColor(RegisterTD[13], 0);
    
TextDrawUseBox(RegisterTD[13], true);
    
TextDrawBoxColor(RegisterTD[13], 102);
    
TextDrawSetShadow(RegisterTD[13], 0);
    
TextDrawSetOutline(RegisterTD[13], 0);
    
TextDrawFont(RegisterTD[13], 0); 
When I check if the player is registered I create and show the textdraws. After that, I set the player textdraw click to 1.
PHP Code:
CreateRegisterTextdraw(playerid);
ShowRegisterTextdraw(playerid);
SelectTextDraw(playerid0x008000FF); 
Show and Create player textdraws:
PHP Code:
function CreateRegisterTextdraw(playerid)
{
    
RegisterPTD[0][playerid] = CreatePlayerTextDraw(playerid213.177139145.249969"Name: Sami");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[0][playerid], 0.3141281.162498);
    
PlayerTextDrawAlignment(playeridRegisterPTD[0][playerid], 1);
    
PlayerTextDrawColor(playeridRegisterPTD[0][playerid], -1);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[0][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[0][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[0][playerid], 51);
    
PlayerTextDrawFont(playeridRegisterPTD[0][playerid], 3);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[0][playerid], 1);

    
RegisterPTD[1][playerid] = CreatePlayerTextDraw(playerid212.240127165.666641"Password: XXXXXX");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[1][playerid], 0.3024151.250000);
    
PlayerTextDrawAlignment(playeridRegisterPTD[1][playerid], 1);
    
PlayerTextDrawColor(playeridRegisterPTD[1][playerid], -1);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[1][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[1][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[1][playerid], 51);
    
PlayerTextDrawFont(playeridRegisterPTD[1][playerid], 3);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[1][playerid], 1);
    
PlayerTextDrawSetSelectable(playeridRegisterPTD[1][playerid], true);

    
RegisterPTD[2][playerid] = CreatePlayerTextDraw(playerid212.708648184.916656"Gender: Male");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[2][playerid], 0.3211551.133332);
    
PlayerTextDrawAlignment(playeridRegisterPTD[2][playerid], 1);
    
PlayerTextDrawColor(playeridRegisterPTD[2][playerid], -1);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[2][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[2][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[2][playerid], 51);
    
PlayerTextDrawFont(playeridRegisterPTD[2][playerid], 3);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[2][playerid], 1);
    
PlayerTextDrawSetSelectable(playeridRegisterPTD[2][playerid], true);

    
RegisterPTD[3][playerid] = CreatePlayerTextDraw(playerid212.240127205.916656"Mail: test@yahoo.com");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[3][playerid], 0.3071011.337499);
    
PlayerTextDrawAlignment(playeridRegisterPTD[3][playerid], 1);
    
PlayerTextDrawColor(playeridRegisterPTD[3][playerid], -1);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[3][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[3][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[3][playerid], 51);
    
PlayerTextDrawFont(playeridRegisterPTD[3][playerid], 3);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[3][playerid], 1);
    
PlayerTextDrawSetSelectable(playeridRegisterPTD[3][playerid], true);

    
RegisterPTD[4][playerid] = CreatePlayerTextDraw(playerid94.172760137.666656"");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[4][playerid], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridRegisterPTD[4][playerid], 104.480239203.000030);
    
PlayerTextDrawAlignment(playeridRegisterPTD[4][playerid], 1);
    
PlayerTextDrawColor(playeridRegisterPTD[4][playerid], 0xFFFFFFFF);
    
PlayerTextDrawUseBox(playeridRegisterPTD[4][playerid], 0);
    
PlayerTextDrawBoxColor(playeridRegisterPTD[4][playerid], 0x80808080);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[4][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[4][playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[4][playerid], 0xFF000000);
    
PlayerTextDrawFont(playeridRegisterPTD[4][playerid], 5);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[4][playerid], 0);
    
PlayerTextDrawSetSelectable(playeridRegisterPTD[4][playerid], 1);
    
PlayerTextDrawSetPreviewModel(playeridRegisterPTD[4][playerid], 0);
    
PlayerTextDrawSetPreviewRot(playeridRegisterPTD[4][playerid], 360.0000000.00000032.0000000.967741);

    
RegisterPTD[5][playerid] = CreatePlayerTextDraw(playerid213.177169250.833328"Refferal: Gigel");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[5][playerid], 0.3047581.395833);
    
PlayerTextDrawAlignment(playeridRegisterPTD[5][playerid], 1);
    
PlayerTextDrawColor(playeridRegisterPTD[5][playerid], -1);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[5][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[5][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[5][playerid], 51);
    
PlayerTextDrawFont(playeridRegisterPTD[5][playerid], 3);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[5][playerid], 1);
    
PlayerTextDrawSetSelectable(playeridRegisterPTD[5][playerid], true);

    
RegisterPTD[6][playerid] = CreatePlayerTextDraw(playerid365.915100281.166656"");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[6][playerid], 0.3773791.395833);
    
PlayerTextDrawAlignment(playeridRegisterPTD[6][playerid], 2);
    
PlayerTextDrawColor(playeridRegisterPTD[6][playerid], -1);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[6][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[6][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[6][playerid], 51);
    
PlayerTextDrawFont(playeridRegisterPTD[6][playerid], 3);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[6][playerid], 1);

    
RegisterPTD[7][playerid] = CreatePlayerTextDraw(playerid212.708648230.999984"City: Los Santos");
    
PlayerTextDrawLetterSize(playeridRegisterPTD[7][playerid], 0.3141281.191666);
    
PlayerTextDrawAlignment(playeridRegisterPTD[7][playerid], 1);
    
PlayerTextDrawColor(playeridRegisterPTD[7][playerid], -1);
    
PlayerTextDrawSetShadow(playeridRegisterPTD[7][playerid], 0);
    
PlayerTextDrawSetOutline(playeridRegisterPTD[7][playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridRegisterPTD[7][playerid], 51);
    
PlayerTextDrawFont(playeridRegisterPTD[7][playerid], 3);
    
PlayerTextDrawSetProportional(playeridRegisterPTD[7][playerid], 1);
    return 
true;
}

function 
DestroyRegisterTextdraw(playerid)
{
    for(new 
08i++)
    {
        
PlayerTextDrawDestroy(playeridRegisterPTD[i][playerid]);
    }
    return 
true;
}

function 
ShowRegisterTextdraw(playerid)
{
    for(new 
08i++)
    {
        
PlayerTextDrawShow(playeridRegisterPTD[i][playerid]);
    }
    for(new 
014i++)
    {
        
TextDrawShowForPlayer(playeridRegisterTD[i]);
    }
    return 
true;
}

function 
HideRegisterTextdraw(playerid)
{
    for(new 
08i++)
    {
        
PlayerTextDrawHide(playeridRegisterPTD[i][playerid]);
    }
    for(new 
014i++)
    {
        
TextDrawHideForPlayer(playeridRegisterTD[i]);
    }
    return 
true;

SharpenBlade is offline   Reply With Quote
Old 30/05/2020, 07:12 AM   #2
hopeonxanny
Huge Clucker
 
hopeonxanny's Avatar
 
Join Date: Apr 2020
Location: SA-MP Awesomeness: 1998
Posts: 238
Reputation: 4
Default Re: Clickable textdraw problem

I kinda made the same system as you because i am working on scratch gamemode, i want to build/edit my own things learning something.

I had the same problem but with a dealership system when i had to press "Buy" it didn't work. I've changed from global Textdraw to Player Textdraw and then it worked just fine, i dont know why. It is hard and stupid work to do this with functions like Hide and Show...

And one more things, i dont know if it helps you or not, but try using instead of this
PHP Code:
function ShowRegisterTextdraw(playerid)
{
    for(new 
08i++)
    {
        
PlayerTextDrawShow(playeridRegisterPTD[i][playerid]);
    }
    for(new 
014i++)
    {
        
TextDrawShowForPlayer(playeridRegisterTD[i]);
    }
    return 
true;

this
PHP Code:
function ShowRegisterTextdraw(playerid)
{
    for(new 
0sizeof(RegisterPTD); i++) PlayerTextDrawShow(playeridRegisterPTD[i][playerid]);
    for(new 
0sizeof(RegisterTD); i++) TextDrawShowForPlayer(playeridRegisterTD[i]);
    return 
true;

it is way cleaner and does the same thing, and is better in case you want to delete a textdraw

and yea, try switching it to PlayerTD... i dont have any idea, as i can see it is set to selectable, also in selection mode, it doesnt work... weird
__________________
hopeonxanny is offline   Reply With Quote
Old 30/05/2020, 07:50 AM   #3
GameOvr
Huge Clucker
 
GameOvr's Avatar
 
Join Date: Jun 2018
Posts: 296
Reputation: 9
Default Re: Clickable textdraw problem

Code:
    RegisterTD[0] = TextDrawCreate(313.909484, 114.333381, "Register"); 
    TextDrawLetterSize(RegisterTD[0], 0.449999, 1.600000); 
    TextDrawTextSize(RegisterTD[0], 217.861938, 439.833343); 
    TextDrawAlignment(RegisterTD[0], 2); 
    TextDrawColor(RegisterTD[0], -1); 
    TextDrawUseBox(RegisterTD[0], true); 
    TextDrawBoxColor(RegisterTD[0], 255); 
    TextDrawSetShadow(RegisterTD[0], 0); 
    TextDrawSetOutline(RegisterTD[0], 1); 
    TextDrawBackgroundColor(RegisterTD[0], 51); 
    TextDrawFont(RegisterTD[0], 3); 
    TextDrawSetProportional(RegisterTD[0], 1); 
    TextDrawSetSelectable(RegisterTD[0], true); // you missed this
__________________
GameOvr is offline   Reply With Quote
Old 30/05/2020, 08:02 AM   #4
SharpenBlade
Huge Clucker
 
Join Date: May 2020
Posts: 203
Reputation: 25
Default Re: Clickable textdraw problem

Quote:
Originally Posted by GameOvr View Post
Code:
    RegisterTD[0] = TextDrawCreate(313.909484, 114.333381, "Register"); 
    TextDrawLetterSize(RegisterTD[0], 0.449999, 1.600000); 
    TextDrawTextSize(RegisterTD[0], 217.861938, 439.833343); 
    TextDrawAlignment(RegisterTD[0], 2); 
    TextDrawColor(RegisterTD[0], -1); 
    TextDrawUseBox(RegisterTD[0], true); 
    TextDrawBoxColor(RegisterTD[0], 255); 
    TextDrawSetShadow(RegisterTD[0], 0); 
    TextDrawSetOutline(RegisterTD[0], 1); 
    TextDrawBackgroundColor(RegisterTD[0], 51); 
    TextDrawFont(RegisterTD[0], 3); 
    TextDrawSetProportional(RegisterTD[0], 1); 
    TextDrawSetSelectable(RegisterTD[0], true); // you missed this
The problem was at the 11th textdraw. This is only the title.
SharpenBlade is offline   Reply With Quote
Old 30/05/2020, 08:10 AM   #5
SharpenBlade
Huge Clucker
 
Join Date: May 2020
Posts: 203
Reputation: 25
Default Re: Clickable textdraw problem

Quote:
Originally Posted by hopeonxanny View Post
I kinda made the same system as you because i am working on scratch gamemode, i want to build/edit my own things learning something.

I had the same problem but with a dealership system when i had to press "Buy" it didn't work. I've changed from global Textdraw to Player Textdraw and then it worked just fine, i dont know why. It is hard and stupid work to do this with functions like Hide and Show...

And one more things, i dont know if it helps you or not, but try using instead of this
PHP Code:
function ShowRegisterTextdraw(playerid)
{
    for(new 
08i++)
    {
        
PlayerTextDrawShow(playeridRegisterPTD[i][playerid]);
    }
    for(new 
014i++)
    {
        
TextDrawShowForPlayer(playeridRegisterTD[i]);
    }
    return 
true;

this
PHP Code:
function ShowRegisterTextdraw(playerid)
{
    for(new 
0sizeof(RegisterPTD); i++) PlayerTextDrawShow(playeridRegisterPTD[i][playerid]);
    for(new 
0sizeof(RegisterTD); i++) TextDrawShowForPlayer(playeridRegisterTD[i]);
    return 
true;

it is way cleaner and does the same thing, and is better in case you want to delete a textdraw

and yea, try switching it to PlayerTD... i dont have any idea, as i can see it is set to selectable, also in selection mode, it doesnt work... weird
Tried that, still not working.
SharpenBlade is offline   Reply With Quote
Old 30/05/2020, 08:20 AM   #6
GameOvr
Huge Clucker
 
GameOvr's Avatar
 
Join Date: Jun 2018
Posts: 296
Reputation: 9
Default Re: Clickable textdraw problem

Hmm, yeah I dont see anything wrong.. maybe show us your OnPlayerClickTextDraw... and does the textdraw color change when you move the cursor there? And also make sure u havent created any textdraw after that with the id RegisterTd[11]
__________________
GameOvr is offline   Reply With Quote
Old 30/05/2020, 08:24 AM   #7
SharpenBlade
Huge Clucker
 
Join Date: May 2020
Posts: 203
Reputation: 25
Default Re: Clickable textdraw problem

Quote:
Originally Posted by GameOvr View Post
Hmm, yeah I dont see anything wrong.. maybe show us your OnPlayerClickTextDraw... and does the textdraw color change when you move the cursor there? And also make sure u havent created any textdraw after that with the id RegisterTd[11]
I haven't created any other textdraw in that place or with that name.
OnPlayerClickTextDraw: https://pastebin.com/0FZ29ufw
OnPlayerClickPlayerTextDraw: https://pastebin.com/MNpkhm6c
SharpenBlade is offline   Reply With Quote
Old 30/05/2020, 12:24 PM   #8
Cell_
Big Clucker
 
Join Date: May 2012
Posts: 160
Reputation: 50
Default Re: Clickable textdraw problem

Change this:
pawn Code:
TextDrawTextSize(RegisterTD[11], -2.342602, 61.250019);
to this:
pawn Code:
TextDrawTextSize(RegisterTD[11], 23.426059, 52.500015);
or whatever box size you have.
Cell_ is online now   Reply With Quote
Old 30/05/2020, 01:23 PM   #9
SharpenBlade
Huge Clucker
 
Join Date: May 2020
Posts: 203
Reputation: 25
Default Re: Clickable textdraw problem

Quote:
Originally Posted by Cell_ View Post
Change this:
pawn Code:
TextDrawTextSize(RegisterTD[11], -2.342602, 61.250019);
to this:
pawn Code:
TextDrawTextSize(RegisterTD[11], 23.426059, 52.500015);
or whatever box size you have.
I have figured it out. Thanks anyway to all of you!
SharpenBlade is offline   Reply With Quote
Old 30/05/2020, 05:48 PM   #10
Sasino97
High-roller
 
Sasino97's Avatar
 
Join Date: Dec 2010
Location: Tampa, FL
Posts: 1,418
Reputation: 139
Default Re: Clickable textdraw problem

Double check the size, and if alignment is center or right, it will affect the size.
__________________
Sasino97 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clickable TextDraw Problem adri[4]Life Scripting Help 2 05/06/2017 05:41 PM
Clickable textdraw problem Ahmad45123 Scripting Help 4 24/12/2014 09:44 PM
Clickable textdraw problem.. vassilis Scripting Help 3 11/04/2014 09:24 AM
Textdraw clickable problem Face9000 Scripting Help 7 29/01/2014 10:51 AM
Clickable textdraw problem 2K9CON Scripting Help 3 19/03/2013 09:27 PM


All times are GMT. The time now is 10:01 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.