[SOLVED] Enable Textdraw when type a command and disable when type the ......
#1

How to Enable Textdraw when type a command and disable when type the same command ??
Reply
#2

create a variable, like:
pawn Code:
new bool:textdrawon[MAX_PLAYERS];
OnPlayerConnect add:

pawn Code:
textdrawon[playerid] = false;
Then in your command add:

pawn Code:
if(textdrawon[playerid] == false)
{
  TextDrawShowForPlayer(...);
  textdrawon[playerid] = true;
}
else if(textdrawon[playerid] == true)
{
  TextDrawHideForPlayer(....);
  textdrawon[playerid] = false;
}
Reply
#3

Quote:
Originally Posted by Scott[LT
]
create a variable, like:
pawn Code:
new bool:textdrawon[MAX_PLAYERS];
OnPlayerConnect add:

pawn Code:
textdrawon[playerid] = false;
Then in your command add:

pawn Code:
if(textdrawon[playerid] == false)
{
  TextDrawShowForPlayer(...);
  textdrawon[playerid] = true;
}
else if(textdrawon[playerid] == true)
{
  TextDrawHideForPlayer(....);
  textdrawon[playerid] = false;
}
ty solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)