SA-MP Forums Archive
Textdraw stays stuck in ID 1's screen or higher id's - 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: Textdraw stays stuck in ID 1's screen or higher id's (/showthread.php?tid=147755)



Textdraw stays stuck in ID 1's screen or higher id's - ~Dangun! - 14.05.2010

title says all, i have used timers to hide the textdraw after 3 seconds but it isn't working for id 1 or higher, it only goes away from id 0


Re: Textdraw stays stuck in ID 1's screen or higher id's - RenisiL - 14.05.2010

added down
Код:
forward TimeTextForPlayer(playerid, Text:textas, time);
public TimeTextForPlayer(playerid, Text:textas, time)
{
	TextDrawShowForPlayer(playerid,textas);
	SetTimerEx("DestroyTextTimer",time,0,"i",_:textas);
}
forward DestroyTextTimer(Text:textas);
public DestroyTextTimer(Text:textas)
{
	TextDrawDestroy(textas);
}
and use

TimeTextForPlayer(playerid, your textdraw name, time);


Re: Textdraw stays stuck in ID 1's screen or higher id's - Babul - 14.05.2010

check your arrays you used for each players like
Код:
for(ID=0;ID<MAX_PLAYERS;ID++)
{
HideTextDraw(ID,Textdraw[ID]);
}
the reason for the textdraw not working for IDs higher than 0 indicates that the pointer (ID here) points to 0 always.
make sure it gets count up by inserting a
Код:
new string[64];
format(string,sizeof(string),"hide textdraw for player id %d",ID);
SendClientMessage(ID,0xff7f7fff,string);
into that loop, its easier to ckeck out if that variable counts up...