SA-MP Forums Archive
What's problem ... - 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: What's problem ... (/showthread.php?tid=609027)



What's problem ... - Maximun - 07.06.2016

Hello, Can someone help me please in that weird problem, It seems to me all is true and no errors, However, that textdraw is not selectable, I don't really know what's wrong here ....

Here is the code :

PHP код:
new PlayerTextTD_Register[14][MAX_PLAYERS];
PlayerTextDrawShow(playerid,  TD_Register[14][playerid]);
PlayerTextDrawSetSelectable(playeridTD_Register[14][playerid], 1);
//******************************************************
        
TD_Register[14][playerid] = CreatePlayerTextDraw(playerid605.599670183.679946"LD_BEAT:LEFT");
        
PlayerTextDrawLetterSize(playeridTD_Register[14][playerid], 0.063997, -0.664533);
        
PlayerTextDrawTextSize(playeridTD_Register[14][playerid], -9.6000088.213315);
        
PlayerTextDrawAlignment(playeridTD_Register[14][playerid], 1);
        
PlayerTextDrawColor(playeridTD_Register[14][playerid], -1);
        
PlayerTextDrawSetShadow(playeridTD_Register[14][playerid], 0);
        
PlayerTextDrawSetOutline(playeridTD_Register[14][playerid], 0);
        
PlayerTextDrawFont(playeridTD_Register[14][playerid], 4);
        
PlayerTextDrawSetSelectable(playeridTD_Register[14][playerid], 1);
        
//**********************************************************
public OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid)
{
    if(
playertextid == TD_Register[14][playerid])
    {
        if(
selval[0][playerid] == 0)
        {
            
selval[0][playerid] = 1;
               
PlayerTextDrawSetString(playeridTD_Register[6][playerid], "Male");
        }
        else if(
selval[0][playerid] == 1)
        {
            
selval[0][playerid] = 0;
               
PlayerTextDrawSetString(playeridTD_Register[6][playerid], "Female");
        }
    }
    return 
1;

EDIT: Do someone know what's name of that IMG please ?
Problem Solved! Thanks to TwinkiDaBoss and iShawn for their support.


Re: What's problem ... - TwinkiDaBoss - 07.06.2016

PHP код:
PlayerTextDrawTextSize(playeridTD_Register[14][playerid], -9.6000088.213315); 
Textsize cannot be a negative number (it can be on normal textdraws, but for the clickable it must be 0 or more). Try it like this

PHP код:
PlayerTextDrawTextSize(playeridTD_Register[14][playerid], 50.6000088.213315); 



Re: What's problem ... - Maximun - 07.06.2016

I didn't know that have a effect, thank you so much brother.


Re: What's problem ... - TwinkiDaBoss - 07.06.2016

Quote:
Originally Posted by Maximun
Посмотреть сообщение
I didn't know that have a effect, thank you so much brother.
Np mate, I got a lil suggestion for you in the future.
Create invisible boxes around your clickable textdraws so you can preety much know at all times where and what.


Re: What's problem ... - Maximun - 07.06.2016

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
Np mate, I got a lil suggestion for you in the future.
Create invisible boxes around your clickable textdraws so you can preety much know at all times where and what.
Thank you for that info Twinki.
Do someone know what's name of that IMG please ?


Re: What's problem ... - iShawn - 07.06.2016

Try ~<~ (left arrow) and ~>~ (right arrow).


Re: What's problem ... - Maximun - 08.06.2016

Quote:
Originally Posted by iShawn
Посмотреть сообщение
Try ~<~ (left arrow) and ~>~ (right arrow).
It worked, big thanks for your fast reply friend.