SA-MP Forums Archive
I have a problem.. - 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: I have a problem.. (/showthread.php?tid=244952)



I have a problem.. - [Ha]Lommo - 29.03.2011

Well i have a problem, i have a mode with stats. This stats get shown after every round.
The problem is that if i use it with a clientmessage it shows all players, but when i use it in a textdraw it only shows the first id.. How to fix this? thanks..


Re: I have a problem.. - Medal Of Honor team - 29.03.2011

did you loop through all the players?


Re: I have a problem.. - [Ha]Lommo - 29.03.2011

I guess, else it wouldn't show each player by SendClientMessage, or am i wrong?


Re: I have a problem.. - [Ha]Lommo - 29.03.2011

Someone?


Re: I have a problem.. - Hornet600 - 29.03.2011

for(new i; i < MAX_PLAYERS; i++)
{
// SendClientMessage(i,color,message);
}


Re: I have a problem.. - [Ha]Lommo - 29.03.2011

Lol, read my question again..


Re: I have a problem.. - Hornet600 - 29.03.2011

loop the textdraws. the sendmessage was a exemple of a loop.


Re: I have a problem.. - [Ha]Lommo - 29.03.2011

how to? can u give me an better example? thanks..


Re: I have a problem.. - Hornet600 - 29.03.2011

alright give me a second


Re: I have a problem.. - Hornet600 - 29.03.2011

pawn Код:
for(new e; e < MAX_PLAYERS; e++) // this will make the textdraw loop over all players ;)
{
    // now we create a variable to store the textdraw like this one and we put it in action x)
    new Text:welcomeText;
    welcomeText = TextDrawCreate(240.0,580.0,"your test goes here :)");
    // now you show the textdraw to all the players with it
    TextDrawShowForPlayer(e,welcomeText);   // the "e" loops playerid to all players


}