Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dialog:Faction(playerid, response, listitem, inputtext[]) {
- if(response)
- {
- new factionid = PlayerData[playerid][pFaction];
- if(listitem == 0)
- {
- if (factionid == -1)
- return SendErrorMessage(playerid, "You are not a member of faction.");
- new str[1024], aktifuyeler[1024], sayi;
- foreach (new i : Player) if (PlayerData[i][pFaction] == factionid) {
- format(str, sizeof(str), "{72C425}[ID: %d] {FFFFFF}%s - %s{A80B0B} [NR Tel: %d] (%d)\n", i, ReturnName(i, 0), Faction_GetRank(i), PlayerData[i][pPhone]);
- strcat(aktifuyeler, str);
- sayi++;
- }
- if(sayi == 0)
- {
- SendErrorMessage(playerid, "No Active Members.");
- cmd_faction(playerid, "\1");
- return 1;
- }
- Dialog_Show(playerid, GangBack, DIALOG_STYLE_MSGBOX, "{72C425}» Active Members", aktifuyeler, "OK", "<< Inapoi");
- }
- if (!strcmp(inputtext, "Faction Information"))
- {
- new string[1024], totalplayerstr[1024];
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Name: {59DC1C}%s\n\n", FactionData[factionid][factionName]);
- strcat(string, totalplayerstr);
- new gtip[24];
- if(FactionData[factionid][gTip] == 1) format(gtip, 24, "Gang");
- if(FactionData[factionid][gTip] == 2) format(gtip, 24, "Mafia");
- if(FactionData[factionid][gTip] == 3) format(gtip, 24, "Race");
- if(FactionData[factionid][gTip] == 4) format(gtip, 24, "Legal/Company");
- if(FactionData[factionid][gTip] == 5) format(gtip, 24, "Garage");
- if(FactionData[factionid][gTip] == 6) format(gtip, 24, "Hitman Agency");
- if(FactionData[factionid][factionType] == FACTION_GANG) format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Faction Type: {59DC1C}%s\n", gtip);
- else format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Type: {59DC1C}Private Institution\n\n");
- strcat(string, totalplayerstr);
- if(FactionData[factionid][factionOnay]) format(gtip, 24, "Faction");
- else format(gtip, 24, "Unauthorized Faction");
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Status: {59DC1C}%s\n\n", gtip);
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Members: {59DC1C}%d\n\n", GangMemberNumberCheck(factionid));
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Total Ranks: {59DC1C}%d\n\n", FactionData[factionid][factionRanks]);
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Level: {59DC1C}%d\n\n", FactionData[factionid][factionBKS]);
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Buying Level: {59DC1C}%d\n\n", FactionData[factionid][factionBAS]);
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}OOC Chat Level: {59DC1C}%d\n\n", FactionData[factionid][factionBFS]);
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Vehicle Level: {59DC1C}%d\n\n", FactionData[factionid][factionBCS]);
- strcat(string, totalplayerstr);
- if(FactionData[factionid][factionType] == FACTION_GANG)
- {
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Level: {59DC1C}%d\n\n", FactionData[factionid][factionLevel]);
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction EXP {59DC1C}%d/%d\n\n", FactionData[factionid][factionEXP], FactionData[factionid][factionLevel]*75);
- strcat(string, totalplayerstr);
- }
- format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction MOTD: {59DC1C}%s\n\n", FactionData[factionid][factionMOTD]);
- strcat(string, totalplayerstr);
- Dialog_Show(playerid, GangBack, DIALOG_STYLE_MSGBOX, "{72C425}» Faction Information", string, "OK", "<< Inapoi");
- }
- if (!strcmp(inputtext, "Spawn Faction Vehicles"))
- {
- new count;
- if(GetFactionType(playerid) == FACTION_GANG)
- {
- for (new i = 1; i != MAX_VEHICLES; i ++)
- {
- new id = Car_GetID(i);
- if (id != -1 && IsValidVehicle(i) && GetVehicleDriver(i) == INVALID_PLAYER_ID && CarData[id][carGang] == FactionData[PlayerData[playerid][pFaction]][factionID])
- {
- RespawnVehicle(i);
- CarData[id][carDisplay] = true;
- SetVehicleVirtualWorld(i, 0);
- count++;
- }
- }
- }
- else
- {
- for (new i = 1; i != MAX_VEHICLES; i ++)
- {
- new id = Car_GetID(i);
- if (id != -1 && IsValidVehicle(i) && GetVehicleDriver(i) == INVALID_PLAYER_ID && CarData[id][carFaction] == GetFactionType(playerid))
- {
- RespawnVehicle(i);
- count++;
- }
- }
- }
- if (!count)
- return SendErrorMessage(playerid, "No vehicles.");
- SendServerMessage(playerid, "%d vehicle respawned.", count);
- cmd_faction(playerid, "\1");
- }
- if (!strcmp(inputtext, "Quit Group"))
- {
- Dialog_Show(playerid, GangLeave, DIALOG_STYLE_MSGBOX, "{72C425}Quit Group", "Vrei sa parasesti aceasta factiune?", "Da", "Nu");
- }
- if(strfind(inputtext, "Division Names", true) != -1)
- {
- Faction_Divizyon(playerid, factionid);
- }
- if (!strcmp(inputtext, "Rank Authorization"))
- {
- new totalplayerstr[256], string[1024];
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Level of Faction\n");
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Faction Level\n");
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}OOC Channel Level\n");
- strcat(string, totalplayerstr);
- format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Faction Vehicle Level\n");
- strcat(string, totalplayerstr);
- Dialog_Show(playerid, RutbeYetkilendirmesi, DIALOG_STYLE_LIST, "{72C425}» Rank Authorization", string, "Selecteaza", "<< Inapoi");
- }
- if (!strcmp(inputtext, "Change Faction MOTD"))
- {
- new str[256];
- format(str, 256, "{FFFFFF}Write your faction new MOTD:\nCurrent MOTD: {228B22}%s", FactionData[factionid][factionMOTD]);
- Dialog_Show(playerid, BDD, DIALOG_STYLE_INPUT, "{72C425}» Change Faction MOTD", str, "Adjust", "<< Inapoi");
- }
- if (!strcmp(inputtext, "Get in Faction"))
- {
- SendServerMessage(playerid, "Invitation mode active, click on the player you want to invite from TAB (score table)!");
- SetPVarInt(playerid, "BDM", 1);
- }
- if (!strcmp(inputtext, "Change Rank Names"))
- {
- Faction_ShowRanks(playerid, factionid);
- }
- if (!strcmp(inputtext, "Uninvite from Faction"))
- {
- new string[1024], sayi;
- foreach (new i : Player){ if (PlayerData[i][pFaction] == factionid) format(string, sizeof(string), "%s{59DC1C}%d - ID : {FFFFFF}%s (%s)\n", string, i, ReturnName(i), Faction_GetRank(i)); sayi++; }
- if(sayi == 0)
- {
- SendErrorMessage(playerid, "No Active Members.");
- cmd_faction(playerid, "\1");
- return 1;
- }
- Dialog_Show(playerid, GangenAt, DIALOG_STYLE_LIST, "{72C425}» Uninvite from Faction", string, "Uninvite", "{FF6347}Anuleaza");
- }
- if (!strcmp(inputtext, "Offline Members"))
- {
- OfflineMembersFact(playerid, factionid);
- }
- if (!strcmp(inputtext, "Change rank"))
- {
- PlayerData[playerid][pOffRank] = false;
- new string[1024], sayi;
- foreach (new i : Player) { if (PlayerData[i][pFaction] == factionid) format(string, sizeof(string), "%s{59DC1C}%d - ID : {FFFFFF}%s (%s)\n", string, i, ReturnName(i), Faction_GetRank(i)); sayi++; }
- Dialog_Show(playerid, RutbeDegistir, DIALOG_STYLE_LIST, "{72C425}» Change rank", string, "Schimba", "{FF6347}Anuleaza");
- if(sayi == 0)
- {
- SendErrorMessage(playerid, "No Active Members.");
- cmd_faction(playerid, "\1");
- return 1;
- }
- }
- if (!strcmp(inputtext, "Division Change"))
- {
- PlayerData[playerid][pOffDivizyon] = false;
- new string[1024], sayi;
- foreach (new i : Player) { if (PlayerData[i][pFaction] == factionid) format(string, sizeof(string), "%s{59DC1C}%d - ID : {FFFFFF}%s (%s)\n", string, i, ReturnName(i), Faction_GetDivizyon(i)); sayi++; }
- Dialog_Show(playerid, DivizyonDegistir, DIALOG_STYLE_LIST, "{72C425}» Division Change", string, "Schimba", "{FF6347}Anuleaza");
- if(sayi == 0)
- {
- SendErrorMessage(playerid, "No Active Members.");
- cmd_faction(playerid, "\1");
- return 1;
- }
- }
- if (!strcmp(inputtext, "Faction Vehicles"))
- {
- new string[1024], sayi, carid;
- for (new i = 1; i < MAX_VEHICLES; i++) if ((carid = Car_GetID(i)) != -1 && GetFactionByID(CarData[carid][carGang]) == factionid && CarData[carid][carFaction] == 5)
- {
- format(string, sizeof(string), "%s{59DC1C}%d - ID : {59DC1C}Model: {FFFFFF}%s - {59DC1C}Plate: {FFFFFF}%s\n", string, i, ReturnVehicleModelName(GetVehicleModel(i)), CarData[carid][carPlaka]); sayi++;
- }
- if(sayi == 0) return SendErrorMessage(playerid, "This Faction has no vehicles.");
- Dialog_Show(playerid, GangBack, DIALOG_STYLE_LIST, "{72C425}» Faction Vehicles", string, "OK", "<< Inapoi");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment