01.06.2012, 21:02
Quote:
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;
}
-FalconX