13.09.2016, 18:15
Hello ,how can i fix this command? ,every time I type the command /sampmembers, appear only players who have rank 6
CMD:
Sorry for my bad english ...
CMD:
Код:
CMD:sampmembers(playerid, params[]) { SendClientMessage(playerid, COLOR_CYAN, " "); SendClientMessage(playerid, COLOR_CYAN, "_______ |- Online [SA:MP] Members -| _______"); SendClientMessage(playerid, COLOR_CYAN, " "); new count = 0; for(new i = 0; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; if(!pData[i][pFaction]) continue; new pname[MAX_PLAYER_NAME], gg[70]; GetPlayerName(i, pname, sizeof(pname)); if(pData[i][pFaction] == 1 || pData[i][pFacrank] == 1) { format(gg, sizeof(gg), "|| %s (ID:%i) || Rank: 1 || Godfather ||", GetName(i), i); } else if(pData[i][pFaction] == 1 || pData[i][pFacrank] == 2) { format(gg, sizeof(gg), "|| %s (ID:%i) || Rank: 2 || Godfather ||", GetName(i), i); } if(pData[i][pFaction] == 1 || pData[i][pFacrank] == 3) { format(gg, sizeof(gg), "|| %s (ID:%i) || Rank: 3 || Godfather ||", GetName(i), i); } if(pData[i][pFaction] == 1 || pData[i][pFacrank] == 4) { format(gg, sizeof(gg), "|| %s (ID:%i) || Rank: 4 || Godfather ||", GetName(i), i); } if(pData[i][pFaction] == 1 || pData[i][pFacrank] == 5) { format(gg, sizeof(gg), "|| %s (ID:%i) || Rank: 5 || Godfather ||", GetName(i), i); } if(pData[i][pFaction] == 1 || pData[i][pFacrank] == 6) { format(gg, sizeof(gg), "|| %s (ID:%i) || Rank: 6 || Godfather ||", GetName(i), i); } else { SendClientMessage(playerid, COLOR_RED, "No [SA:MP] Member Online"); } count++; SendClientMessage(playerid, COLOR_LIGHTBLUE, gg); } if(!count) SendClientMessage(playerid, COLOR_RED, "No [SA:MP] Member Online"); SendClientMessage(playerid, COLOR_CYAN, "_________________________________________"); return 1; }