help with OnPlayerClickTextDraw
#1

Hi i need help, i made a textdraw0 (it's works perfect) it's a menu in the top of the game. this menu say "Server info" and i put OnPlayerClickTextDraw so that when you click you can open other textdraw and give the server info, but does not run the TextDraw
here is the code:

pawn Код:
new Text:Textdraw0;
new Text:Textdrawstv;

public OnGameModeInit()//this work perfect
{
    Textdraw0 = TextDrawCreate(74.000000, 6.000000, "server****");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 3);
    TextDrawLetterSize(Textdraw0, 0.369998, 1.399999);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 0);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 23295);
    TextDrawTextSize(Textdraw0, 643.000000, -56.000000);
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)//this work
{
    if(newkeys == KEY_YES) //if player type "Y"...
    {
    SelectTextDraw(playerid, 0xFFFFFFAA);
    }
    return 1;
}



public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw0)//this doesn't work :'( help me
    {
    Textdrawstv = TextDrawCreate(3.000000, 26.000000, "ServerInfo");
    TextDrawBackgroundColor(Textdrawstv, 255);
    TextDrawFont(Textdrawstv, 3);
    TextDrawLetterSize(Textdrawstv, 0.500000, 1.000000);
    TextDrawColor(Textdrawstv, -1);
    TextDrawSetOutline(Textdrawstv, 0);
    TextDrawSetProportional(Textdrawstv, 0);
    TextDrawSetShadow(Textdrawstv, 1);
    TextDrawUseBox(Textdrawstv, 1);
    TextDrawBoxColor(Textdrawstv, 255);
    TextDrawTextSize(Textdrawstv, 155.000000, 0.000000);
    CancelSelectTextDraw(playerid);
    }
    return 1;
}
if the code is wrong, give me a basic code so I edit this or help me correct the code


"sorry for my bad english"
Reply


Messages In This Thread
help with OnPlayerClickTextDraw - by Sxriter - 25.03.2012, 01:21
Re: help with OnPlayerClickTextDraw - by freddy smyth - 25.03.2012, 01:28
Re: help with OnPlayerClickTextDraw - by Sxriter - 25.03.2012, 01:34
Re: help with OnPlayerClickTextDraw - by MP2 - 25.03.2012, 02:21
Re : help with OnPlayerClickTextDraw - by Ultrascipter - 25.03.2012, 08:16
Re: help with OnPlayerClickTextDraw - by Sxriter - 25.03.2012, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)