Guest User

Untitled

a guest
Jul 8th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. if(strcmp(cmd, "/makeleader", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. tmp = strtok(cmdtext, idx);
  6. if(!strlen(tmp))
  7. {
  8. SendClientMessage(playerid, COLOR_GRAD2, "Koristete: /makeleader [ID/Ime na Igracot] [Broj(1-17)]");
  9. SendClientMessage(playerid, COLOR_RED, "|_________________________________________________________________________________|");
  10. SendClientMessage(playerid, 0x33CCFFAA, "1-Police Departament, 2-Makedonsko Biro za Istrazuvanje, 4-Medical Department,");
  11. SendClientMessage(playerid, 0x33CCFFAA, "5-The Russian Mafia, 6-The Escobar Cartel, 7-Premier, 8-The Macedonian Mafia.");
  12. SendClientMessage(playerid, 0x33CCFFAA, "9-Kanal 7, 10-Los Santos Taxi, 15-Vagos, 16-Grove Street Family.");
  13. SendClientMessage(playerid, COLOR_RED, "|_________________________________________________________________________________|");
  14. return 1;
  15. }
  16. new para1;
  17. new level;
  18. para1 = ReturnUser(tmp);
  19. tmp = strtok(cmdtext, idx);
  20. level = strval(tmp);
  21. if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Nemozete pod 0 ili nad 17!"); return 1; }
  22. if (PlayerInfo[playerid][pAdmin] >= 5)
  23. {
  24. if(IsPlayerConnected(para1))
  25. {
  26. if(para1 != INVALID_PLAYER_ID)
  27. {
  28. if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
  29. {
  30. SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Toj igrac e clen na nekoja organizacija !");
  31. return 1;
  32. }
  33. GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  34. GetPlayerName(playerid, sendername, sizeof(sendername));
  35. PlayerInfo[para1][pLeader] = level;
  36. format(string, sizeof(string), "Admin %s vi dade Lider na Organizacija ID %d.", sendername,level);
  37. SendClientMessage(para1, COLOR_LIGHTRED, string);
  38. format(string, sizeof(string), "Postaveni ste %s za Lider na Organizacijata ID %d.", giveplayer,level);
  39. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  40. if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; }
  41. else if(level == 1) { PlayerInfo[para1][pChar] = 265; PlayerInfo[para1][pModel] = 265; }//Police Department
  42. else if(level == 2) { PlayerInfo[para1][pChar] = 295; PlayerInfo[para1][pModel] = 295; } //MBI/ATF
  43. else if(level == 4) { PlayerInfo[para1][pChar] = 70; PlayerInfo[para1][pModel] = 70; } //Fire/Ambulance
  44. else if(level == 5) { PlayerInfo[para1][pChar] = 113; PlayerInfo[para1][pModel] = 113; } //Ruska Mafija
  45. else if(level == 6) { PlayerInfo[para1][pChar] = 3; PlayerInfo[para1][pModel] = 3; } //TEC
  46. else if(level == 7) { PlayerInfo[para1][pChar] = 228; PlayerInfo[para1][pModel] = 228; } //Mayor
  47. else if(level == 8) { PlayerInfo[para1][pChar] = 179; PlayerInfo[para1][pModel] = 179; } //The Macedonian Mafia
  48. else if(level == 9) { PlayerInfo[para1][pChar] = 227; PlayerInfo[para1][pModel] = 227; } //News Reporters
  49. else if(level == 10) { PlayerInfo[para1][pChar] = 61; PlayerInfo[para1][pModel] = 61; } //Taxi Cab Company
  50. else if(level == 12) { PlayerInfo[para1][pChar] = 16; PlayerInfo[para1][pModel] = 16; } //Parking Servis
  51. else if(level == 15) { PlayerInfo[para1][pChar] = 110; PlayerInfo[para1][pModel] = 110; } //vagos
  52. else if(level == 16) { PlayerInfo[para1][pChar] = 270; PlayerInfo[para1][pModel] = 270; } //grove
  53. if(level == 0)
  54. {
  55. gTeam[para1] = 3;
  56. PlayerInfo[para1][pTeam] = 3;
  57. }
  58. else if(level == 1 || level == 2 || level == 3)
  59. {
  60. gTeam[para1] = 2;
  61. PlayerInfo[para1][pTeam] = 2;
  62. }
  63. else if(level == 4)
  64. {
  65. gTeam[para1] = 1;
  66. PlayerInfo[para1][pTeam] = 1;
  67. }
  68. else
  69. {
  70. gTeam[para1] = 15;
  71. PlayerInfo[para1][pTeam] = 15;
  72. }
  73.  
  74. SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
  75.  
  76. if(level == 0)
  77. {
  78. PlayerInfo[para1][pRank] = 0;
  79. }
  80. else
  81. {
  82. PlayerInfo[para1][pRank] = 6;
  83. }
  84. }
  85. }
  86. }
  87. else
  88. {
  89. SendClientMessage(playerid, COLOR_GRAD1, " Ne ste ovlasteni za da ja koristite ovaa komanda!");
  90. }
  91. }
  92. return 1;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment