Blackevils

Untitled

Apr 30th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.57 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. #include <a_samp>
  3. #include <zcmd>
  4. #include <foreach>
  5. //#include <streamer>
  6. #include <sscanf2>
  7. #include <dini>
  8.  
  9. enum dData //gangs savings player
  10. {
  11. Gangid,
  12. Gangrank,
  13. pGp,
  14. Gang1playercolor,
  15. Gang2playercolor,
  16. Gang3playercolor,
  17. Min,
  18. Hour,
  19. Sec
  20. }
  21. new PlayerInfo[MAX_PLAYERS][dData];
  22. #define PlayerFile "playergang/%s.ini"
  23.  
  24. enum gData //gangspoints
  25. {
  26. Ganggp
  27. }
  28. new GangInfo[MAX_PLAYERS][gData];
  29. #define GangsFile "Gangsgp.ini"
  30.  
  31. enum gwData //gang weapons
  32. {
  33. Gang1weap1,
  34. Gang1weap2,
  35. Gang1weap3,
  36. Gang1weap4,
  37. Gang1weap5,
  38. Gang1weap6,
  39. Gang1color,
  40. Gang2weap1,
  41. Gang2weap2,
  42. Gang2weap3,
  43. Gang2weap4,
  44. Gang2weap5,
  45. Gang2weap6,
  46. Gang2color,
  47. Gang3weap1,
  48. Gang3weap2,
  49. Gang3weap3,
  50. Gang3weap4,
  51. Gang3weap5,
  52. Gang3weap6,
  53. Gang3color
  54. }
  55. new GangInfoweaps[MAX_PLAYERS][gwData];
  56. #define GangsFileweap "Gangsweaps.ini"
  57. new countweaps[MAX_PLAYERS] = 0;
  58. //define settings
  59. #define MAX_GANGS 3
  60. #define N 69//gang members online
  61. new gangRankTargetID;// setrank
  62. //colors
  63. #define COLOR_RED 0xFF0000FF
  64. #define yellow "{ffff00}"
  65. #define cyan "{00ff00}"
  66. #define pink "{ffffff}"
  67. #define orange "{ff0000}"
  68. #define blue "{0000ff}"
  69. #define red "{ff0000}"
  70. #define white "{ffffff}"
  71. #define grey "{AFAFAF}"
  72. //dialogs
  73. #define DIALOG_gstats 19
  74. #define DIALOG_GRANK 20
  75. #define DIALOG_GANGWEAPS 21
  76. #define DIALOG_GANGCOLOR 22
  77. //gangzone
  78. new Zone1;
  79. new capture1 = 1;
  80. new capture1start = 0;
  81. new Zone2;
  82. new capture2 = 2;
  83. new capture2start = 0;
  84. new Zone3;
  85. new capture3 = 3;
  86. new capture3start = 0;
  87.  
  88. public OnFilterScriptInit()
  89. {
  90. new file2[256], id, file3[256];
  91. format(file2,sizeof(file2),GangsFile);
  92. format(file3,sizeof(file3),GangsFileweap);
  93. GangInfo[id][Ganggp] = dini_Int(file2, "Ganggp");
  94. //GANGS CAPTURE PICKUP
  95. CreatePickup(1314 , 1, 1493.9996, 751.0131, 29.6638, -1);//GANG1
  96. CreatePickup(1314 , 1, 1089.1531, 1073.2957, 11.3150, -1);//GANG2
  97. CreatePickup(1314 , 1, 983.0714, 1733.2091, 9.3417, -1);//GANG3
  98. //GANGS CAPTURE ZONES
  99. Zone1 = GangZoneCreate(1310.488, 645.488, 1560.399, 823.4191);//zone GANG 1
  100. Zone2 = GangZoneCreate(923.9085, 951.0652, 1181.628, 1198.621);//zone GANG 2
  101. Zone3 = GangZoneCreate(857.5261, 1616.373, 994.1957, 1863.929);//zone GANG 3
  102. GangInfoweaps[id][Gang1color] = dini_Int(file3, "Gang1color");
  103. GangInfoweaps[id][Gang2color] = dini_Int(file3, "Gang2color");
  104. GangInfoweaps[id][Gang3color] = dini_Int(file3, "Gang3color");
  105. return 1;
  106. }
  107.  
  108. public OnFilterScriptExit()
  109. {
  110. return 1;
  111. }
  112.  
  113. public OnPlayerConnect(playerid)
  114. {
  115. new file[256], name[MAX_PLAYER_NAME];
  116. GetPlayerName(playerid,name,sizeof(name));
  117. format(file,sizeof(file),PlayerFile,name);
  118. if(!dini_Exists(file) )
  119. {
  120. dini_Create(file);
  121. dini_Set(file,"Name",name);
  122. dini_IntSet(file,"Gangid",0);
  123. PlayerInfo[playerid][Gangid] = 0;
  124. PlayerInfo[playerid][Gangrank] = 0;
  125. PlayerInfo[playerid][pGp] = 0;
  126. PlayerInfo[playerid][Gang1playercolor] =0;
  127. PlayerInfo[playerid][Gang2playercolor] =0;
  128. PlayerInfo[playerid][Gang3playercolor] =0;
  129. PlayerInfo[playerid][Min] = 0;
  130. PlayerInfo[playerid][Hour] = 0;
  131. PlayerInfo[playerid][Sec] = 0;
  132. }
  133. else
  134. {
  135. PlayerInfo[playerid][Gangid] = dini_Int(file,"Gangid");
  136. PlayerInfo[playerid][Gangrank] = dini_Int(file,"Gangrank");
  137. PlayerInfo[playerid][pGp] = dini_Int(file,"Player gangpoints");
  138. PlayerInfo[playerid][Min] = dini_Int(file, "Min");
  139. PlayerInfo[playerid][Hour] = dini_Int(file, "Hour");
  140. PlayerInfo[playerid][Sec] = dini_Int(file, "Sec");
  141. new file2[256];
  142. format(file2,sizeof(file2),GangsFile);
  143. dini_IntSet(file2,"Ganggp",GangInfo[playerid][Ganggp]);
  144. GangInfo[playerid][Ganggp] = dini_Int(file2, "Ganggp");
  145. //gangs weapons
  146. new file3[256];
  147. format(file3,sizeof(file3),GangsFileweap);
  148. //gang1
  149. GangInfoweaps[playerid][Gang1weap1] = dini_Int(file3, "Gang1weap1");
  150. GangInfoweaps[playerid][Gang1weap2] = dini_Int(file3, "Gang1weap2");
  151. GangInfoweaps[playerid][Gang1weap3] = dini_Int(file3, "Gang1weap3");
  152. GangInfoweaps[playerid][Gang1weap4] = dini_Int(file3, "Gang1weap4");
  153. GangInfoweaps[playerid][Gang1weap5] = dini_Int(file3, "Gang1weap5");
  154. GangInfoweaps[playerid][Gang1weap6] = dini_Int(file3, "Gang1weap6");
  155. //GangInfoweaps[playerid][Gang1color] = dini_Int(file3, "Gang1color");
  156. PlayerInfo[playerid][Gang1playercolor] = dini_Int(file, "Gang1playercolor");
  157. //gang2
  158. GangInfoweaps[playerid][Gang2weap1] = dini_Int(file3, "Gang2weap1");
  159. GangInfoweaps[playerid][Gang2weap2] = dini_Int(file3, "Gang2weap2");
  160. GangInfoweaps[playerid][Gang2weap3] = dini_Int(file3, "Gang2weap3");
  161. GangInfoweaps[playerid][Gang2weap4] = dini_Int(file3, "Gang2weap4");
  162. GangInfoweaps[playerid][Gang2weap5] = dini_Int(file3, "Gang2weap5");
  163. GangInfoweaps[playerid][Gang2weap6] = dini_Int(file3, "Gang2weap6");
  164. //GangInfoweaps[playerid][Gang2color] = dini_Int(file3, "Gang2color");
  165. PlayerInfo[playerid][Gang2playercolor] = dini_Int(file, "Gang2playercolor");
  166. //gang3
  167. GangInfoweaps[playerid][Gang3weap1] = dini_Int(file3, "Gang3weap1");
  168. GangInfoweaps[playerid][Gang3weap2] = dini_Int(file3, "Gang3weap2");
  169. GangInfoweaps[playerid][Gang3weap3] = dini_Int(file3, "Gang3weap3");
  170. GangInfoweaps[playerid][Gang3weap4] = dini_Int(file3, "Gang3weap4");
  171. GangInfoweaps[playerid][Gang3weap5] = dini_Int(file3, "Gang3weap5");
  172. GangInfoweaps[playerid][Gang3weap6] = dini_Int(file3, "Gang3weap6");
  173. //GangInfoweaps[playerid][Gang3color] = dini_Int(file3, "Gang3color");
  174. PlayerInfo[playerid][Gang3playercolor] = dini_Int(file, "Gang3playercolor");
  175. if(PlayerInfo[playerid][Gangid] >=1) SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
  176. }
  177. return 1;
  178. }
  179.  
  180. public OnPlayerDisconnect(playerid, reason)
  181. {
  182. new file[256], name[MAX_PLAYER_NAME];
  183. GetPlayerName(playerid,name,sizeof(name));
  184. format(file,sizeof(file),PlayerFile,name);
  185. if(dini_Exists(file) )
  186. {
  187. dini_IntSet(file,"Gangid",PlayerInfo[playerid][Gangid]);
  188. dini_IntSet(file,"Gangrank",PlayerInfo[playerid][Gangrank]);
  189. dini_IntSet(file,"Player gangpoints",PlayerInfo[playerid][pGp]);
  190. dini_IntSet(file,"Min",PlayerInfo[playerid][Min]);
  191. dini_IntSet(file,"Hour",PlayerInfo[playerid][Hour]);
  192. dini_IntSet(file,"Sec",PlayerInfo[playerid][Sec]);
  193. }
  194. //gangs points
  195. new file2[256];
  196. format(file2,sizeof(file2),GangsFile);
  197. dini_IntSet(file2,"Ganggp",GangInfo[playerid][Ganggp]);
  198. return 1;
  199. }
  200.  
  201. CMD:setgangweapons(playerid,params[])
  202. {
  203. if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang and have at least Owner rank in gang for use this command.");
  204. if(PlayerInfo[playerid][Gangrank] <= 4) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Owner rank in gang for change this gang settings.");
  205. if(countweaps[playerid] == 6)
  206. {
  207. countweaps[playerid] =0;
  208. }
  209. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  210. return 1;
  211. }
  212.  
  213. CMD:setgangid(playerid,params[])
  214. {
  215. new id, level;
  216. if(!IsPlayerAdmin(playerid) ) return SendClientMessage(playerid,COLOR_RED,"ERROR:You are not an admin!");
  217. if(sscanf(params,"ud",id,level) ) return SendClientMessage(playerid,COLOR_RED,"USUAGE: /setgangid [id][gangid]");
  218. if(level > MAX_GANGS) return SendClientMessage(playerid,COLOR_RED,"ERROR:Invalid Level");
  219. if(!IsPlayerConnected(id) ) return SendClientMessage(playerid,COLOR_RED,"ERROR:Player is not connected");
  220. else
  221. {
  222. PlayerInfo[id][Gangid] = level;
  223. SpawnPlayer(id);
  224. }
  225. return 1;
  226. }
  227.  
  228. public OnPlayerSpawn(playerid)
  229. {
  230. new file[256], name[MAX_PLAYER_NAME], file3[256];
  231. GetPlayerName(playerid,name,sizeof(name));
  232. format(file,sizeof(file),PlayerFile,name);
  233. format(file3,sizeof(file3),GangsFileweap);
  234. if(PlayerInfo[playerid][Gangid] == 0)
  235. {
  236. SetPlayerPos(playerid,1509.4786,-1707.0342,14.0469); // ls
  237. }
  238. if(PlayerInfo[playerid][Gangid] == 1)
  239. {
  240. SetPlayerColor(playerid, dini_Int(file, "Gang1playercolor"));
  241. SetPlayerPos(playerid, 1489.5876, 691.9392, 11.9275);
  242. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap1], 9999);
  243. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap2], 9999);
  244. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap3], 9999);
  245. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap4], 9999);
  246. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap5], 9999);
  247. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap6], 9999);
  248. }
  249. if(PlayerInfo[playerid][Gangid] == 2)
  250. {
  251. SetPlayerColor(playerid, dini_Int(file, "Gang2playercolor"));
  252. SetPlayerPos(playerid, 1046.1687, 1014.2678, 11.7839);
  253. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap1], 9999);
  254. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap2], 9999);
  255. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap3], 9999);
  256. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap4], 9999);
  257. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap5], 9999);
  258. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap6], 9999);
  259. }
  260. if(PlayerInfo[playerid][Gangid] == 3)
  261. {
  262. SetPlayerColor(playerid, dini_Int(file, "Gang3playercolor"));
  263. SetPlayerPos(playerid, 938.0714, 1733.2091, 9.3417);
  264. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap1], 9999);
  265. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap2], 9999);
  266. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap3], 9999);
  267. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap4], 9999);
  268. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap5], 9999);
  269. GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap6], 9999);
  270. }
  271. //GANGZONES //Gang1color
  272. //if(capture1 == 1) GangZoneShowForAll(Zone1,0xFF000096);
  273. if(capture1 == 1) GangZoneShowForAll(Zone1,dini_Int(file3, "Gang1color"));
  274. if(capture1 == 2) GangZoneShowForAll(Zone1,dini_Int(file3, "Gang2color"));
  275. if(capture1 == 3) GangZoneShowForAll(Zone1,dini_Int(file3, "Gang3color"));
  276. //if(capture1 == 2) GangZoneShowForAll(Zone1,0xFFFFFF96);
  277. //if(capture1 == 3) GangZoneShowForAll(Zone1,0xFFFF009A);
  278. //
  279. if(capture2 == 1) GangZoneShowForAll(Zone2,dini_Int(file3, "Gang1color"));
  280. if(capture2 == 2) GangZoneShowForAll(Zone2,dini_Int(file3, "Gang2color"));
  281. if(capture2 == 3) GangZoneShowForAll(Zone2,dini_Int(file3, "Gang3color"));
  282. //if(capture2 == 1) GangZoneShowForAll(Zone2,0xFF000096);//0xFF000096 ROSSO
  283. //if(capture2 == 2) GangZoneShowForAll(Zone2,0xFFFFFF96);//0xFFFFFF96 BIANCO
  284. //if(capture2 == 3) GangZoneShowForAll(Zone2,0xFFFF009A);//0xFFFF009A GIALLO
  285. //
  286. if(capture3 == 1) GangZoneShowForAll(Zone3,dini_Int(file3, "Gang1color"));
  287. if(capture3 == 2) GangZoneShowForAll(Zone3,dini_Int(file3, "Gang2color"));
  288. if(capture3 == 3) GangZoneShowForAll(Zone3,dini_Int(file3, "Gang3color"));
  289. //if(capture3 == 1) GangZoneShowForAll(Zone3,0xFF000096);
  290. //if(capture3 == 2) GangZoneShowForAll(Zone3,0xFFFFFF96);
  291. //if(capture3 == 3) GangZoneShowForAll(Zone3,0xFFFF009A);
  292. return 1;
  293. }
  294.  
  295. CMD:capture(playerid, params[])
  296. {
  297. ///////////////////////////////capture 1
  298. if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang for use this command.");
  299. new file3[256];
  300. format(file3,sizeof(file3),GangsFileweap);
  301. if (IsPlayerInRangeOfPoint(playerid, 3.0, 1493.9996, 751.0131, 29.6638))
  302. {
  303. if(capture1start >= 1) return SendClientMessage(playerid, -1,"You can't capture this territory because someone already started a /capture!");
  304. if(PlayerInfo[playerid][Gangid] == 1)
  305. {
  306. if(capture1 == 1) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  307. if(PlayerInfo[playerid][Gangid] == 1 && capture2start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  308. if(PlayerInfo[playerid][Gangid] == 1 && capture3start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  309. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  310. GangZoneFlashForAll(Zone1,dini_Int(file3, "Gang1color"));
  311. capture1start = 1;
  312. }
  313. if(PlayerInfo[playerid][Gangid] == 2)
  314. {
  315. if(capture1 == 2) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  316. if(PlayerInfo[playerid][Gangid] == 2 && capture2start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  317. if(PlayerInfo[playerid][Gangid] == 2 && capture3start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  318. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  319. GangZoneFlashForAll(Zone1,dini_Int(file3, "Gang2color"));
  320. capture1start = 2;
  321. }
  322. if(PlayerInfo[playerid][Gangid] == 3)
  323. {
  324. if(capture1 == 3) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  325. if(PlayerInfo[playerid][Gangid] == 3 && capture2start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  326. if(PlayerInfo[playerid][Gangid] == 3 && capture3start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  327. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  328. GangZoneFlashForAll(Zone1,dini_Int(file3, "Gang3color"));
  329. capture1start = 3;
  330. }
  331. }
  332. ///////////////////////////////capture 2
  333. if (IsPlayerInRangeOfPoint(playerid, 3.0, 1089.1531, 1073.2957, 11.3150))
  334. {
  335. if(capture2start >= 1) return SendClientMessage(playerid, -1,"You can't capture this territory because someone already started a /capture!");
  336. if(PlayerInfo[playerid][Gangid] == 1)
  337. {
  338. if(capture2 == 1) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  339. if(PlayerInfo[playerid][Gangid] == 1 && capture1start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  340. if(PlayerInfo[playerid][Gangid] == 1 && capture3start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  341. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  342. GangZoneFlashForAll(Zone2,dini_Int(file3, "Gang1color"));
  343. capture2start = 1;
  344. }
  345. if(PlayerInfo[playerid][Gangid] == 2)
  346. {
  347. if(capture2 == 2) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  348. if(PlayerInfo[playerid][Gangid] == 2 && capture1start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  349. if(PlayerInfo[playerid][Gangid] == 2 && capture3start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  350. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  351. GangZoneFlashForAll(Zone2,dini_Int(file3, "Gang2color"));
  352. capture2start = 2;
  353. }
  354. if(PlayerInfo[playerid][Gangid] == 3)
  355. {
  356. if(capture2 == 3) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  357. if(PlayerInfo[playerid][Gangid] == 3 && capture1start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  358. if(PlayerInfo[playerid][Gangid] == 3 && capture3start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  359. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  360. GangZoneFlashForAll(Zone2,dini_Int(file3, "Gang3color"));
  361. capture2start = 3;
  362. }
  363. }
  364. //////////////////////capture 3
  365. if (IsPlayerInRangeOfPoint(playerid, 3.0, 983.0714, 1733.2091, 9.3417))
  366. {
  367. if(capture3start >= 1) return SendClientMessage(playerid, -1,"You can't capture this territory because someone already started a /capture!");
  368. if(PlayerInfo[playerid][Gangid] == 1)
  369. {
  370. if(capture3 == 1) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  371. if(PlayerInfo[playerid][Gangid] == 1 && capture1start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  372. if(PlayerInfo[playerid][Gangid] == 1 && capture2start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  373. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  374. GangZoneFlashForAll(Zone3,dini_Int(file3, "Gang1color"));
  375. capture3start = 1;
  376. }
  377. if(PlayerInfo[playerid][Gangid] == 2)
  378. {
  379. if(capture3 == 2) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  380. if(PlayerInfo[playerid][Gangid] == 2 && capture1start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  381. if(PlayerInfo[playerid][Gangid] == 2 && capture2start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  382. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  383. GangZoneFlashForAll(Zone3,dini_Int(file3, "Gang2color"));
  384. capture3start = 2;
  385. }
  386. if(PlayerInfo[playerid][Gangid] == 3)
  387. {
  388. if(capture3 == 3) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
  389. if(PlayerInfo[playerid][Gangid] == 3 && capture1start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  390. if(PlayerInfo[playerid][Gangid] == 3 && capture2start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
  391. SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
  392. GangZoneFlashForAll(Zone3,dini_Int(file3, "Gang3color"));
  393. capture3start = 3;
  394. }
  395. }
  396. return 1;
  397. }
  398.  
  399. forward EndAntiSpawnKill(playerid);
  400.  
  401. public EndAntiSpawnKill(playerid)
  402. { ///////////////////////////////capture 1
  403. new file3[256];
  404. format(file3,sizeof(file3),GangsFileweap);
  405. if (IsPlayerInRangeOfPoint(playerid, 5.0, 1493.9996, 751.0131, 29.6638))
  406. {
  407. if(PlayerInfo[playerid][Gangid] == 1)
  408. {
  409. GangZoneStopFlashForAll(Zone1);
  410. GangZoneShowForAll(Zone1,dini_Int(file3, "Gang1color"));
  411. capture1 = 1;
  412. capture1start =0;
  413. PlayerInfo[playerid][pGp] += 3;
  414. }
  415. if(PlayerInfo[playerid][Gangid] == 2)
  416. {
  417. GangZoneStopFlashForAll(Zone1);
  418. GangZoneShowForAll(Zone1,dini_Int(file3, "Gang2color"));
  419. capture1 = 2;
  420. capture1start =0;
  421. PlayerInfo[playerid][pGp] += 3;
  422. }
  423. if(PlayerInfo[playerid][Gangid] == 3)
  424. {
  425. GangZoneStopFlashForAll(Zone1);
  426. GangZoneShowForAll(Zone1,dini_Int(file3, "Gang3color"));
  427. capture1 = 3;
  428. capture1start =0;
  429. PlayerInfo[playerid][pGp] += 3;
  430. }
  431. }
  432. else
  433. if(capture1start >= 1)
  434. {
  435. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1493.9996, 751.0131, 29.6638))
  436. {
  437. SendClientMessage(playerid, -1,"You need to stay max 5metres from the capture checkpoint.!");
  438. GangZoneStopFlashForAll(Zone1);
  439. if(capture1start == 1 && capture1 == 1) return capture1 = 1;
  440. if(capture1start == 1 && capture1 == 2) return capture1 = 2;
  441. if(capture1start == 1 && capture1 == 3) return capture1 = 3;
  442. if(capture1start == 2 && capture1 == 1) return capture1 = 1;
  443. if(capture1start == 2 && capture1 == 2) return capture1 = 2;
  444. if(capture1start == 2 && capture1 == 3) return capture1 = 3;
  445. if(capture1start == 3 && capture1 == 1) return capture1 = 1;
  446. if(capture1start == 3 && capture1 == 2) return capture1 = 2;
  447. if(capture1start == 3 && capture1 == 3) return capture1 = 3;
  448. }
  449. }
  450. ///////////////////////////////capture 2
  451. if (IsPlayerInRangeOfPoint(playerid, 5.0, 1089.1531, 1073.2957, 11.3150))
  452. {
  453. if(PlayerInfo[playerid][Gangid] == 1)
  454. {
  455. GangZoneStopFlashForAll(Zone2);
  456. GangZoneShowForAll(Zone2,dini_Int(file3, "Gang1color"));
  457. capture2 = 1;
  458. capture2start =0;
  459. PlayerInfo[playerid][pGp] += 3;
  460. }
  461. if(PlayerInfo[playerid][Gangid] == 2)
  462. {
  463. GangZoneStopFlashForAll(Zone2);
  464. GangZoneShowForAll(Zone2,dini_Int(file3, "Gang2color"));
  465. capture2 = 2;
  466. capture2start =0;
  467. PlayerInfo[playerid][pGp] += 3;
  468. }
  469. if(PlayerInfo[playerid][Gangid] == 3)
  470. {
  471. GangZoneStopFlashForAll(Zone2);
  472. GangZoneShowForAll(Zone2,dini_Int(file3, "Gang3color"));
  473. capture2 = 3;
  474. capture2start =0;
  475. PlayerInfo[playerid][pGp] += 3;
  476. }
  477. }
  478. else
  479. if(capture2start >= 1)
  480. {
  481. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1089.1531, 1073.2957, 11.3150))
  482. {
  483. SendClientMessage(playerid, -1,"You need to stay max 5metres from the capture checkpoint.!");
  484. GangZoneStopFlashForAll(Zone2);
  485. capture2start = 0;
  486. if(capture2start == 1 && capture2 == 1) return capture2 = 1;
  487. if(capture2start == 1 && capture2 == 2) return capture2 = 2;
  488. if(capture2start == 1 && capture2 == 3) return capture2 = 3;
  489. if(capture2start == 2 && capture2 == 1) return capture2 = 1;
  490. if(capture2start == 2 && capture2 == 2) return capture2 = 2;
  491. if(capture2start == 2 && capture2 == 3) return capture2 = 3;
  492. if(capture2start == 3 && capture2 == 1) return capture2 = 1;
  493. if(capture2start == 3 && capture2 == 2) return capture2 = 2;
  494. if(capture2start == 3 && capture2 == 3) return capture2 = 3;
  495. }
  496. }
  497. ///////////////////////////////////capture 3
  498. if (IsPlayerInRangeOfPoint(playerid, 5.0, 983.0714, 1733.2091, 9.3417))
  499. {
  500. if(PlayerInfo[playerid][Gangid] == 1)
  501. {
  502. GangZoneStopFlashForAll(Zone3);
  503. GangZoneShowForAll(Zone3,dini_Int(file3, "Gang1color"));
  504. capture3 = 1;
  505. capture3start =0;
  506. PlayerInfo[playerid][pGp] += 3;
  507. }
  508. if(PlayerInfo[playerid][Gangid] == 2)
  509. {
  510. GangZoneStopFlashForAll(Zone3);
  511. GangZoneShowForAll(Zone3,dini_Int(file3, "Gang2color"));
  512. capture3 = 2;
  513. capture3start =0;
  514. PlayerInfo[playerid][pGp] += 3;
  515. }
  516. if(PlayerInfo[playerid][Gangid] == 3)
  517. {
  518. GangZoneStopFlashForAll(Zone3);
  519. GangZoneShowForAll(Zone3,dini_Int(file3, "Gang3color"));
  520. capture3 = 3;
  521. capture3start =0;
  522. PlayerInfo[playerid][pGp] += 3;
  523. }
  524. }
  525. else
  526. {
  527. if(capture3start >= 1)
  528. {
  529. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 983.0714, 1733.2091, 9.3417))
  530. {
  531. SendClientMessage(playerid, -1,"You need to stay max 5metres from the capture checkpoint.!");
  532. GangZoneStopFlashForAll(Zone3);
  533. if(capture3start == 1 && capture3 == 1) return capture3 = 1;
  534. if(capture3start == 1 && capture3 == 2) return capture3 = 2;
  535. if(capture3start == 1 && capture3 == 3) return capture3 = 3;
  536. if(capture3start == 2 && capture3 == 1) return capture3 = 1;
  537. if(capture3start == 2 && capture3 == 2) return capture3 = 2;
  538. if(capture3start == 2 && capture3 == 3) return capture3 = 3;
  539. if(capture3start == 3 && capture3 == 1) return capture3 = 1;
  540. if(capture3start == 3 && capture3 == 2) return capture3 = 2;
  541. if(capture3start == 3 && capture3 == 3) return capture3 = 3;
  542. }
  543. }
  544. }
  545. return 1;
  546. }
  547.  
  548. CMD:gstats(playerid,params[])
  549. {
  550. new string2[400];
  551. new ID;
  552. new pname[MAX_PLAYER_NAME];
  553. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Gstats [playerid]");
  554. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player isn't connected.");
  555. if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: That player doesn't have a gang.");
  556. GetPlayerName(ID, pname, sizeof(pname));
  557. new stringa[30];
  558. if(PlayerInfo[ID][Gangid] == 1) format(stringa, sizeof(stringa),"{15FF00}Thug 4 Life", ID);
  559. if(PlayerInfo[ID][Gangid] == 2) format(stringa, sizeof(stringa),"{15FF00}United Pirates Castle", ID);
  560. if(PlayerInfo[ID][Gangid] == 3) format(stringa, sizeof(stringa),"{15FF00}Free gang slot", ID);
  561. new stringas[30];
  562. if(PlayerInfo[ID][Gangrank] == 1) format(stringas, sizeof(stringas),"Member", ID);
  563. if(PlayerInfo[ID][Gangrank] == 2) format(stringas, sizeof(stringas),"Co-leader", ID);
  564. if(PlayerInfo[ID][Gangrank] == 3) format(stringas, sizeof(stringas),"Leader", ID);
  565. if(PlayerInfo[ID][Gangrank] == 4) format(stringas, sizeof(stringas),"Co-Owner", ID);
  566. if(PlayerInfo[ID][Gangrank] == 5) format(stringas, sizeof(stringas),"Owner", ID);
  567. if(PlayerInfo[ID][Gangrank] == 6) format(stringas, sizeof(stringas),"Founder", ID);
  568.  
  569. format(string2,sizeof(string2),"{15FF00}%s {FF0000}Gang stats \n{FF0000}Gang: {15FF00}%s\n{FF0000}Gang rank: {15FF00}%s\n{FF0000}Gang points: {15FF00}%d\n{ff0000}Gang time: {15FF00}%d:%d:%d\n",pname,stringa,stringas,PlayerInfo[ID][pGp],PlayerInfo[ID][Hour],PlayerInfo[ID][Min],PlayerInfo[ID][Sec]);
  570. ShowPlayerDialog(playerid,DIALOG_gstats,DIALOG_STYLE_MSGBOX,"{15FF00}Gang Stats",string2,"Close","");
  571. return 1;
  572. }
  573.  
  574. CMD:gm(playerid, params[])
  575. {
  576. if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang to use this command.");
  577. new count1 = 0;
  578. new count2 = 0;
  579. new count3 = 0;
  580. new string[256], string2[3000];
  581.  
  582. strcat(string2, ""yellow"");
  583. strcat(string2, ".:: MEMBERS ONLINE ::.\n");
  584.  
  585. foreach(Player,x)
  586. {
  587. new ranks[90];
  588. switch(PlayerInfo[playerid][Gangrank])
  589. {
  590. case 1: ranks = ""red"(Member)";
  591. case 2: ranks = ""red"(Co-leader)";
  592. case 3: ranks = ""red"(Leader)";
  593. case 4: ranks = ""red"(Co-Owner)";
  594. case 5: ranks = ""red"(Owner)";
  595. case 6: ranks = ""red"(Founder)";
  596. }
  597. if(PlayerInfo[x][Gangid] == 1)
  598. {
  599. count1++;
  600. format(string, sizeof(string),"ยป %s[%d] "yellow"Rank: %s\n", GetName(x), x, ranks);
  601. strcat(string2, string);
  602. if(PlayerInfo[playerid][Gangid] == 1) ShowPlayerDialog(playerid, N, DIALOG_STYLE_LIST, ""red"Gangs members online now", string2, "Close", "");
  603. }
  604. if(PlayerInfo[x][Gangid] == 2)
  605. {
  606. count2++;
  607. format(string, sizeof(string),"ยป %s[%d] "yellow"Rank: %s\n", GetName(x), x, ranks);
  608. strcat(string2, string);
  609. if(PlayerInfo[playerid][Gangid] == 2) ShowPlayerDialog(playerid, N, DIALOG_STYLE_LIST, ""red"Gangs members online now", string2, "Close", "");
  610. }
  611. if(PlayerInfo[x][Gangid] == 3)
  612. {
  613. count3++;
  614. format(string, sizeof(string),"ยป %s[%d] "yellow"Rank: %s\n", GetName(x), x, ranks);
  615. strcat(string2, string);
  616. if(PlayerInfo[playerid][Gangid] == 3) ShowPlayerDialog(playerid, N, DIALOG_STYLE_LIST, ""red"Gangs members online now", string2, "Close", "");
  617. }
  618. }
  619. return 1;
  620. }
  621.  
  622. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  623. {
  624. if(dialogid == DIALOG_GANGWEAPS)
  625. {
  626. if(response)
  627. {
  628. new file3[256];
  629. if(listitem == 0)
  630. {
  631. if(countweaps[playerid] <= 6)
  632. {
  633. format(file3,sizeof(file3),GangsFileweap);
  634. if(PlayerInfo[playerid][Gangid] == 1)
  635. {
  636. GangInfoweaps[playerid][Gang1weap1] = 4;
  637. dini_IntSet(file3,"Gang1weap1",GangInfoweaps[playerid][Gang1weap1]);
  638. }
  639. if(PlayerInfo[playerid][Gangid] == 2)
  640. {
  641. GangInfoweaps[playerid][Gang2weap1] = 4;
  642. dini_IntSet(file3,"Gang2weap1",GangInfoweaps[playerid][Gang2weap1]);
  643. }
  644. if(PlayerInfo[playerid][Gangid] == 3)
  645. {
  646. GangInfoweaps[playerid][Gang3weap1] = 4;
  647. dini_IntSet(file3,"Gang3weap1",GangInfoweaps[playerid][Gang3weap1]);
  648. }
  649. GivePlayerWeapon(playerid, 4, 9999);
  650. countweaps[playerid] = 1;
  651. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  652. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  653. }
  654. }
  655. if(listitem == 1)
  656. {
  657. if(countweaps[playerid] <= 6)
  658. {
  659. format(file3,sizeof(file3),GangsFileweap);
  660. if(PlayerInfo[playerid][Gangid] == 1)
  661. {
  662. GangInfoweaps[playerid][Gang1weap1] = 4;
  663. dini_IntSet(file3,"Gang1weap1",GangInfoweaps[playerid][Gang1weap1]);
  664. }
  665. if(PlayerInfo[playerid][Gangid] == 2)
  666. {
  667. GangInfoweaps[playerid][Gang2weap1] = 4;
  668. dini_IntSet(file3,"Gang2weap1",GangInfoweaps[playerid][Gang2weap1]);
  669. }
  670. if(PlayerInfo[playerid][Gangid] == 3)
  671. {
  672. GangInfoweaps[playerid][Gang3weap1] = 4;
  673. dini_IntSet(file3,"Gang3weap1",GangInfoweaps[playerid][Gang3weap1]);
  674. }
  675. GivePlayerWeapon(playerid, 9, 9999);
  676. countweaps[playerid] +=1;
  677. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  678. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  679. }
  680. }
  681. if(listitem == 2)
  682. {
  683. if(countweaps[playerid] <= 6)
  684. {
  685. format(file3,sizeof(file3),GangsFileweap);
  686. if(PlayerInfo[playerid][Gangid] == 1)
  687. {
  688. GangInfoweaps[playerid][Gang1weap2] = 22;
  689. dini_IntSet(file3,"Gang1weap2",GangInfoweaps[playerid][Gang1weap2]);
  690. }
  691. if(PlayerInfo[playerid][Gangid] == 2)
  692. {
  693. GangInfoweaps[playerid][Gang2weap2] = 22;
  694. dini_IntSet(file3,"Gang2weap2",GangInfoweaps[playerid][Gang2weap2]);
  695. }
  696. if(PlayerInfo[playerid][Gangid] == 3)
  697. {
  698. GangInfoweaps[playerid][Gang2weap2] = 22;
  699. dini_IntSet(file3,"Gang3weap2",GangInfoweaps[playerid][Gang3weap2]);
  700. }
  701. GivePlayerWeapon(playerid, 22, 9999);
  702. countweaps[playerid] +=1;
  703. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  704. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  705. }
  706. }
  707. if(listitem == 3)
  708. {
  709. if(countweaps[playerid] <= 6)
  710. {
  711. format(file3,sizeof(file3),GangsFileweap);
  712. if(PlayerInfo[playerid][Gangid] == 1)
  713. {
  714. GangInfoweaps[playerid][Gang1weap2] = 23;
  715. dini_IntSet(file3,"Gang1weap2",GangInfoweaps[playerid][Gang1weap2]);
  716. }
  717. if(PlayerInfo[playerid][Gangid] == 2)
  718. {
  719. GangInfoweaps[playerid][Gang2weap2] = 23;
  720. dini_IntSet(file3,"Gang2weap2",GangInfoweaps[playerid][Gang2weap2]);
  721. }
  722. if(PlayerInfo[playerid][Gangid] == 3)
  723. {
  724. GangInfoweaps[playerid][Gang3weap2] = 23;
  725. dini_IntSet(file3,"Gang3weap2",GangInfoweaps[playerid][Gang3weap2]);
  726. }
  727. GivePlayerWeapon(playerid, 23, 9999);
  728. countweaps[playerid] +=1;
  729. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  730. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  731. }
  732. }
  733. if(listitem == 4)
  734. {
  735. if(countweaps[playerid] <= 6)
  736. {
  737. format(file3,sizeof(file3),GangsFileweap);
  738. if(PlayerInfo[playerid][Gangid] == 1)
  739. {
  740. GangInfoweaps[playerid][Gang1weap2] = 24;
  741. dini_IntSet(file3,"Gang1weap2",GangInfoweaps[playerid][Gang1weap2]);
  742. }
  743. if(PlayerInfo[playerid][Gangid] == 2)
  744. {
  745. GangInfoweaps[playerid][Gang2weap2] = 24;
  746. dini_IntSet(file3,"Gang2weap2",GangInfoweaps[playerid][Gang2weap2]);
  747. }
  748. if(PlayerInfo[playerid][Gangid] == 3)
  749. {
  750. GangInfoweaps[playerid][Gang3weap2] = 24;
  751. dini_IntSet(file3,"Gang3weap2",GangInfoweaps[playerid][Gang3weap2]);
  752. }
  753. GivePlayerWeapon(playerid, 24, 9999);
  754. countweaps[playerid] +=1;
  755. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  756. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  757. }
  758. }
  759. if(listitem == 5)
  760. {
  761. if(countweaps[playerid] <= 6)
  762. {
  763. format(file3,sizeof(file3),GangsFileweap);
  764. if(PlayerInfo[playerid][Gangid] == 1)
  765. {
  766. GangInfoweaps[playerid][Gang1weap3] = 25;
  767. dini_IntSet(file3,"Gang1weap3",GangInfoweaps[playerid][Gang1weap3]);
  768. }
  769. if(PlayerInfo[playerid][Gangid] == 2)
  770. {
  771. GangInfoweaps[playerid][Gang2weap3] = 25;
  772. dini_IntSet(file3,"Gang2weap3",GangInfoweaps[playerid][Gang2weap3]);
  773. }
  774. if(PlayerInfo[playerid][Gangid] == 3)
  775. {
  776. GangInfoweaps[playerid][Gang3weap3] = 25;
  777. dini_IntSet(file3,"Gang3weap3",GangInfoweaps[playerid][Gang3weap3]);
  778. }
  779. GivePlayerWeapon(playerid, 25, 9999);
  780. countweaps[playerid] +=1;
  781. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  782. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  783. }
  784. }
  785. if(listitem == 6)
  786. {
  787. if(countweaps[playerid] <= 6)
  788. {
  789. format(file3,sizeof(file3),GangsFileweap);
  790. if(PlayerInfo[playerid][Gangid] == 1)
  791. {
  792. GangInfoweaps[playerid][Gang1weap3] = 26;
  793. dini_IntSet(file3,"Gang1weap3",GangInfoweaps[playerid][Gang1weap3]);
  794. }
  795. if(PlayerInfo[playerid][Gangid] == 2)
  796. {
  797. GangInfoweaps[playerid][Gang2weap3] = 26;
  798. dini_IntSet(file3,"Gang2weap3",GangInfoweaps[playerid][Gang2weap3]);
  799. }
  800. if(PlayerInfo[playerid][Gangid] == 3)
  801. {
  802. GangInfoweaps[playerid][Gang3weap3] = 26;
  803. dini_IntSet(file3,"Gang3weap3",GangInfoweaps[playerid][Gang3weap3]);
  804. }
  805. GivePlayerWeapon(playerid, 26, 9999);
  806. countweaps[playerid] +=1;
  807. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  808. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  809. }
  810. }
  811. if(listitem == 7)
  812. {
  813. if(countweaps[playerid] <= 6)
  814. {
  815. format(file3,sizeof(file3),GangsFileweap);
  816. if(PlayerInfo[playerid][Gangid] == 1)
  817. {
  818. GangInfoweaps[playerid][Gang1weap3] = 27;
  819. dini_IntSet(file3,"Gang1weap3",GangInfoweaps[playerid][Gang1weap3]);
  820. }
  821. if(PlayerInfo[playerid][Gangid] == 2)
  822. {
  823. GangInfoweaps[playerid][Gang2weap3] = 27;
  824. dini_IntSet(file3,"Gang2weap3",GangInfoweaps[playerid][Gang2weap3]);
  825. }
  826. if(PlayerInfo[playerid][Gangid] == 3)
  827. {
  828. GangInfoweaps[playerid][Gang3weap3] = 27;
  829. dini_IntSet(file3,"Gang3weap3",GangInfoweaps[playerid][Gang3weap3]);
  830. }
  831. GivePlayerWeapon(playerid, 27, 9999);
  832. countweaps[playerid] +=1;
  833. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  834. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  835. }
  836. }
  837. if(listitem == 8)
  838. {
  839. if(countweaps[playerid] <= 6)
  840. {
  841. format(file3,sizeof(file3),GangsFileweap);
  842. if(PlayerInfo[playerid][Gangid] == 1)
  843. {
  844. GangInfoweaps[playerid][Gang1weap4] = 28;
  845. dini_IntSet(file3,"Gang1weap4",GangInfoweaps[playerid][Gang1weap4]);
  846. }
  847. if(PlayerInfo[playerid][Gangid] == 2)
  848. {
  849. GangInfoweaps[playerid][Gang2weap4] = 28;
  850. dini_IntSet(file3,"Gang2weap4",GangInfoweaps[playerid][Gang2weap4]);
  851. }
  852. if(PlayerInfo[playerid][Gangid] == 3)
  853. {
  854. GangInfoweaps[playerid][Gang3weap4] = 28;
  855. dini_IntSet(file3,"Gang3weap4",GangInfoweaps[playerid][Gang3weap4]);
  856. }
  857. GivePlayerWeapon(playerid, 28, 9999);
  858. countweaps[playerid] +=1;
  859. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  860. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  861. }
  862. }
  863. if(listitem == 9)
  864. {
  865. if(countweaps[playerid] <= 6)
  866. {
  867. format(file3,sizeof(file3),GangsFileweap);
  868. if(PlayerInfo[playerid][Gangid] == 1)
  869. {
  870. GangInfoweaps[playerid][Gang1weap4] = 29;
  871. dini_IntSet(file3,"Gang1weap4",GangInfoweaps[playerid][Gang1weap4]);
  872. }
  873. if(PlayerInfo[playerid][Gangid] == 2)
  874. {
  875. GangInfoweaps[playerid][Gang2weap4] = 29;
  876. dini_IntSet(file3,"Gang2weap4",GangInfoweaps[playerid][Gang2weap4]);
  877. }
  878. if(PlayerInfo[playerid][Gangid] == 3)
  879. {
  880. GangInfoweaps[playerid][Gang3weap4] = 29;
  881. dini_IntSet(file3,"Gang3weap4",GangInfoweaps[playerid][Gang3weap4]);
  882. }
  883. GivePlayerWeapon(playerid, 29, 9999);
  884. countweaps[playerid] +=1;
  885. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  886. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  887. }
  888. }
  889. if(listitem == 10)
  890. {
  891. if(countweaps[playerid] <= 6)
  892. {
  893. format(file3,sizeof(file3),GangsFileweap);
  894. if(PlayerInfo[playerid][Gangid] == 1)
  895. {
  896. GangInfoweaps[playerid][Gang1weap4] = 32;
  897. dini_IntSet(file3,"Gang1weap4",GangInfoweaps[playerid][Gang1weap4]);
  898. }
  899. if(PlayerInfo[playerid][Gangid] == 2)
  900. {
  901. GangInfoweaps[playerid][Gang2weap4] = 32;
  902. dini_IntSet(file3,"Gang2weap4",GangInfoweaps[playerid][Gang2weap4]);
  903. }
  904. if(PlayerInfo[playerid][Gangid] == 3)
  905. {
  906. GangInfoweaps[playerid][Gang3weap4] = 32;
  907. dini_IntSet(file3,"Gang3weap4",GangInfoweaps[playerid][Gang3weap4]);
  908. }
  909. GivePlayerWeapon(playerid, 32, 9999);
  910. countweaps[playerid] +=1;
  911. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  912. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  913. }
  914. }
  915. if(listitem == 11)
  916. {
  917. if(countweaps[playerid] <= 6)
  918. {
  919. format(file3,sizeof(file3),GangsFileweap);
  920. if(PlayerInfo[playerid][Gangid] == 1)
  921. {
  922. GangInfoweaps[playerid][Gang1weap5] = 30;
  923. dini_IntSet(file3,"Gang1weap5",GangInfoweaps[playerid][Gang1weap5]);
  924. }
  925. if(PlayerInfo[playerid][Gangid] == 2)
  926. {
  927. GangInfoweaps[playerid][Gang2weap5] = 30;
  928. dini_IntSet(file3,"Gang2weap5",GangInfoweaps[playerid][Gang2weap5]);
  929. }
  930. if(PlayerInfo[playerid][Gangid] == 3)
  931. {
  932. GangInfoweaps[playerid][Gang3weap5] = 30;
  933. dini_IntSet(file3,"Gang3weap5",GangInfoweaps[playerid][Gang3weap5]);
  934. }
  935. GivePlayerWeapon(playerid, 30, 9999);
  936. countweaps[playerid] +=1;
  937. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  938. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  939. }
  940. }
  941. if(listitem == 12)
  942. {
  943. if(countweaps[playerid] <= 6)
  944. {
  945. format(file3,sizeof(file3),GangsFileweap);
  946. if(PlayerInfo[playerid][Gangid] == 1)
  947. {
  948. GangInfoweaps[playerid][Gang1weap5] = 31;
  949. dini_IntSet(file3,"Gang1weap5",GangInfoweaps[playerid][Gang1weap5]);
  950. }
  951. if(PlayerInfo[playerid][Gangid] == 2)
  952. {
  953. GangInfoweaps[playerid][Gang2weap5] = 31;
  954. dini_IntSet(file3,"Gang2weap5",GangInfoweaps[playerid][Gang2weap5]);
  955. }
  956. if(PlayerInfo[playerid][Gangid] == 3)
  957. {
  958. GangInfoweaps[playerid][Gang3weap5] = 31;
  959. dini_IntSet(file3,"Gang3weap5",GangInfoweaps[playerid][Gang3weap5]);
  960. }
  961. GivePlayerWeapon(playerid, 31, 9999);
  962. countweaps[playerid] +=1;
  963. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  964. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  965. }
  966. }
  967. if(listitem == 13)
  968. {
  969. if(countweaps[playerid] <= 6)
  970. {
  971. format(file3,sizeof(file3),GangsFileweap);
  972. if(PlayerInfo[playerid][Gangid] == 1)
  973. {
  974. GangInfoweaps[playerid][Gang1weap6] = 33;
  975. dini_IntSet(file3,"Gang1weap6",GangInfoweaps[playerid][Gang1weap6]);
  976. }
  977. if(PlayerInfo[playerid][Gangid] == 2)
  978. {
  979. GangInfoweaps[playerid][Gang2weap6] = 33;
  980. dini_IntSet(file3,"Gang2weap6",GangInfoweaps[playerid][Gang2weap6]);
  981. }
  982. if(PlayerInfo[playerid][Gangid] == 3)
  983. {
  984. GangInfoweaps[playerid][Gang3weap6] = 33;
  985. dini_IntSet(file3,"Gang3weap6",GangInfoweaps[playerid][Gang3weap6]);
  986. }
  987. GivePlayerWeapon(playerid, 33, 9999);
  988. countweaps[playerid] +=1;
  989. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  990. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  991. }
  992. }
  993. if(listitem == 14)
  994. {
  995. if(countweaps[playerid] <= 6)
  996. {
  997. format(file3,sizeof(file3),GangsFileweap);
  998. if(PlayerInfo[playerid][Gangid] == 1)
  999. {
  1000. GangInfoweaps[playerid][Gang1weap6] = 34;
  1001. dini_IntSet(file3,"Gang1weap6",GangInfoweaps[playerid][Gang1weap6]);
  1002. }
  1003. if(PlayerInfo[playerid][Gangid] == 2)
  1004. {
  1005. GangInfoweaps[playerid][Gang2weap6] = 34;
  1006. dini_IntSet(file3,"Gang2weap6",GangInfoweaps[playerid][Gang2weap6]);
  1007. }
  1008. if(PlayerInfo[playerid][Gangid] == 3)
  1009. {
  1010. GangInfoweaps[playerid][Gang3weap6] = 34;
  1011. dini_IntSet(file3,"Gang3weap6",GangInfoweaps[playerid][Gang3weap6]);
  1012. }
  1013. GivePlayerWeapon(playerid, 34, 9999);
  1014. countweaps[playerid] +=1;
  1015. if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
  1016. ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
  1017. }
  1018. }
  1019. }
  1020. return 1;
  1021. }
  1022. if(dialogid == DIALOG_GRANK)
  1023. {
  1024. if(response)
  1025. {
  1026. if(listitem == 0)
  1027. {
  1028. if(PlayerInfo[playerid][Gangrank] >= 1) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Leader rank in gang for set this rank.");
  1029. PlayerInfo[gangRankTargetID][Gangrank] = 1;
  1030. }
  1031. if(listitem == 1)
  1032. {
  1033. if(PlayerInfo[playerid][Gangrank] <= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Leader rank in gang for set this rank.");
  1034. PlayerInfo[gangRankTargetID][Gangrank] = 2;
  1035. }
  1036. if(listitem == 2)
  1037. {
  1038. if(PlayerInfo[playerid][Gangrank] <= 3) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Co-Owner rank in gang for set this rank.");
  1039. PlayerInfo[gangRankTargetID][Gangrank] = 3;
  1040. }
  1041. if(listitem == 3)
  1042. {
  1043. if(PlayerInfo[playerid][Gangrank] <= 4) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Owner rank in gang for set this rank.");
  1044. PlayerInfo[gangRankTargetID][Gangrank] = 4;
  1045. }
  1046. if(listitem == 4)
  1047. {
  1048. if(PlayerInfo[playerid][Gangrank] <= 5) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Founder rank in gang for set this rank.");
  1049. PlayerInfo[gangRankTargetID][Gangrank] = 5;
  1050. }
  1051. if(listitem == 5)
  1052. {
  1053. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to set this rank.");
  1054. PlayerInfo[gangRankTargetID][Gangrank] = 6;
  1055. }
  1056. }
  1057. return 1;
  1058. }
  1059. if(dialogid == DIALOG_GANGCOLOR)
  1060. {
  1061. if(response)
  1062. {
  1063. new file[256], name[MAX_PLAYER_NAME], file3[256];
  1064. GetPlayerName(playerid,name,sizeof(name));
  1065. format(file,sizeof(file),PlayerFile,name);
  1066. format(file3,sizeof(file3),GangsFileweap);
  1067. if(listitem == 0)
  1068. {
  1069. if(PlayerInfo[playerid][Gangid] == 1)
  1070. {
  1071. SetPlayerColor(playerid, 0xFF000085);
  1072. GangZoneShowForAll(Zone1, 0xFF000085);//ROSSO
  1073. dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
  1074. dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
  1075. }
  1076. if(PlayerInfo[playerid][Gangid] == 2)
  1077. {
  1078. SetPlayerColor(playerid, 0xFF000085);
  1079. GangZoneShowForAll(Zone2, 0xFF000085);//ROSSO
  1080. dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
  1081. dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
  1082. }
  1083. if(PlayerInfo[playerid][Gangid] == 3)
  1084. {
  1085. SetPlayerColor(playerid, 0xFF000085);
  1086. GangZoneShowForAll(Zone3, 0xFF000085);//ROSSO
  1087. dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
  1088. dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
  1089. }
  1090. }
  1091. if(listitem == 1)
  1092. {
  1093. if(PlayerInfo[playerid][Gangid] == 1)
  1094. {
  1095. GangZoneShowForAll(Zone1, 0x0000CE96);//BLU
  1096. SetPlayerColor(playerid, 0x0000CE96);
  1097. dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
  1098. dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
  1099. }
  1100. if(PlayerInfo[playerid][Gangid] == 2)
  1101. {
  1102. GangZoneShowForAll(Zone2, 0x0000CE96);//BLU
  1103. SetPlayerColor(playerid, 0x0000CE96);
  1104. dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
  1105. dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
  1106. }
  1107. if(PlayerInfo[playerid][Gangid] == 3)
  1108. {
  1109. GangZoneShowForAll(Zone3, 0x0000CE96);//BLU
  1110. SetPlayerColor(playerid, 0x0000CE96);
  1111. dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
  1112. dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
  1113. }
  1114. }
  1115. if(listitem == 2)
  1116. {
  1117. if(PlayerInfo[playerid][Gangid] == 1)
  1118. {
  1119. GangZoneShowForAll(Zone1, 0xFFFFFF96);//BIANco
  1120. SetPlayerColor(playerid, 0xFFFFFF96);
  1121. dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
  1122. dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
  1123. }
  1124. if(PlayerInfo[playerid][Gangid] == 2)
  1125. {
  1126. GangZoneShowForAll(Zone2, 0xFFFFFF96);//BIANco
  1127. SetPlayerColor(playerid, 0xFFFFFF96);
  1128. dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
  1129. dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
  1130. }
  1131. if(PlayerInfo[playerid][Gangid] == 3)
  1132. {
  1133. GangZoneShowForAll(Zone3, 0xFFFFFF96);//BIANco
  1134. SetPlayerColor(playerid, 0xFFFFFF96);
  1135. dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
  1136. dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
  1137. }
  1138. }
  1139. if(listitem == 3)
  1140. {
  1141. if(PlayerInfo[playerid][Gangid] == 1)
  1142. {
  1143. GangZoneShowForAll(Zone1, 0xFFFF0096);//GIALLO
  1144. SetPlayerColor(playerid, 0xFFFF0096);
  1145. dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
  1146. dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
  1147. }
  1148. if(PlayerInfo[playerid][Gangid] == 2)
  1149. {
  1150. GangZoneShowForAll(Zone2, 0xFFFF0096);//GIALLO
  1151. SetPlayerColor(playerid, 0xFFFF0096);
  1152. dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
  1153. dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
  1154. }
  1155. if(PlayerInfo[playerid][Gangid] == 3)
  1156. {
  1157. GangZoneShowForAll(Zone3, 0xFFFF0096);//GIALLO
  1158. SetPlayerColor(playerid, 0xFFFF0096);
  1159. dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
  1160. dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
  1161. }
  1162. }
  1163. if(listitem == 4)
  1164. {
  1165. if(PlayerInfo[playerid][Gangid] == 1)
  1166. {
  1167. GangZoneShowForAll(Zone1, 0xFF800096);//ARANCIONE
  1168. SetPlayerColor(playerid, 0xFF800096);
  1169. dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
  1170. dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
  1171. }
  1172. if(PlayerInfo[playerid][Gangid] == 2)
  1173. {
  1174. GangZoneShowForAll(Zone2, 0xFF800096);//ARANCIONE
  1175. SetPlayerColor(playerid, 0xFF800096);
  1176. dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
  1177. dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
  1178. }
  1179. if(PlayerInfo[playerid][Gangid] == 3)
  1180. {
  1181. GangZoneShowForAll(Zone3, 0xFF800096);//ARANCIONE
  1182. SetPlayerColor(playerid, 0xFF800096);
  1183. dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
  1184. dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
  1185. }
  1186. }
  1187. if(listitem == 5)
  1188. {
  1189. if(PlayerInfo[playerid][Gangid] == 1)
  1190. {
  1191. GangZoneShowForAll(Zone1, 0xA4007796);//VIOLA
  1192. SetPlayerColor(playerid, 0xA4007796);
  1193. dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
  1194. dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
  1195. }
  1196. if(PlayerInfo[playerid][Gangid] == 2)
  1197. {
  1198. GangZoneShowForAll(Zone2, 0xA4007796);//VIOLA
  1199. SetPlayerColor(playerid, 0xA4007796);
  1200. dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
  1201. dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
  1202. }
  1203. if(PlayerInfo[playerid][Gangid] == 3)
  1204. {
  1205. GangZoneShowForAll(Zone3, 0xA4007796);//VIOLA
  1206. SetPlayerColor(playerid, 0xA4007796);
  1207. dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
  1208. dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
  1209. }
  1210. }
  1211. if(listitem == 6)
  1212. {
  1213. if(PlayerInfo[playerid][Gangid] == 1)
  1214. {
  1215. GangZoneShowForAll(Zone1, 0x00FF0096);//VERDE
  1216. SetPlayerColor(playerid, 0x00FF0096);
  1217. dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
  1218. dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
  1219. }
  1220. if(PlayerInfo[playerid][Gangid] == 2)
  1221. {
  1222. GangZoneShowForAll(Zone2, 0x00FF0096);//VERDE
  1223. SetPlayerColor(playerid, 0x00FF0096);
  1224. dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
  1225. dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
  1226. }
  1227. if(PlayerInfo[playerid][Gangid] == 3)
  1228. {
  1229. GangZoneShowForAll(Zone3, 0x00FF0096);//VERDE
  1230. SetPlayerColor(playerid, 0x00FF0096);
  1231. dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
  1232. dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
  1233. }
  1234. }
  1235. }
  1236. }
  1237. return 0;
  1238. }
  1239.  
  1240. CMD:setgangcolor(playerid,params[])
  1241. {
  1242. if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang and have at least Owner rank in gang for use this command.");
  1243. if(PlayerInfo[playerid][Gangrank] <= 4) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Owner rank in gang for change this gang settings.");
  1244. if(PlayerInfo[playerid][Gangid] == 1 && capture1 >= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need to /capture your gang territory before use this command.");
  1245. if(PlayerInfo[playerid][Gangid] == 2 && capture2 <= 1 && capture2 >= 3) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need to /capture your gang territory before use this command.");
  1246. if(PlayerInfo[playerid][Gangid] == 3 && capture3 <= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need to /capture your gang territory before use this command.");
  1247. ShowPlayerDialog(playerid, DIALOG_GANGCOLOR, DIALOG_STYLE_LIST, "Color list", "{FF0000}Red\n{0000FF}Blue\n{FFFFFF}White\n{FFFF00}Yellow\n{FF3300}Orange\n{C601DD}Purple\n{38F900}Green", "Select", "Close");
  1248. return 1;
  1249. }
  1250.  
  1251. CMD:setrank(playerid,params[])
  1252. {
  1253. new targetID;
  1254. if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang to use this command.");
  1255. if(PlayerInfo[playerid][Gangrank] <= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: Your need Leader rank in gang for use this command.");
  1256. if(sscanf(params, "u", targetID)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Setrank [playerid]");
  1257. if(!IsPlayerConnected(targetID)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player isn't connected.");
  1258. if(PlayerInfo[playerid][Gangrank] <= PlayerInfo[targetID][Gangrank]) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You can't change this player rank.");
  1259. gangRankTargetID = targetID;
  1260. ShowPlayerDialog(playerid,DIALOG_GRANK,DIALOG_STYLE_LIST, "Set Gang Rank", "Member\nCo-leader\nLeader\nCo-Owner\nOwner\n{FF0000}Founder", "Select", "Close");
  1261. return 1;
  1262. }
  1263.  
  1264. stock GetName(playerid)
  1265. {
  1266. new pName[24];
  1267. GetPlayerName(playerid, pName, 24);
  1268. return pName;
  1269. }
  1270.  
  1271. forward TimeOnServer(playerid);
  1272. public TimeOnServer(playerid)
  1273. {
  1274. PlayerInfo[playerid][Sec] +=1;
  1275. if(PlayerInfo[playerid][Sec]>=60)
  1276. {
  1277. PlayerInfo[playerid][Min]++;
  1278. PlayerInfo[playerid][Sec]=0;
  1279. }
  1280. if(PlayerInfo[playerid][Min]>=60)
  1281. {
  1282. PlayerInfo[playerid][Min]=0;
  1283. PlayerInfo[playerid][Hour]++;
  1284. }
  1285. }
Add Comment
Please, Sign In to add comment