Wanted - 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: Wanted (
/showthread.php?tid=88679)
Wanted -
lakierka - 28.07.2009
Hello all. I have command /wanted wich shows all server wanted people. But here is the problem. All people shows in one line and when wanted people are too much line doesn't shows. Can you tell me how to do that people would show in next line? Here is the command:
Код:
if(!strcmp(cmdtext, "/wanted", true))
{
new zin[256] = "* Wanted people:";
new name[MAX_PLAYER_NAME];
for(new i = 0; i <MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && GetPlayerWantedLevel(i)>0){
GetPlayerName(i,name,MAX_PLAYER_NAME);
format(zin,256,"%s %s(%i levels),",zin,name,GetPlayerWantedLevel(i));
}
}
SendClientMessage(playerid,green,zin);
return 1;
}
Re: Wanted -
lakierka - 28.07.2009
So can someone help me?
Re: Wanted -
GTA_Rules - 28.07.2009
Make a check if the size of the string is bigger than something, then use 2 lines.
Re: Wanted -
yezizhu - 28.07.2009
Something wrong in your code.
Move SendClientMessage into the loop.
Re: Wanted -
lakierka - 28.07.2009
Quote:
Originally Posted by Matthias_
Make a check if the size of the string is bigger than something, then use 2 lines.
|
I know that I need to do something like this : if( strlen(zin) > 256) But I can't do it.
Re: Wanted -
Jefff - 28.07.2009
removed
Re: Wanted -
lakierka - 28.07.2009
So nobody can help me?? This is help forum and I'm looking for it.
Re: Wanted -
saiberfun - 28.07.2009
format(
zin,256,"%s %s(%i levels),",
zin,name,GetPlayerWantedLevel(i));
wtf?
how u can use zin in zin?
Re: Wanted -
yezizhu - 28.07.2009
Quote:
Originally Posted by lakierka
So nobody can help me?? This is help forum and I'm looking for it.
|
Hmmm...
Quote:
Originally Posted by yezizhu
Something wrong in your code.
Move SendClientMessage into the loop.
|
Quote:
Originally Posted by saiberfun
format(zin,256,"%s %s(%i levels),",zin,name,GetPlayerWantedLevel(i));
wtf?
how u can use zin in zin?
|
It works, you can test yourself.
Re: Wanted -
lakierka - 29.07.2009
So nobody knows?