[SOLVED] - 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: [SOLVED] (
/showthread.php?tid=147261)
[SOLVED] -
DJDhan - 11.05.2010
SOLVED it by myself
Re: TextDraw showing a variable? -
[HiC]TheKiller - 11.05.2010
https://sampwiki.blast.hk/wiki/TextDrawSetString
Re: EDIT: Textdrawsetstring problem -
DJDhan - 11.05.2010
But now i have another problem. I have editied the question.
Re: EDIT: Textdrawsetstring problem -
Rac3r - 11.05.2010
You are setting the string for the textdraw 500 times (MAX_PLAYERS).
TextDrawSetString(NoAtt, newtext);
TextDrawShowForAll(NoAtt);
format(newtext, sizeof(newtext),"%d", numberteam1);
TextDrawSetString(NoDeff, newtext);
TextDrawShowForAll(NoDeff);
format(newtext, sizeof(newtext),"%d", numberteam2);
Code above should only be done once, not for every player. Use the ++ counter in the loop, but only format the string once (just before the return 1
EDIT: Also remove the return 1; from the loops, otherwise as soon as it finds a player, it will stop the loop.
Re: EDIT: no of players in each team problem -
DJDhan - 11.05.2010
--