[BUG]Clickable textdraws
#1

yo dudes,Seems like clickable textdraw is bugged, like this: i have paralel like this: NEON CAM REPAIR and X ||| X is for close that menu and i go to close menu and fucking mouse mark NEON, CAM, REPAIR and X and i click on X but its click on NEON cuz he is first in that paralel line...So how to fix that?
Reply
#2

Show the code. I don't know it well about it, but seems it's detecting somewhere else from where it'd really had to be, so you have to change the clicking coords to the correct textdraw part.
Reply
#3

here u go command:
Код:
if (!strcmp("/tuniraj", cmdtext, true))
    {
        
        TextDrawShowForPlayer(playerid, Textdraw1);  // Show the LS option
        TextDrawShowForPlayer(playerid, Textdraw2);  // Show the SF option
        TextDrawShowForPlayer(playerid, Textdraw3);  // Show the LV option
        TextDrawShowForPlayer(playerid, Textdraw12);  // Show the LV option
        //TogglePlayerSpectating(playerid, 1)
        SetPlayerCameraLookAt(playerid,1770.2292,-1779.2579,16.2882);


        SelectTextDraw(playerid, 0xA3B4C5FF); // Allow the player to select textdraws.
            // The second parameter is the colour to which the textdraw turns when you hover over it.
            //  You can use stuff like COLOR_RED as well, that's your choice.
        return 1;
    }
here is textdraws:
Код:
Textdraw1 = TextDrawCreate(508.000000, 220.000000, "RESET");
//TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.259999, 0.899999);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);

Textdraw2 = TextDrawCreate(561.000000, 220.000000, "CAM");
//TextDrawAlignment(Textdraw2, 2);
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 2);
TextDrawLetterSize(Textdraw2, 0.259999, 0.899999);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);

Textdraw3 = TextDrawCreate(611.000000, 217.000000, "X");
//TextDrawAlignment(Textdraw3, 2);
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 2);
TextDrawLetterSize(Textdraw3, 0.259999, 0.899999);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);

Textdraw12 = TextDrawCreate(462.000000, 220.000000, "NEON");
TextDrawBackgroundColor(Textdraw12, 255);
TextDrawFont(Textdraw12, 2);
TextDrawLetterSize(Textdraw12, 0.259999, 0.899999);
TextDrawColor(Textdraw12, -1);
TextDrawSetOutline(Textdraw12, 0);
TextDrawSetProportional(Textdraw12, 1);
TextDrawSetShadow(Textdraw12, 1);
and here OnPlayerClickTextDraw:
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
        if(clickedid == Textdraw1)
        {
            SCM(playerid, COLOR_GREEN,"Resetirao si tune!(SAMO TEST)");
        }
        else if(clickedid == Textdraw2)
        {
            SCM(playerid, COLOR_GREEN,"Kamera se rotira!(SAMO TEST)");
        }
        else if(clickedid == Textdraw3)
        {
            SCM(playerid, COLOR_GREEN,"Zatvorio si tune menu!(SAMO TEST)");
            TextDrawHideForPlayer(playerid, Textdraw0);
            TextDrawHideForPlayer(playerid, Textdraw1);
            TextDrawHideForPlayer(playerid, Textdraw2);
            TextDrawHideForPlayer(playerid, Textdraw3);
            TextDrawHideForPlayer(playerid, Textdraw4);
            TextDrawHideForPlayer(playerid, Textdraw5);
            TextDrawHideForPlayer(playerid, Textdraw6);
            TextDrawHideForPlayer(playerid, Textdraw7);
            TextDrawHideForPlayer(playerid, Textdraw8);
            TextDrawHideForPlayer(playerid, Textdraw9);
            TextDrawHideForPlayer(playerid, Textdraw10);
            TextDrawHideForPlayer(playerid, Textdraw11);
            TextDrawHideForPlayer(playerid, Textdraw12);
            CancelSelectTextDraw(playerid);
        }
        else if(clickedid == Textdraw12)
        {
            SCM(playerid, COLOR_GREEN,"Za neonke treba odraditi...(SAMO TEST)");
        }
    return 1;
}
Reply
#4

*BUMP*
Reply
#5

*BUMP*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)