Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:faction(playerid, params[])
- {
- new factionid = PlayerData[playerid][pFaction];
- new rutbe = PlayerData[playerid][pFactionRank];
- if (factionid == -1)
- return SendErrorMessage(playerid, "Now you are not a member of any faction.");
- new string[1024], totalplayerstr[1024];
- strcat(string, "Name\tStatus\n");
- new totalnumberstr;
- foreach(new i : Player)
- {
- if(factionid == PlayerData[i][pFaction]) totalnumberstr++;
- }
- format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Active Members\tTotal {59DC1C}%d\n", totalnumberstr);
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Faction Information\n");
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Quit Group\n");
- strcat(string, totalplayerstr);
- if (PlayerData[playerid][pFactionRank] == FactionData[PlayerData[playerid][pFaction]][factionRanks] || FactionData[factionid][factionBAS] < rutbe)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Invite in faction\n");
- strcat(string, totalplayerstr);
- }
- if (FactionData[factionid][factionBKS] <= rutbe)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Uninvite from faction\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Change Rank Names\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Offline Members\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Change rank\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1 && GetFactionType(playerid) != FACTION_GANG)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Division Change\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Rank Authorization\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1 && GetFactionType(playerid) != FACTION_GANG)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Edit Division Names\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Spawn Faction Vehicles\n");
- strcat(string, totalplayerstr);
- }
- if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Change Faction MOTD\n");
- strcat(string, totalplayerstr);
- }
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Faction Vehicles\n");
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{72C425}ยป Faction {FFF5EE} - #%d - %s", factionid, FactionData[factionid][factionName]);
- Dialog_Show(playerid, Faction, DIALOG_STYLE_TABLIST_HEADERS, totalplayerstr, string, "Selecteaza", "{FF6347}Anuleaza");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment