- 0
Problema /members
-
Similar Content
-
- 6 replies
- 305 views
-
- 4 replies
- 274 views
-
- 1 answer
- 549 views
-
- 3 answers
- 427 views
-
- 3 replies
- 221 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
TheGodfather
Salut, uneori nu imi arata toti membrii din factiune aici.
YCMD:members(playerid, params[], help) return ShowFactionMembers(playerid);
ShowFactionMembers(playerid) {
if(aspam[playerid] > 0) return SCMf(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
if(PlayerInfo[playerid][pMember] == 0) return 1;
gQuery[0] = EOS;
mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `users`.`Member` = '%d' ORDER BY `users`.`Rank` DESC LIMIT 50", PlayerInfo[playerid][pMember]);
mysql_tquery(SQL, gQuery, "show_faction_members", "i", playerid);
return 1;
}
function show_faction_members(playerid) {
new MemberString[1024], TitleString[1024], name[MAX_PLAYER_NAME], lastl[32], rank, fw, tmembers, onmembers, days, member, commands;
strcat(MemberString, "#. Name\tRank - FW\tDays - Raport Points\tStatus\n");
for(new i, j = cache_num_rows(); i != j; ++i) {
cache_get_field_content(i, "name", name);
cache_get_field_content(i, "lastOn", lastl);
rank = cache_get_field_content_int(i, "Rank");
fw = cache_get_field_content_int(i, "FWarn");
days = cache_get_field_content_int(i, "Days");
member = cache_get_field_content_int(i, "Member");
commands = cache_get_field_content_int(i, "Commands0");
if(strlen(lastl) != 9) {
format(Selected[playerid][tmembers], MAX_PLAYER_NAME, name);
new userID = GetPlayerID(name);
gString[0] = EOS;
if(userID == INVALID_PLAYER_ID) onmembers++;
if(rank == 7)
format(gString, sizeof(gString), "%d. %s\t%d - %d/3\t%d - %d/10\t%s\n", tmembers+1, name, rank, fw, days, commands, userID != INVALID_PLAYER_ID ? "Online" : lastl);
else
format(gString, sizeof(gString), "%d. %s\t%d - %d/3\t%d - %d/%d\t%s\n", tmembers+1, name, rank, fw, days, commands, DynamicFactions[member][fCommands][rank - 1], userID != INVALID_PLAYER_ID ? "Online" : lastl);
strcat(MemberString, gString, sizeof(MemberString));
tmembers++;
}
}
format(TitleString, sizeof(TitleString), "Members");
ShowPlayerDialog(playerid, DIALOG_MEMBERS, DIALOG_STYLE_TABLIST_HEADERS, TitleString, MemberString, "Ok", "Exit");
return 1;
}
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.