Problem with SelectTextDraw
#5

try to add this at the bottom of gamemode init
Код:
	TextDrawSetSelectable(Login_Textdraw11, true);
	TextDrawSetSelectable(Login_Textdraw10, true);
	TextDrawSetSelectable(Login_Textdraw9, true);
	TextDrawSetSelectable(Login_Textdraw7, true);
	TextDrawSetSelectable(Login_Textdraw8, true);
and you should also have this
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW) // If the player clicked a valid textdraw, continue with the coding. (_:var removes the Text: tag, to avoid tag mismatch)
    {
        if(clickedid == Login_Textdraw11)
        {
        //write what you want the script to do when the click on the dialog
        }
        else if(clickedid == Login_Textdraw10)
        {
        //write what you want the script to do when the click on the dialog
        }
        else if(clickedid == Login_Textdraw9)
        {
        //write what you want the script to do when the click on the dialog
        }
        else if(clickedid == Login_Textdraw8)
        {
        //write what you want the script to do when the click on the dialog
        }
        else if(clickedid == Login_Textdraw7)
        {
        //write what you want the script to do when the click on the dialog
        }

        TextDrawHideForPlayer(playerid, Login_Textdraw11);
        TextDrawHideForPlayer(playerid, Login_Textdraw10);
        TextDrawHideForPlayer(playerid, Login_Textdraw9);
        TextDrawHideForPlayer(playerid, Login_Textdraw8);
        TextDrawHideForPlayer(playerid, Login_Textdraw7);
        CancelSelectTextDraw(playerid); // This will indeed call OnPlayerClickTextDraw again, but with an ID of 65535. The code above stops it from resulting in an eternal loop.
    }
    return 1;
}
Reply


Messages In This Thread
Problem with SelectTextDraw - by deathrunner - 12.06.2014, 15:31
Re: Problem with SelectTextDraw - by sl!x - 12.06.2014, 15:47
Re: Problem with SelectTextDraw - by deathrunner - 12.06.2014, 16:00
Re: Problem with SelectTextDraw - by Faisal_khan - 12.06.2014, 16:06
Re: Problem with SelectTextDraw - by sl!x - 12.06.2014, 16:16
Re: Problem with SelectTextDraw - by deathrunner - 12.06.2014, 16:21
Re: Problem with SelectTextDraw - by Faisal_khan - 12.06.2014, 16:23
Re: Problem with SelectTextDraw - by deathrunner - 12.06.2014, 16:24
Re: Problem with SelectTextDraw - by sl!x - 12.06.2014, 16:31
Re: Problem with SelectTextDraw - by deathrunner - 12.06.2014, 16:33

Forum Jump:


Users browsing this thread: 1 Guest(s)