Textdraw never dissappeares.. what am I doing wrong? - 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)
+--- Thread: Textdraw never dissappeares.. what am I doing wrong? (
/showthread.php?tid=376625)
Textdraw never dissappeares.. what am I doing wrong? -
_Khaled_ - 11.09.2012
http://pastebin.com/0BuCmHyK
Title and link explain it all :/
What have I done wrong?
Re: Textdraw never dissappeares.. what am I doing wrong? -
ddnbb - 11.09.2012
Try making all the textdraws for players, not global textdraws. It should fix the problem.
Re: Textdraw never dissappeares.. what am I doing wrong? -
_Khaled_ - 11.09.2012
what do you mean?
Re: Textdraw never dissappeares.. what am I doing wrong? -
ddnbb - 11.09.2012
pawn Код:
new Text:Textdraw0[MAX_PLAYERS];
pawn Код:
for(new i = 0; i<MAX_PLAYERS; i++) // Under OnGameModeInit.
{
Textdraw0[i] = TextDrawCreate(30.000000, 119.000000, "Law commands:");
TextDrawBackgroundColor(Textdraw0[i], 255);
TextDrawFont(Textdraw0[i], 1);
TextDrawLetterSize(Textdraw0[i], 0.430000, 1.000000);
TextDrawColor(Textdraw0[i], 16777215);
TextDrawSetOutline(Textdraw0[i], 0);
TextDrawSetProportional(Textdraw0[i], 1);
TextDrawSetShadow(Textdraw0[i], 1);
TextDrawUseBox(Textdraw0[i], 1);
TextDrawBoxColor(Textdraw0[i], 75);
TextDrawTextSize(Textdraw0[i], 158.000000, 0.000000);
}
pawn Код:
TextDrawHideForPlayer(playerid, Textdraw[playerid]);
Also you can remove show textdraw things under OnPlayerSpawn, as you create them already under OnGameModeInit. Hope this helps.
Re: Textdraw never dissappeares.. what am I doing wrong? -
_Khaled_ - 11.09.2012
doesn't seem to be working..
Re: Textdraw never dissappeares.. what am I doing wrong? -
_Khaled_ - 11.09.2012
Fixed it