bug in textdraw if shows up
#1

hello how are you ?
i found this code in samp fourm but its work good for only 1 player if 2 player has joined and if player 1 showsup a textdraw (like /stats) and it wil shows up correctly and if player 1 use /stats again it will off but the problem is if player 1 has already used stats and if 2 at the same time shows up textdraw using /stats , and if player 1 wants to turn off textdraw and do /stats the textdraw wont off for him and player2 as well

PHP код:
create a variablelike:
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;

i did used for(new i=0; i<=MAX_PLAYERS; i++) but i dont know how to use it correctly or is there any otehr way to solve it !

p.s : i will goto english class room
Reply
#2

no one can help me ? ~g~ !
Reply
#3

Quote:
Originally Posted by dash5487
Посмотреть сообщение
no one can help me ? ~g~ !
Not when you bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)