Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.37 KB | None | 0 0
  1. CMD:setsec(playerid, params[])
  2. {
  3. if(PlayerInfo[playerid][pAdmin] >= 100000 || PlayerInfo[playerid][pAP] >= 2)
  4. {
  5. new giveplayerid, task[8], string[128];
  6. if(sscanf(params, "us[8]", giveplayerid, task))
  7. {
  8. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setsec [player] [secondary task]");
  9. SendClientMessage(playerid, COLOR_WHITE, "Secondary Tasks: FMod GMod SO BA, ST, SST, PR, HR, Sec");
  10. SendClientMessage(playerid, COLOR_WHITE, "Secondary Tasks: DoFM, DoGM, DoSO, DoBA, DoCR, DoPR, DoAP");
  11. return 1;
  12. }
  13. if(giveplayerid != INVALID_PLAYER_ID)
  14. {
  15. if(PlayerInfo[giveplayerid][pAdmin] > 2)
  16. {
  17. if(strcmp(task, "fmod", true) == 0)
  18. {
  19. if(PlayerInfo[giveplayerid][pFactionModerator] == 0)
  20. {
  21. PlayerInfo[giveplayerid][pFactionModerator] = 1;
  22. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Faction Moderator");
  23. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Faction Moderator");
  24. format(string, sizeof(string), "%s has given Faction Moderator to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  25. Log("logs/admin.log", string);
  26. }
  27. else
  28. {
  29. PlayerInfo[giveplayerid][pFactionModerator] = 0;
  30. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Faction Moderator");
  31. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Faction Moderator taken");
  32. format(string, sizeof(string), "%s has taken Faction Moderator from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  33. Log("logs/admin.log", string);
  34. }
  35. }
  36. if(strcmp(task, "dofm", true) == 0)
  37. {
  38. if(PlayerInfo[giveplayerid][pFactionModerator] == 0 || PlayerInfo[giveplayerid][pFactionModerator] == 1)
  39. {
  40. PlayerInfo[giveplayerid][pFactionModerator] = 2;
  41. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Faction Management");
  42. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Faction Management");
  43. format(string, sizeof(string), "%s has given Director of Faction Management to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  44. Log("logs/admin.log", string);
  45. }
  46. else
  47. {
  48. PlayerInfo[giveplayerid][pFactionModerator] = 0;
  49. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Faction Management");
  50. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Faction Management taken");
  51. format(string, sizeof(string), "%s has taken Director of Faction Management from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  52. Log("logs/admin.log", string);
  53. }
  54. }
  55. else if(strcmp(task, "gmod", true) == 0)
  56. {
  57. if(PlayerInfo[giveplayerid][pGangModerator] == 0)
  58. {
  59. PlayerInfo[giveplayerid][pGangModerator] = 1;
  60. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Gang Moderator");
  61. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Gang Moderator");
  62. format(string, sizeof(string), "%s has given Gang Moderator to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  63. Log("logs/admin.log", string);
  64. }
  65. else
  66. {
  67. PlayerInfo[giveplayerid][pGangModerator] = 0;
  68. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Gang Moderator");
  69. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Gang Moderator taken");
  70. format(string, sizeof(string), "%s has taken Gang Moderator from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  71. Log("logs/admin.log", string);
  72. }
  73.  
  74. }
  75. else if(strcmp(task, "dogm", true) == 0)
  76. {
  77. if(PlayerInfo[giveplayerid][pGangModerator] == 0 || PlayerInfo[giveplayerid][pGangModerator] == 1)
  78. {
  79. PlayerInfo[giveplayerid][pGangModerator] = 2;
  80. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Gang Management");
  81. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Gang Management");
  82. format(string, sizeof(string), "%s has given Director of Gang Management to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  83. Log("logs/admin.log", string);
  84. }
  85. else
  86. {
  87. PlayerInfo[giveplayerid][pGangModerator] = 0;
  88. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Gang Management");
  89. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Gang Management taken");
  90. format(string, sizeof(string), "%s has taken Director of Gang Management from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  91. Log("logs/admin.log", string);
  92. }
  93.  
  94. }
  95. else if(strcmp(task, "so", true) == 0)
  96. {
  97. if(PlayerInfo[giveplayerid][pUndercover] == 0)
  98. {
  99. PlayerInfo[giveplayerid][pUndercover] = 1;
  100. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Special Operative");
  101. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Special Operative");
  102. format(string, sizeof(string), "%s has given Special Operative to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  103. Log("logs/admin.log", string);
  104. }
  105. else
  106. {
  107. PlayerInfo[giveplayerid][pUndercover] = 0;
  108. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Special Operative");
  109. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Special Operative permissions taken");
  110. format(string, sizeof(string), "%s has taken Special Operative permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  111. Log("logs/admin.log", string);
  112. }
  113. }
  114. else if(strcmp(task, "doso", true) == 0)
  115. {
  116. if(PlayerInfo[giveplayerid][pUndercover] == 0 || PlayerInfo[giveplayerid][pUndercover] == 1)
  117. {
  118. PlayerInfo[giveplayerid][pUndercover] = 2;
  119. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Special Operations");
  120. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Special Operations");
  121. format(string, sizeof(string), "%s has given Director of Special Operations to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  122. Log("logs/admin.log", string);
  123. }
  124. else
  125. {
  126. PlayerInfo[giveplayerid][pUndercover] = 0;
  127. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Special Operations");
  128. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Special Operations permissions taken");
  129. format(string, sizeof(string), "%s has taken Director of Special Operations permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  130. Log("logs/admin.log", string);
  131. }
  132. }
  133. else if(strcmp(task, "ba", true) == 0)
  134. {
  135. if(PlayerInfo[giveplayerid][pBanAppealer] == 0)
  136. {
  137. PlayerInfo[giveplayerid][pBanAppealer] = 1;
  138. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Ban Appealer");
  139. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Ban Appealer");
  140. format(string, sizeof(string), "%s has given Ban Appealer to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  141. Log("logs/admin.log", string);
  142. }
  143. else
  144. {
  145. PlayerInfo[giveplayerid][pBanAppealer] = 0;
  146. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Ban Appealer");
  147. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Ban Appealer taken");
  148. format(string, sizeof(string), "%s has taken Ban Appealer from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  149. Log("logs/admin.log", string);
  150. }
  151. }
  152. else if(strcmp(task, "doba", true) == 0)
  153. {
  154. if(PlayerInfo[giveplayerid][pBanAppealer] == 0 || PlayerInfo[giveplayerid][pBanAppealer] == 1)
  155. {
  156. PlayerInfo[giveplayerid][pBanAppealer] = 2;
  157. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Ban Appeals");
  158. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Ban Appeals");
  159. format(string, sizeof(string), "%s has given Director of Ban Appeals to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  160. Log("logs/admin.log", string);
  161. }
  162. else
  163. {
  164. PlayerInfo[giveplayerid][pBanAppealer] = 0;
  165. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Ban Appeals");
  166. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Ban Appeals taken");
  167. format(string, sizeof(string), "%s has taken Director of Ban Appeals from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  168. Log("logs/admin.log", string);
  169. }
  170. }
  171. else if(strcmp(task, "st", true) == 0)
  172. {
  173. if(PlayerInfo[giveplayerid][pShopTech] == 0)
  174. {
  175. PlayerInfo[giveplayerid][pShopTech] = 1;
  176. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Shop Technician");
  177. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Shop Technician");
  178. format(string, sizeof(string), "%s has given Shop Technician to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  179. Log("logs/admin.log", string);
  180. }
  181. else
  182. {
  183. PlayerInfo[giveplayerid][pShopTech] = 0;
  184. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Shop Technician");
  185. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Shop Technician taken");
  186. format(string, sizeof(string), "%s has taken Shop Technician from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  187. Log("logs/admin.log", string);
  188. }
  189. }
  190. else if(strcmp(task, "sst", true) == 0)
  191. {
  192. if(PlayerInfo[giveplayerid][pShopTech] == 0 || PlayerInfo[giveplayerid][pShopTech] == 1)
  193. {
  194. PlayerInfo[giveplayerid][pShopTech] = 2;
  195. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Senior Shop Technician");
  196. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Senior Shop Technician");
  197. format(string, sizeof(string), "%s has given Senior Shop Technician to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  198. Log("logs/admin.log", string);
  199. }
  200. else
  201. {
  202. PlayerInfo[giveplayerid][pShopTech] = 0;
  203. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Senior Shop Technician");
  204. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Senior Shop Technician taken");
  205. format(string, sizeof(string), "%s has taken Senior Shop Technician from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  206. Log("logs/admin.log", string);
  207. }
  208. }
  209. else if(strcmp(task, "docr", true) == 0)
  210. {
  211. if(PlayerInfo[giveplayerid][pShopTech] == 0 || PlayerInfo[giveplayerid][pShopTech] == 1 || PlayerInfo[giveplayerid][pShopTech] == 2)
  212. {
  213. PlayerInfo[giveplayerid][pShopTech] = 3;
  214. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Customer Relations");
  215. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Customer Relations");
  216. format(string, sizeof(string), "%s has given Senior Director of Customer Relations to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  217. Log("logs/admin.log", string);
  218. }
  219. else
  220. {
  221. PlayerInfo[giveplayerid][pShopTech] = 0;
  222. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Customer Relations");
  223. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Customer Relations taken");
  224. format(string, sizeof(string), "%s has taken Director of Customer Relations from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  225. Log("logs/admin.log", string);
  226. }
  227. }
  228. else if(strcmp(task, "pr", true) == 0)
  229. {
  230. if(PlayerInfo[giveplayerid][pPR] == 0)
  231. {
  232. PlayerInfo[giveplayerid][pPR] = 1;
  233. SendClientMessage(playerid, COLOR_WHITE, "You have made them a member of Public Relations");
  234. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a member of Public Relations");
  235. format(string, sizeof(string), "%s has given Public Relations permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  236. Log("logs/admin.log", string);
  237. }
  238. else
  239. {
  240. PlayerInfo[giveplayerid][pPR] = 0;
  241. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Public Relations permissions");
  242. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Public Relations permissions taken");
  243. format(string, sizeof(string), "%s has taken Public Relations permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  244. Log("logs/admin.log", string);
  245.  
  246. }
  247. }
  248. else if(strcmp(task, "dopr", true) == 0)
  249. {
  250. if(PlayerInfo[giveplayerid][pPR] == 0 || PlayerInfo[giveplayerid][pPR] == 1)
  251. {
  252. PlayerInfo[giveplayerid][pPR] = 2;
  253. SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Public Relations");
  254. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Public Relations");
  255. format(string, sizeof(string), "%s has given Director of Public Relations permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  256. Log("logs/admin.log", string);
  257. }
  258. else
  259. {
  260. PlayerInfo[giveplayerid][pPR] = 0;
  261. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Public Relations permissions");
  262. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Public Relations permissions taken");
  263. format(string, sizeof(string), "%s has taken Director of Public Relations permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  264. Log("logs/admin.log", string);
  265.  
  266. }
  267. }
  268. else if(strcmp(task, "hr", true) == 0)
  269. {
  270. if(PlayerInfo[giveplayerid][pHR] == 0)
  271. {
  272. PlayerInfo[giveplayerid][pHR] = 1;
  273. SendClientMessage(playerid, COLOR_WHITE, "You have made them a member of Human Resources");
  274. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a member of Human Resources");
  275. format(string, sizeof(string), "%s has given Human Resources permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  276. Log("logs/admin.log", string);
  277. }
  278. else
  279. {
  280. PlayerInfo[giveplayerid][pHR] = 0;
  281. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Human Resources permissions");
  282. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Human Resources permissions taken");
  283. format(string, sizeof(string), "%s has taken Human Resources permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  284. Log("logs/admin.log", string);
  285. }
  286. }
  287. else if(strcmp(task, "sec", true) == 0)
  288. {
  289. if(PlayerInfo[giveplayerid][pSecurity] == 0)
  290. {
  291. PlayerInfo[giveplayerid][pSecurity] = 1;
  292. SendClientMessage(playerid, COLOR_WHITE, "You have made them a member of Security");
  293. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a member of Security");
  294. format(string, sizeof(string), "%s has given Security permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  295. Log("logs/admin.log", string);
  296. }
  297. else
  298. {
  299. PlayerInfo[giveplayerid][pSecurity] = 0;
  300. SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Security permissions");
  301. SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Security permissions taken");
  302. format(string, sizeof(string), "%s has taken Security permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  303. Log("logs/admin.log", string);
  304. }
  305. }
  306. else if(strcmp(task, "doap", true) == 0)
  307. {
  308. if(PlayerInfo[giveplayerid][pAP] == 0)
  309. {
  310. PlayerInfo[giveplayerid][pAP] = 1;
  311. SendClientMessage(playerid, COLOR_WHITE, "You have made them Director Of Admin Personnel");
  312. SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made Director Of Admin Personnel");
  313. format(string, sizeof(string), "%s has given DoAP premission to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  314. Log("logs/admin.log", string);
  315. }
  316. }
  317. }
  318. else SendClientMessage(playerid, COLOR_GRAD2, "They are not an admin!");
  319. }
  320. else SendClientMessageEx(playerid, COLOR_GRAD2, "That person is not connected.");
  321. }
  322. else SendClientMessageEx(playerid, COLOR_GREY, "You do not have permission to use this command.");
  323. return 1;
  324. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement