Loop Filtering (+REP) [It's quick pls help] - 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: Loop Filtering (+REP) [It's quick pls help] (
/showthread.php?tid=605056)
Loop Filtering (+REP) [It's quick pls help] -
Lirbo - 13.04.2016
Whenever i'm using the command /conline it shows 1000 messages with "[] (ID: X)"
What should I do?
PHP код:
CMD:conline(playerid,params[]){
LoggedCMD
if(!strcmp(DB[param[0]][Clan],"None")) return MSG(playerid,C_RED,"[Error] {FF9999}You're not a clan member.");
format(String,sizeof(String),"---------------- [%s] ----------------",DB[playerid][Clan]);
MSG(playerid,C_NICE,String);
for(new i=0;i<MAX_PLAYERS;i++){
if(!strcmp(DB[i][Clan],DB[playerid][Clan])){
format(String,sizeof(String),"[%s] %s (ID: %i)",DB[i][CRank],GetName(i),i);
MSG(playerid,C_NICE2,String);}}
return 1;}
Re: Loop Filtering (+REP) [It's quick pls help] -
UltraScripter - 13.04.2016
PHP код:
CMD:conline(playerid,params[]){
LoggedCMD
if(!strcmp(DB[param[0]][Clan],"None")) return MSG(playerid,C_RED,"[Error] {FF9999}You're not a clan member.");
format(String,sizeof(String),"---------------- [%s] ----------------",DB[playerid][Clan]);
MSG(playerid,C_NICE,String);
for(new i=0;i<MAX_PLAYERS;i++){
if(!strcmp(DB[i][Clan],DB[playerid][Clan])){
format(String,sizeof(String),"[%s] %s (ID: %i)",DB[i][CRank],GetName(i),i);
if(i == playerid){
MSG(playerid,C_NICE2,String);}}}
return 1;}
Re: Loop Filtering (+REP) [It's quick pls help] -
BiosMarcel - 13.04.2016
PHP код:
CMD:conline(playerid,params[])
{
LoggedCMD
if(!strcmp(DB[param[0]][Clan],"None")) return MSG(playerid,C_RED,"[Error] {FF9999}You're not a clan member.");
format(String,sizeof(String),"---------------- [%s] ----------------",DB[playerid][Clan]);
MSG(playerid,C_NICE,String);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerOnline(i))
{
if(!strcmp(DB[i][Clan],DB[playerid][Clan]))
{
format(String,sizeof(String),"[%s] %s (ID: %i)",DB[i][CRank],GetName(i),i);
MSG(playerid,C_NICE2,String);
}
}
}
return 1;
}
@UltraScripter You seem to be drunk when i look at your reply...
@Lirbo I have made a mistake i wrote "isPlayerOnline" instead of "IsPlayerOnline", i am used to the first letter of a function being a lowercase letter.
Re: Loop Filtering (+REP) [It's quick pls help] -
Lirbo - 13.04.2016
Ty m8