Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Comanda in sine
- CMD:members(playerid, params[])
- {
- if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in.");
- if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not member of a faction.");
- new stringg[256], pName2[MAX_PLAYER_NAME], pRankul, pLastLog[128], fString[64];
- mysql_format(handle, stringg, sizeof(stringg), "SELECT * FROM `players` WHERE `Member` = '%d' ORDER BY `Rank` DESC", PlayerInfo[playerid][pMember]);
- new Cache: result12 = mysql_query(handle, stringg);
- gString[128] = (EOS);
- for(new i, j = cache_get_row_count(); i!=j; ++i)
- {
- cache_get_field_content(i,"AName",pName2);
- format(Selected[i][Numele],24,pName2);
- pRankul=cache_get_field_content_int(i,"Rank");
- cache_get_field_content(i,"LastLogin",pLastLog);
- format(fString,sizeof(fString),"Members of {%s}%s{FFFFFF}(%d members)",FactionColor2[i],FactionName[i],FactionMembers(i));
- new conected = GetPlayerID(Selected[i][Numele]);
- if(conected = INVALID_PLAYER_ID)
- {
- format(gString,sizeof(gString),"%s - Rank: %d - {00BC00}online \n",pName2,pRankul);
- }
- else
- {
- format(gString , sizeof(gString),"%s - Rank: %d - {FF0000}offline - {FFFFFF}Ultimul Login %s \n",pName2,pRankul,pLastLog);
- }
- }
- cache_delete(result12);
- ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_STYLE_LIST,fString,gString,"Select","Cancel");
- return 1;
- }
- //========//
- //FactionColor2
- new FactionColor2[11][] = {
- "FFFFFF",
- "2641FE",
- "1E519D",
- "B3F856",
- "C2A2DA",
- "FFFF00",
- "A52A2A",
- "008000",
- "800080",
- "FFA500",
- "4F4F4F"
- };
- //FactionName
- new FactionName[11][] = {
- {"Civilian"},
- {"Police Department"},
- {"FBI"},
- {"Government"},
- {"News Reporters"},
- {"Taxi Cab Company"},
- {"Hitmen Agency"},
- {"The Barzini Family"},
- {"The Paterno Family"},
- {"The Tattaglia Family"},
- {"The Corleone Family"}
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement