Custura

Untitled

Jun 30th, 2017
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.20 KB | None | 0 0
  1. Dialog:Faction(playerid, response, listitem, inputtext[]) {
  2.  
  3. if(response)
  4. {
  5. new factionid = PlayerData[playerid][pFaction];
  6. if(listitem == 0)
  7. {
  8. if (factionid == -1)
  9. return SendErrorMessage(playerid, "You are not a member of faction.");
  10.  
  11. new str[1024], aktifuyeler[1024], sayi;
  12. foreach (new i : Player) if (PlayerData[i][pFaction] == factionid) {
  13. 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]);
  14. strcat(aktifuyeler, str);
  15. sayi++;
  16. }
  17. if(sayi == 0)
  18. {
  19. SendErrorMessage(playerid, "No Active Members.");
  20. cmd_faction(playerid, "\1");
  21. return 1;
  22. }
  23. Dialog_Show(playerid, GangBack, DIALOG_STYLE_MSGBOX, "{72C425}» Active Members", aktifuyeler, "OK", "<< Inapoi");
  24. }
  25. if (!strcmp(inputtext, "Faction Information"))
  26. {
  27. new string[1024], totalplayerstr[1024];
  28. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Name: {59DC1C}%s\n\n", FactionData[factionid][factionName]);
  29. strcat(string, totalplayerstr);
  30. new gtip[24];
  31. if(FactionData[factionid][gTip] == 1) format(gtip, 24, "Gang");
  32. if(FactionData[factionid][gTip] == 2) format(gtip, 24, "Mafia");
  33. if(FactionData[factionid][gTip] == 3) format(gtip, 24, "Race");
  34. if(FactionData[factionid][gTip] == 4) format(gtip, 24, "Legal/Company");
  35. if(FactionData[factionid][gTip] == 5) format(gtip, 24, "Garage");
  36. if(FactionData[factionid][gTip] == 6) format(gtip, 24, "Hitman Agency");
  37. if(FactionData[factionid][factionType] == FACTION_GANG) format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Faction Type: {59DC1C}%s\n", gtip);
  38. else format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Type: {59DC1C}Private Institution\n\n");
  39. strcat(string, totalplayerstr);
  40. if(FactionData[factionid][factionOnay]) format(gtip, 24, "Faction");
  41. else format(gtip, 24, "Unauthorized Faction");
  42. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Status: {59DC1C}%s\n\n", gtip);
  43. strcat(string, totalplayerstr);
  44. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Members: {59DC1C}%d\n\n", GangMemberNumberCheck(factionid));
  45. strcat(string, totalplayerstr);
  46. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Total Ranks: {59DC1C}%d\n\n", FactionData[factionid][factionRanks]);
  47. strcat(string, totalplayerstr);
  48. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Level: {59DC1C}%d\n\n", FactionData[factionid][factionBKS]);
  49. strcat(string, totalplayerstr);
  50. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Buying Level: {59DC1C}%d\n\n", FactionData[factionid][factionBAS]);
  51. strcat(string, totalplayerstr);
  52. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}OOC Chat Level: {59DC1C}%d\n\n", FactionData[factionid][factionBFS]);
  53. strcat(string, totalplayerstr);
  54. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Vehicle Level: {59DC1C}%d\n\n", FactionData[factionid][factionBCS]);
  55. strcat(string, totalplayerstr);
  56. if(FactionData[factionid][factionType] == FACTION_GANG)
  57. {
  58. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction Level: {59DC1C}%d\n\n", FactionData[factionid][factionLevel]);
  59. strcat(string, totalplayerstr);
  60. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction EXP {59DC1C}%d/%d\n\n", FactionData[factionid][factionEXP], FactionData[factionid][factionLevel]*75);
  61. strcat(string, totalplayerstr);
  62. }
  63. format(totalplayerstr, sizeof(totalplayerstr), "{FFF5EE}Faction MOTD: {59DC1C}%s\n\n", FactionData[factionid][factionMOTD]);
  64. strcat(string, totalplayerstr);
  65. Dialog_Show(playerid, GangBack, DIALOG_STYLE_MSGBOX, "{72C425}» Faction Information", string, "OK", "<< Inapoi");
  66. }
  67. if (!strcmp(inputtext, "Spawn Faction Vehicles"))
  68. {
  69. new count;
  70. if(GetFactionType(playerid) == FACTION_GANG)
  71. {
  72.  
  73. for (new i = 1; i != MAX_VEHICLES; i ++)
  74. {
  75. new id = Car_GetID(i);
  76. if (id != -1 && IsValidVehicle(i) && GetVehicleDriver(i) == INVALID_PLAYER_ID && CarData[id][carGang] == FactionData[PlayerData[playerid][pFaction]][factionID])
  77. {
  78. RespawnVehicle(i);
  79. CarData[id][carDisplay] = true;
  80. SetVehicleVirtualWorld(i, 0);
  81. count++;
  82. }
  83. }
  84. }
  85. else
  86. {
  87. for (new i = 1; i != MAX_VEHICLES; i ++)
  88. {
  89. new id = Car_GetID(i);
  90. if (id != -1 && IsValidVehicle(i) && GetVehicleDriver(i) == INVALID_PLAYER_ID && CarData[id][carFaction] == GetFactionType(playerid))
  91. {
  92. RespawnVehicle(i);
  93. count++;
  94. }
  95. }
  96. }
  97. if (!count)
  98. return SendErrorMessage(playerid, "No vehicles.");
  99.  
  100. SendServerMessage(playerid, "%d vehicle respawned.", count);
  101. cmd_faction(playerid, "\1");
  102. }
  103. if (!strcmp(inputtext, "Quit Group"))
  104. {
  105. Dialog_Show(playerid, GangLeave, DIALOG_STYLE_MSGBOX, "{72C425}Quit Group", "Vrei sa parasesti aceasta factiune?", "Da", "Nu");
  106. }
  107. if(strfind(inputtext, "Division Names", true) != -1)
  108. {
  109. Faction_Divizyon(playerid, factionid);
  110. }
  111. if (!strcmp(inputtext, "Rank Authorization"))
  112. {
  113. new totalplayerstr[256], string[1024];
  114. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Level of Faction\n");
  115. strcat(string, totalplayerstr);
  116. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Faction Level\n");
  117. strcat(string, totalplayerstr);
  118. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}OOC Channel Level\n");
  119. strcat(string, totalplayerstr);
  120. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Faction Vehicle Level\n");
  121. strcat(string, totalplayerstr);
  122. Dialog_Show(playerid, RutbeYetkilendirmesi, DIALOG_STYLE_LIST, "{72C425}» Rank Authorization", string, "Selecteaza", "<< Inapoi");
  123. }
  124. if (!strcmp(inputtext, "Change Faction MOTD"))
  125. {
  126. new str[256];
  127. format(str, 256, "{FFFFFF}Write your faction new MOTD:\nCurrent MOTD: {228B22}%s", FactionData[factionid][factionMOTD]);
  128. Dialog_Show(playerid, BDD, DIALOG_STYLE_INPUT, "{72C425}» Change Faction MOTD", str, "Adjust", "<< Inapoi");
  129. }
  130. if (!strcmp(inputtext, "Get in Faction"))
  131. {
  132. SendServerMessage(playerid, "Invitation mode active, click on the player you want to invite from TAB (score table)!");
  133. SetPVarInt(playerid, "BDM", 1);
  134. }
  135. if (!strcmp(inputtext, "Change Rank Names"))
  136. {
  137. Faction_ShowRanks(playerid, factionid);
  138. }
  139. if (!strcmp(inputtext, "Uninvite from Faction"))
  140. {
  141. new string[1024], sayi;
  142. 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++; }
  143. if(sayi == 0)
  144. {
  145. SendErrorMessage(playerid, "No Active Members.");
  146. cmd_faction(playerid, "\1");
  147. return 1;
  148. }
  149. Dialog_Show(playerid, GangenAt, DIALOG_STYLE_LIST, "{72C425}» Uninvite from Faction", string, "Uninvite", "{FF6347}Anuleaza");
  150. }
  151. if (!strcmp(inputtext, "Offline Members"))
  152. {
  153. OfflineMembersFact(playerid, factionid);
  154. }
  155. if (!strcmp(inputtext, "Change rank"))
  156. {
  157. PlayerData[playerid][pOffRank] = false;
  158. new string[1024], sayi;
  159. 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++; }
  160. Dialog_Show(playerid, RutbeDegistir, DIALOG_STYLE_LIST, "{72C425}» Change rank", string, "Schimba", "{FF6347}Anuleaza");
  161. if(sayi == 0)
  162. {
  163. SendErrorMessage(playerid, "No Active Members.");
  164. cmd_faction(playerid, "\1");
  165. return 1;
  166. }
  167. }
  168. if (!strcmp(inputtext, "Division Change"))
  169. {
  170. PlayerData[playerid][pOffDivizyon] = false;
  171. new string[1024], sayi;
  172. 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++; }
  173. Dialog_Show(playerid, DivizyonDegistir, DIALOG_STYLE_LIST, "{72C425}» Division Change", string, "Schimba", "{FF6347}Anuleaza");
  174. if(sayi == 0)
  175. {
  176. SendErrorMessage(playerid, "No Active Members.");
  177. cmd_faction(playerid, "\1");
  178. return 1;
  179. }
  180. }
  181. if (!strcmp(inputtext, "Faction Vehicles"))
  182. {
  183. new string[1024], sayi, carid;
  184. for (new i = 1; i < MAX_VEHICLES; i++) if ((carid = Car_GetID(i)) != -1 && GetFactionByID(CarData[carid][carGang]) == factionid && CarData[carid][carFaction] == 5)
  185. {
  186. 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++;
  187. }
  188. if(sayi == 0) return SendErrorMessage(playerid, "This Faction has no vehicles.");
  189. Dialog_Show(playerid, GangBack, DIALOG_STYLE_LIST, "{72C425}» Faction Vehicles", string, "OK", "<< Inapoi");
  190. }
  191. }
  192. return 1;
  193. }
Advertisement
Add Comment
Please, Sign In to add comment