HELP !!
#2

Quote:
Originally Posted by teomakedonija
Посмотреть сообщение
How to create this Textdraw http://zaslike.com/files/8ajbmy95y9cotb2xovr.png for level up 1 minute 1+ EXP 650 EXP for level 2 how to create to switching EXP and Command?
pawn Код:
// at the top
new F_IsTextDrawShowing[MAX_PLAYERS];//top

new Text:YOURTEXTDRAW; //top

YOURTEXTDRAW = TextDrawCreate(..); // gamemode init

TextDrawHideForAll(YOURTEXTDRAW); // On Gamemode exit
TextDrawDestroy(YOURTEXTDRAW); // on gamemode exit


F_IsTextDrawShowing[playerid] = 0; // OnPlayerConnect

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/yourcommand"))
    {
        if(F_IsTextDrawShowing[playerid] == 1)
        {
            F_IsTextDrawShowing[playerid] = 0;
            TextDrawHideForPlayer(playerid, YOURTEXTDRAW);
        }
        else
        {
            F_IsTextDrawShowing[playerid] = 1;
            TextDrawShowForPlayer(playerid, YOURTEXTDRAW);
        }
    }
    return 1;
}

//if you are using ZCMD:--

CMD:yourcommand( playerid, params[ ] )
{
    if(F_IsTextDrawShowing[playerid] == 1)
    {
        F_IsTextDrawShowing[playerid] = 0;
        TextDrawHideForPlayer(playerid, YOURTEXTDRAW);
    }
    else
    {
        F_IsTextDrawShowing[playerid] = 1;
        TextDrawShowForPlayer(playerid, YOURTEXTDRAW);
    }
    return 1;
}
This is an example of hiding and showing your textdraw with the command.
-FalconX
Reply


Messages In This Thread
HELP !! - by teomakedonija - 01.06.2012, 17:29
Re: HELP !! - by FalconX - 01.06.2012, 21:02

Forum Jump:


Users browsing this thread: 1 Guest(s)