SA-MP Forums Archive
Can someone help me with this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can someone help me with this? (/showthread.php?tid=164141)



Can someone help me with this? - [MWR]Blood - 30.07.2010

So, I've got a moving textdraw and I tried to make a command to hide it, but it didn't work. When the timer updates the textdraw, it shows again. I tried to kill the timer, again the same.
Here's the simple command:
pawn Код:
if(strcmp(cmdtext,"/hnt",true)==0)
{
TextDrawHideForPlayer(playerid,Ntick);
return 1;
}
Thanks in advance!


Re: Can someone help me with this? - -Rebel Son- - 30.07.2010

Make a variable,

Код:
new hidetxt[MAX_PLAYERS]; //Top of script.
then OnPlayerConnect

Код:
 hidetxt[playerid] = 0;
Then on your update function.

Код:
 if(hidetxt[playerid] == 1)) { return TextDrawHideForPlayer(playerid,Ntick);
EDIT: Lol forgot, on your hide command, put
Код:
 hidetxt[playerid] = 1;