Custura

Untitled

Jun 30th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. CMD:faction(playerid, params[])
  2. {
  3. new factionid = PlayerData[playerid][pFaction];
  4. new rutbe = PlayerData[playerid][pFactionRank];
  5.  
  6. if (factionid == -1)
  7. return SendErrorMessage(playerid, "Now you are not a member of any faction.");
  8.  
  9. new string[1024], totalplayerstr[1024];
  10. strcat(string, "Name\tStatus\n");
  11. new totalnumberstr;
  12. foreach(new i : Player)
  13. {
  14. if(factionid == PlayerData[i][pFaction]) totalnumberstr++;
  15. }
  16. format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Active Members\tTotal {59DC1C}%d\n", totalnumberstr);
  17. strcat(string, totalplayerstr);
  18. format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Faction Information\n");
  19. strcat(string, totalplayerstr);
  20. format(totalplayerstr, sizeof(totalplayerstr), "{E42020}Quit Group\n");
  21. strcat(string, totalplayerstr);
  22. if (PlayerData[playerid][pFactionRank] == FactionData[PlayerData[playerid][pFaction]][factionRanks] || FactionData[factionid][factionBAS] < rutbe)
  23. {
  24. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Invite in faction\n");
  25. strcat(string, totalplayerstr);
  26. }
  27. if (FactionData[factionid][factionBKS] <= rutbe)
  28. {
  29. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Uninvite from faction\n");
  30. strcat(string, totalplayerstr);
  31. }
  32. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
  33. {
  34. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Change Rank Names\n");
  35. strcat(string, totalplayerstr);
  36. }
  37. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
  38. {
  39. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Offline Members\n");
  40. strcat(string, totalplayerstr);
  41. }
  42. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
  43. {
  44. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Change rank\n");
  45. strcat(string, totalplayerstr);
  46. }
  47. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1 && GetFactionType(playerid) != FACTION_GANG)
  48. {
  49. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Division Change\n");
  50. strcat(string, totalplayerstr);
  51. }
  52. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
  53. {
  54. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Rank Authorization\n");
  55. strcat(string, totalplayerstr);
  56. }
  57. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1 && GetFactionType(playerid) != FACTION_GANG)
  58. {
  59. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Edit Division Names\n");
  60. strcat(string, totalplayerstr);
  61. }
  62. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
  63. {
  64. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Spawn Faction Vehicles\n");
  65. strcat(string, totalplayerstr);
  66. }
  67. if (PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionRanks] - 1)
  68. {
  69. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Change Faction MOTD\n");
  70. strcat(string, totalplayerstr);
  71. }
  72. format(totalplayerstr, sizeof(totalplayerstr), "{FFFFFF}Faction Vehicles\n");
  73. strcat(string, totalplayerstr);
  74. format(totalplayerstr, sizeof(totalplayerstr), "{72C425}ยป Faction {FFF5EE} - #%d - %s", factionid, FactionData[factionid][factionName]);
  75. Dialog_Show(playerid, Faction, DIALOG_STYLE_TABLIST_HEADERS, totalplayerstr, string, "Selecteaza", "{FF6347}Anuleaza");
  76. return 1;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment