Advertisement
Guest User

Dynamic gangs by Tony

a guest
Jul 12th, 2015
1,199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 125.67 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////
  2. ////////////////////////////Dynamic Gang System/////////////////////////////////
  3. ///////////////////////////////////By Tony//////////////////////////////////////
  4. //////////////////////////////Created: 18.1.2015////////////////////////////////
  5. /////////////////////////Please don't remove credits////////////////////////////
  6. ////////////////////////////////////////////////////////////////////////////////
  7.  
  8.  
  9. #include < a_samp >
  10. #include < streamer >
  11. #include < YSI\y_ini >
  12. #include < YSI\y_commands >
  13. #include < sscanf2 >
  14. #include < foreach >
  15.  
  16. #define GANGS "Gangs/%d.ini"
  17. #define MAX_GANG 30
  18.  
  19. #define FIRE "Gangs/Fire/%d.ini"
  20. #define MAX_FIRE 30
  21.  
  22. #define SPLAVA "{00C0FF}" //blue
  23. #define SIVA "{C0C0C0}" //gray
  24. #define CRVENA "{F81414}" //red
  25. #define WHITE "{FFFFFF}"
  26. #define PPLAVA "{0084e3}" //blue
  27. #define ZUTA "{F3FF02}" //yellow
  28. #define SCRVENA 0xFF6347AA //red
  29. #define ZELENA 0x33AA33AA//green
  30. #define SVJETLOPLAVA 0x33CCFFAA//sea blue
  31. #define AZUTA 0xFFFF00FF//yellow
  32. #define LJUBICASTA 0xC2A2DAAA//purple
  33. #define PLAVA 0x1275EDFF
  34. #define PURPLE 0xC2A2DAFF
  35. #define SVIJETLOZELENA 0x00FFFFFF
  36. #define ORANGE 0xF69521AA
  37. #define BIJELA 0xFFFFFFFF
  38. #define COLOR_GREEN 0xADFF2FAA
  39.  
  40. #define DIALOG_GANGHELP 6969
  41. #define DIALOG_GANG 6970
  42. #define DIALOG_EDITING 6971
  43. #define DIALOG_RANK 6972
  44. #define DIALOG_SKIN 6973
  45. #define DIALOG_COORDINATES 6974
  46. #define DIALOG_RANK2 6975
  47. #define DIALOG_SKIN2 6976
  48. #define DIALOG_NAME 6977
  49. #define DIALOG_LICENSE 6978
  50. #define DIALOG_LAPTOP 6979
  51. #define DIALOG_LOCATIONISP 6980
  52. #define DIALOG_WEAPON 6981
  53. #define DIALOG_TARGETS 6982
  54. #define DIALOG_TICKET 6983
  55. #define DIALOG_PDWEAPONS 6984
  56. #define DIALOG_FIRE 6985
  57. #define DIALOG_VATRA 6986
  58.  
  59. enum pInfo
  60. {
  61. aMember,
  62. aLeader,
  63. Rank,
  64. pSkin,
  65. Target,
  66. HaveTarget,
  67. TargetPrice,
  68. HaveVictim,
  69. NameVictim[24],
  70. NameTarget[24],
  71. WantedLevel
  72. }
  73. new PlayerInfo[MAX_PLAYERS][pInfo];
  74.  
  75. enum poInfo
  76. {
  77. Float:X,
  78. Float:Y,
  79. Float:Z,
  80. Float:X1,
  81. Float:Y1,
  82. Float:Z1,
  83. Float:X2,
  84. Float:Y2,
  85. Float:Z2,
  86. Float:X3,
  87. Float:Y3,
  88. Float:Z3,
  89. Float:X4,
  90. Float:Y4,
  91. Float:Z4,
  92. }
  93. new FireInfo[MAX_FIRE][poInfo];
  94.  
  95. enum orInfo
  96. {
  97. Float:uX,
  98. Float:uY,
  99. Float:uZ,
  100. Float:iX,
  101. Float:iY,
  102. Float:iZ,
  103. Float:sX,
  104. Float:sY,
  105. Float:sZ,
  106. Float:LokX,
  107. Float:LokY,
  108. Float:LokZ,
  109. Float:orX,
  110. Float:orY,
  111. Float:orZ,
  112. Float:puX,
  113. Float:puY,
  114. Float:puZ,
  115. Float:arX,
  116. Float:arY,
  117. Float:arZ,
  118. Float:duX,
  119. Float:duY,
  120. Float:duZ,
  121. Name[128],
  122. Rank1[128],
  123. Rank2[128],
  124. Rank3[128],
  125. Rank4[128],
  126. Rank5[128],
  127. Rank6[128],
  128. Int,
  129. VW,
  130. rSkin1,
  131. rSkin2,
  132. rSkin3,
  133. rSkin4,
  134. rSkin5,
  135. rSkin6,
  136. AllowedF,
  137. AllowedR,
  138. AllowedD,
  139. AllowedH,
  140. AllowedPD,
  141. AllowedFD
  142. }
  143. new FireT;
  144. new Fire=0;
  145. new Fireid=-1;
  146. new FireNumber=0;
  147. new CP[MAX_PLAYERS];
  148. new rank[MAX_PLAYERS];
  149. new orga[MAX_PLAYERS]=-1;
  150. new poz[MAX_PLAYERS]=-1;
  151. new GangInfo[MAX_GANG][orInfo];
  152. new GangPickup[sizeof(GangInfo)];
  153. new GangPickup2[sizeof(GangInfo)];
  154. new PDWeapons[sizeof(GangInfo)];
  155. new Arrest[sizeof(GangInfo)];
  156. new Text3D:GangLabel[sizeof(GangInfo)];
  157. new Aparat[sizeof(GangInfo)];
  158. new Text3D:AparatLabel[sizeof(GangInfo)];
  159. new Member[12][15][MAX_PLAYER_NAME];
  160. new Leader[2][15][MAX_PLAYER_NAME];
  161. new VehiclesID[MAX_GANG][15];
  162. new VehiclesColor[MAX_GANG][15];
  163. new vCreated[MAX_GANG][15];
  164. new VehID[MAX_GANG][15];
  165. new Float:Vehicle[MAX_GANG][4][15];
  166. new Tazan[MAX_PLAYERS];
  167. new EmptyTaser[MAX_PLAYERS];
  168. new PlacedRadar[MAX_PLAYERS];
  169. new PriceRadar[MAX_PLAYERS];
  170. new SpeedRadar[MAX_PLAYERS];
  171. new RadarObject[MAX_PLAYERS];
  172. new Text3D:RadarLabel[MAX_PLAYERS];
  173. new Pictured[MAX_PLAYERS];
  174. new TicketWrote[MAX_PLAYERS];
  175. new TicketPrice[MAX_PLAYERS];
  176. new JailTime[MAX_PLAYERS];
  177. new Jailed[MAX_PLAYERS];
  178. new Text3D:ArrestLabel[sizeof(GangInfo)];
  179. new Pick[MAX_PLAYERS];
  180. new Pic[MAX_PLAYERS];
  181. new FireO[5];
  182.  
  183. public OnFilterScriptInit()
  184. {
  185. print("////////////////////////////////////////////////////////////////////////////////");
  186. print("////////////////////////////Dynamic Gang System/////////////////////////////////");
  187. print("///////////////////////////////////By Tony//////////////////////////////////////");
  188. print("//////////////////////////////Created: 18.1.2015////////////////////////////////");
  189. print("/////////////////////////Please don't remove credits////////////////////////////");
  190. print("////////////////////////////////////////////////////////////////////////////////");
  191.  
  192. SetTimer("CreateFire",600000,1);
  193. SetTimer("ExtinguisheFire",1800, 1);
  194.  
  195. for(new i = 0; i < sizeof(FireInfo); i++)
  196. {
  197. new oFile[50];
  198. format(oFile, sizeof(oFile), FIRE, i);
  199. if(fexist(oFile))
  200. {
  201. INI_ParseFile(oFile, "LoadFire", .bExtra = true, .extra = i);
  202. }
  203. }
  204. for(new i = 0; i < sizeof(GangInfo); i++)
  205. {
  206. new oFile[50];
  207. format(oFile, sizeof(oFile), GANGS, i);
  208. if(fexist(oFile))
  209. {
  210. INI_ParseFile(oFile, "LoadGangs", .bExtra = true, .extra = i);
  211. if(vCreated[i][0] == 1)
  212. {
  213. VehID[i][0] = CreateVehicle(VehiclesID[i][0],Vehicle[i][0][0],Vehicle[i][1][0],Vehicle[i][2][0],Vehicle[i][3][0],VehiclesColor[i][0],VehiclesColor[i][0],30000);
  214. }
  215. if(vCreated[i][1] == 1)
  216. {
  217. VehID[i][1] = CreateVehicle(VehiclesID[i][1],Vehicle[i][0][1],Vehicle[i][1][1],Vehicle[i][2][1],Vehicle[i][3][1],VehiclesColor[i][1],VehiclesColor[i][1],30000);
  218. }
  219. if(vCreated[i][2] == 1)
  220. {
  221. VehID[i][2] = CreateVehicle(VehiclesID[i][2],Vehicle[i][0][2],Vehicle[i][1][2],Vehicle[i][2][2],Vehicle[i][3][2],VehiclesColor[i][2],VehiclesColor[i][2],30000);
  222. }
  223. if(vCreated[i][3] == 1)
  224. {
  225. VehID[i][3] = CreateVehicle(VehiclesID[i][3],Vehicle[i][0][3],Vehicle[i][1][3],Vehicle[i][2][3],Vehicle[i][3][3],VehiclesColor[i][3],VehiclesColor[i][3],30000);
  226. }
  227. if(vCreated[i][4] == 1)
  228. {
  229. VehID[i][4] = CreateVehicle(VehiclesID[i][4],Vehicle[i][0][4],Vehicle[i][1][4],Vehicle[i][2][4],Vehicle[i][3][4],VehiclesColor[i][4],VehiclesColor[i][4],30000);
  230. }
  231. if(vCreated[i][5] == 1)
  232. {
  233. VehID[i][5] = CreateVehicle(VehiclesID[i][5],Vehicle[i][0][5],Vehicle[i][1][5],Vehicle[i][2][5],Vehicle[i][3][5],VehiclesColor[i][5],VehiclesColor[i][5],30000);
  234. }
  235. if(vCreated[i][6] == 1)
  236. {
  237. VehID[i][6] = CreateVehicle(VehiclesID[i][6],Vehicle[i][0][6],Vehicle[i][1][6],Vehicle[i][2][6],Vehicle[i][3][6],VehiclesColor[i][6],VehiclesColor[i][6],30000);
  238. }
  239. if(vCreated[i][7] == 1)
  240. {
  241. VehID[i][7] = CreateVehicle(VehiclesID[i][7],Vehicle[i][0][7],Vehicle[i][1][7],Vehicle[i][2][7],Vehicle[i][3][7],VehiclesColor[i][7],VehiclesColor[i][7],30000);
  242. }
  243. if(vCreated[i][8] == 1)
  244. {
  245. VehID[i][8] = CreateVehicle(VehiclesID[i][8],Vehicle[i][0][8],Vehicle[i][1][8],Vehicle[i][2][8],Vehicle[i][3][8],VehiclesColor[i][8],VehiclesColor[i][8],30000);
  246. }
  247. if(vCreated[i][9] == 1)
  248. {
  249. VehID[i][9] = CreateVehicle(VehiclesID[i][9],Vehicle[i][0][9],Vehicle[i][1][9],Vehicle[i][2][9],Vehicle[i][3][9],VehiclesColor[i][9],VehiclesColor[i][9],30000);
  250. }
  251. if(vCreated[i][10] == 1)
  252. {
  253. VehID[i][10] = CreateVehicle(VehiclesID[i][10],Vehicle[i][0][10],Vehicle[i][1][10],Vehicle[i][2][10],Vehicle[i][3][10],VehiclesColor[i][10],VehiclesColor[i][10],30000);
  254. }
  255. if(vCreated[i][11] == 1)
  256. {
  257. VehID[i][11] = CreateVehicle(VehiclesID[i][11],Vehicle[i][0][11],Vehicle[i][1][11],Vehicle[i][2][11],Vehicle[i][3][11],VehiclesColor[i][11],VehiclesColor[i][11],30000);
  258. }
  259. if(vCreated[i][12] == 1)
  260. {
  261. VehID[i][12] = CreateVehicle(VehiclesID[i][12],Vehicle[i][0][12],Vehicle[i][1][12],Vehicle[i][2][12],Vehicle[i][3][12],VehiclesColor[i][12],VehiclesColor[i][12],30000);
  262. }
  263. if(vCreated[i][13] == 1)
  264. {
  265. VehID[i][13] = CreateVehicle(VehiclesID[i][13],Vehicle[i][0][13],Vehicle[i][1][13],Vehicle[i][2][13],Vehicle[i][3][13],VehiclesColor[i][13],VehiclesColor[i][13],30000);
  266. }
  267. if(vCreated[i][14] == 1)
  268. {
  269. VehID[i][14] = CreateVehicle(VehiclesID[i][14],Vehicle[i][0][14],Vehicle[i][1][14],Vehicle[i][2][14],Vehicle[i][3][14],VehiclesColor[i][14],VehiclesColor[i][14],30000);
  270. }
  271. new string[128];
  272. GangPickup[i] = CreateDynamicPickup(1272, 1, GangInfo[i][uX], GangInfo[i][uY], GangInfo[i][uZ]);
  273. format(string,sizeof(string),"[ %s ]",GangInfo[i][Name]);
  274. GangLabel[i] = CreateDynamic3DTextLabel(string,0x660066BB,GangInfo[i][uX],GangInfo[i][uY],GangInfo[i][uZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  275. GangPickup2[i] = CreateDynamicPickup(1272, 1, GangInfo[i][iX], GangInfo[i][iY], GangInfo[i][iZ]);
  276. PDWeapons[i] = CreatePickup(355, 1, GangInfo[i][orX],GangInfo[i][orY],GangInfo[i][orZ], 0);
  277. Arrest[i] = CreateDynamicPickup(1314, 1, GangInfo[i][puX],GangInfo[i][puY],GangInfo[i][puZ], 0);
  278. ArrestLabel[i] = CreateDynamic3DTextLabel("{FF9900}Place for arrest {FF3300}[{FFFFFF}/arrest{FF3300}]",-1,GangInfo[i][puX],GangInfo[i][puY],GangInfo[i][puZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  279. Aparat[i] = CreateDynamicPickup(1239, 1, GangInfo[i][duX],GangInfo[i][duY],GangInfo[i][duZ], 0);
  280. AparatLabel[i] = CreateDynamic3DTextLabel("{FF9900}Place for pickup fire extinguisher {FF3300}[{FFFFFF}/fireext{FF3300}]",-1,GangInfo[i][duX],GangInfo[i][duY],GangInfo[i][duZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  281. }
  282. }
  283. for(new i=0;i<MAX_PLAYERS;i++)
  284. {
  285. if(IsPlayerConnected(i))
  286. {
  287. PlayerInfo[i][aMember] = -1;
  288. PlayerInfo[i][aLeader] = -1;
  289. Tazan[i] = 0;
  290. new str[128]; format(str,sizeof(str),"%s",GetName(i));
  291. if(fexist(str))
  292. {
  293. INI_ParseFile(str, "LoadPlayer_%s", .bExtra = true, .extra = i);
  294. }
  295. }
  296. }
  297. return 1;
  298. }
  299.  
  300. forward ExtinguisheFire();
  301. public ExtinguisheFire()
  302. {
  303. foreach (Player, i)
  304. {
  305. new org=-1;
  306. if(PlayerInfo[i][aLeader] > -1)
  307. {
  308. org = PlayerInfo[i][aLeader];
  309. }
  310. if(PlayerInfo[i][aMember] > -1)
  311. {
  312. org = PlayerInfo[i][aMember];
  313. }
  314. if(GangInfo[org][AllowedFD] == 1)
  315. {
  316. if(Fire == 1)
  317. {
  318. if(IsPlayerInRangeOfPoint(i,35.0,FireInfo[Fireid][X],FireInfo[Fireid][Y],FireInfo[Fireid][Z]))
  319. {
  320. if(GetPlayerWeapon(i) == 42 || IsPlayerInAnyVehicle(i))
  321. {
  322. new Keys,ud,lr;
  323. GetPlayerKeys(i,Keys,ud,lr);
  324. if(Keys == KEY_FIRE)
  325. {
  326. new rand = random(5);
  327. if(rand < 5)
  328. {
  329. DestroyDynamicObject(FireO[rand]);
  330. FireT++;
  331. }
  332. if(FireT == 10)
  333. {
  334. FireT = 0;
  335. for(new a = 0; a < 5; a++)
  336. {
  337. DestroyDynamicObject(FireO[a]);
  338. }
  339. new String[160];
  340. for(new d = 0; d < MAX_PLAYERS; d++)
  341. {
  342. new band=-1;
  343. if(PlayerInfo[d][aLeader] > -1)
  344. {
  345. band=PlayerInfo[d][aLeader];
  346. }
  347. if(PlayerInfo[d][aMember] > -1)
  348. {
  349. band=PlayerInfo[d][aMember];
  350. }
  351. if(GangInfo[band][AllowedFD] == 1 || GangInfo[band][AllowedPD] == 1)
  352. {
  353. if(IsPlayerInRangeOfPoint(d,20.0,FireInfo[Fireid][X],FireInfo[Fireid][Y],FireInfo[Fireid][Z]))
  354. {
  355. format(String,sizeof(String),"{FF9900}You've participated in extinguishing the fire so you've got money on your bank account. {FFFFFF}600$!");
  356. SendClientMessage(d,SVJETLOPLAVA,String);
  357. GivePlayerMoney(d,600);
  358. }
  359. }
  360. }
  361. format(String,sizeof(String),"{0099CC}[Headquaters] {FF9900} All units, fire is extinguished!");
  362. FDChat(String);
  363. Fire = 0;
  364. }
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. return 1;
  372. }
  373.  
  374. forward CreateFire();
  375. public CreateFire()
  376. {
  377. if(Fire == 0)
  378. {
  379. new rand=random(FireNumber);
  380. new oFile[50];
  381. format(oFile, sizeof(oFile), FIRE, rand);
  382. if(fexist(oFile))
  383. {
  384. Fire = 1;
  385. FireO[0] = CreateDynamicObject(18690, FireInfo[rand][X],FireInfo[rand][Y],FireInfo[rand][Z]-2.3, 0, 0, 0.0);
  386. FireO[1] = CreateDynamicObject(18690, FireInfo[rand][X1],FireInfo[rand][Y1],FireInfo[rand][Z1]-2.3, 0, 0, 0.0);
  387. FireO[2] = CreateDynamicObject(18690, FireInfo[rand][X2],FireInfo[rand][Y2],FireInfo[rand][Z2]-2.3, 0, 0, 0.0);
  388. FireO[3] = CreateDynamicObject(18690, FireInfo[rand][X3],FireInfo[rand][Y3],FireInfo[rand][Z3]-2.3, 0, 0, 0.0);
  389. FireO[4] = CreateDynamicObject(18690, FireInfo[rand][X4],FireInfo[rand][Y4],FireInfo[rand][Z4]-2.3, 0, 0, 0.0);
  390. new String[280];
  391. format(String,sizeof(String),"{0099CC}[Headquaters] {FF9900}There's a new fire, to locate it use {FFFFFF}/flocate! {FF9900}Your job is to close the road!!");
  392. PDChat(String);
  393. format(String,sizeof(String),"{0099CC}[Headquaters] {FF9900}There's a new fire, to locate it use {FFFFFF}/flocate! {FF9900}Your job is to extinguish the fire!!");
  394. FDChat(String);
  395. Fireid=rand;
  396. }
  397. else
  398. {
  399. CreateFire();
  400. }
  401. }
  402. return 1;
  403. }
  404.  
  405. forward ReturnPick(playerid);
  406. public ReturnPick(playerid)
  407. {
  408. if(Pick[playerid] > 0)
  409. {
  410. Pick[playerid]--;
  411. }
  412. else
  413. {
  414. Pick[playerid]=0;
  415. KillTimer(Pic[playerid]);
  416. }
  417. }
  418.  
  419. public OnPlayerPickUpPickup(playerid, pickupid)
  420. {
  421. for(new i=0;i<sizeof(GangInfo);i++)
  422. {
  423. if(pickupid == PDWeapons[i])
  424. {
  425. new org=-1;
  426. if(PlayerInfo[playerid][aLeader] > -1)
  427. {
  428. org = PlayerInfo[playerid][aLeader];
  429. }
  430. if(PlayerInfo[playerid][aMember] > -1)
  431. {
  432. org = PlayerInfo[playerid][aMember];
  433. }
  434. if(GangInfo[org][AllowedPD] == 1)
  435. {
  436. if(Pick[playerid] == 0)
  437. {
  438. ShowPlayerDialog(playerid,DIALOG_PDWEAPONS,DIALOG_STYLE_LIST,"PD weapons"," Patrol\n Pursuit\n Special\n Professional\n Undercover\n Sniper\n Heal and Armour\n Taser","Odaberi","Odustani");
  439. Pick[playerid]=5;
  440. Pic[playerid]=SetTimerEx("ReturnPick",1000,true,"i",playerid);
  441. }
  442. }
  443. else
  444. {
  445. return GameTextForPlayer(playerid, "~r~locked!", 3000, 1);
  446. }
  447. }
  448. }
  449. return 1;
  450. }
  451.  
  452. public OnFilterScriptExit()
  453. {
  454. for(new a = 0; a < sizeof(GangInfo); a++)
  455. {
  456. DestroyDynamicPickup(GangPickup[a]);
  457. DestroyDynamicPickup(GangPickup2[a]);
  458. DestroyDynamic3DTextLabel(GangLabel[a]);
  459. DestroyDynamicPickup(Aparat[a]);
  460. DestroyDynamic3DTextLabel(AparatLabel[a]);
  461. DestroyDynamicPickup(Arrest[a]);
  462. DestroyDynamic3DTextLabel(ArrestLabel[a]);
  463. DestroyPickup(PDWeapons[a]);
  464. for(new i=0;i<15;i++)
  465. {
  466. DestroyVehicle(VehID[a][i]);
  467. }
  468. }
  469. for(new i=0;i<MAX_PLAYERS;i++)
  470. DestroyDynamic3DTextLabel(RadarLabel[i]);
  471. return 1;
  472. }
  473.  
  474. public OnPlayerDisconnect(playerid, reason)
  475. {
  476. if(PlayerInfo[playerid][HaveTarget] == 1)
  477. {
  478. new id = GetPlayerID(PlayerInfo[playerid][NameTarget]);
  479. if(id == INVALID_PLAYER_ID) return 1;
  480. SendClientMessage(id,AZUTA,"* Your target has quit the server!");
  481. format(PlayerInfo[id][NameVictim],24,"Niko");
  482. PlayerInfo[id][HaveVictim] = 0;
  483. }
  484. if(PlayerInfo[playerid][HaveVictim] == 1)
  485. {
  486. new id = GetPlayerID(PlayerInfo[playerid][NameVictim]);
  487. if(id == INVALID_PLAYER_ID) return 1;
  488. format(PlayerInfo[id][NameTarget],24,"Niko");
  489. PlayerInfo[id][HaveTarget] = 0;
  490. new String[128];
  491. format(String,sizeof(String),"Free target: %s | Price: %d$ | ID Target: %d |",GetName(id),PlayerInfo[id][TargetPrice],id);
  492. HChat(String);
  493. }
  494. return 1;
  495. }
  496.  
  497. public OnPlayerDeath(playerid, killerid, reason)
  498. {
  499. if(!strcmp(PlayerInfo[killerid][NameVictim], GetName(playerid), true))
  500. {
  501. new String[200];
  502. format(String,sizeof(String),"|Hitman| %s has killed %s and won the price of %d$",GetName(killerid),GetName(playerid),PlayerInfo[playerid][TargetPrice]);
  503. HChat(String);
  504. PlayerInfo[killerid][HaveVictim] = 0;
  505. format(PlayerInfo[killerid][NameVictim],24,"Niko");
  506. GivePlayerMoney(killerid,PlayerInfo[playerid][TargetPrice]);
  507. PlayerInfo[playerid][HaveTarget] = 0;
  508. PlayerInfo[playerid][Target] = 0;
  509. format(PlayerInfo[playerid][NameTarget],24,"Niko");
  510. PlayerInfo[playerid][TargetPrice] = 0;
  511. }
  512. return 1;
  513. }
  514. public OnPlayerEnterCheckpoint(playerid)
  515. {
  516. //Weapons for Hitmans======
  517. if(CP[playerid] == 1)
  518. {
  519. DisablePlayerCheckpoint(playerid);
  520. ShowPlayerDialog(playerid,DIALOG_WEAPON,DIALOG_STYLE_LIST,"Oruzje"," Boxer\n Knife\n Deagle\n MP5\n M4\n Sniper\n Shotgun","Odaberi","Odustani");
  521. }
  522. if(CP[playerid] == 2)
  523. {
  524. DisablePlayerCheckpoint(playerid);
  525. ShowPlayerDialog(playerid,DIALOG_WEAPON,DIALOG_STYLE_LIST,"Oruzje"," Boxer\n Knife\n Deagle\n MP5\n M4\n Sniper\n Shotgun","Odaberi","Odustani");
  526. }
  527. if(CP[playerid] == 3)
  528. {
  529. DisablePlayerCheckpoint(playerid);
  530. ShowPlayerDialog(playerid,DIALOG_WEAPON,DIALOG_STYLE_LIST,"Oruzje"," Boxer\n Knife\n Deagle\n MP5\n M4\n Sniper\n Shotgun","Odaberi","Odustani");
  531. }
  532. if(CP[playerid] == 4)
  533. {
  534. DisablePlayerCheckpoint(playerid);
  535. ShowPlayerDialog(playerid,DIALOG_WEAPON,DIALOG_STYLE_LIST,"Oruzje"," Boxer\n Knife\n Deagle\n MP5\n M4\n Sniper\n Shotgun","Odaberi","Odustani");
  536. }
  537. if(CP[playerid] == 5)
  538. {
  539. DisablePlayerCheckpoint(playerid);
  540. ShowPlayerDialog(playerid,DIALOG_WEAPON,DIALOG_STYLE_LIST,"Oruzje"," Boxer\n Knife\n Deagle\n MP5\n M4\n Sniper\n Shotgun","Odaberi","Odustani");
  541. }
  542. if(CP[playerid] == 6)
  543. {
  544. DisablePlayerCheckpoint(playerid);
  545. ShowPlayerDialog(playerid,DIALOG_WEAPON,DIALOG_STYLE_LIST,"Oruzje"," Boxer\n Knife\n Deagle\n MP5\n M4\n Sniper\n Shotgun","Odaberi","Odustani");
  546. }
  547. if(CP[playerid] == 7)
  548. {
  549. DisablePlayerCheckpoint(playerid);
  550. ShowPlayerDialog(playerid,DIALOG_WEAPON,DIALOG_STYLE_LIST,"Oruzje"," Boxer\n Knife\n Deagle\n MP5\n M4\n Sniper\n Shotgun","Odaberi","Odustani");
  551. }
  552. CP[playerid] = 0;
  553. return 1;
  554. }
  555.  
  556. public OnPlayerConnect(playerid)
  557. {
  558. PlayerInfo[playerid][aMember] = -1;
  559. PlayerInfo[playerid][aLeader] = -1;
  560. new str[128]; format(str,sizeof(str),"Gangs/Users/%s",GetName(playerid));
  561. if(fexist(str))
  562. {
  563. INI_ParseFile(str, "LoadPlayer_%s", .bExtra = true, .extra = playerid);
  564. }
  565. return 1;
  566. }
  567.  
  568. public OnPlayerSpawn(playerid)
  569. {
  570. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  571. if(PlayerInfo[playerid][aLeader] > -1)
  572. {
  573. new org=PlayerInfo[playerid][aLeader];
  574. new c=0;
  575. for(new i=0;i<2;i++)
  576. {
  577. if(udb_hash(Leader[i][org]) != udb_hash(GetName(playerid)))
  578. {
  579. c++;
  580. if(c==2)
  581. {
  582. SendClientMessage(playerid,-1,"You're no longer a leader!");
  583. PlayerInfo[playerid][aLeader] = -1;
  584. SavePlayer(playerid);
  585. }
  586. }
  587. }
  588. }
  589. if(PlayerInfo[playerid][aMember] > -1)
  590. {
  591. new org=PlayerInfo[playerid][aMember];
  592. new c=0;
  593. for(new i=0;i<12;i++)
  594. {
  595. if(udb_hash(Member[i][org]) != udb_hash(GetName(playerid)))
  596. {
  597. c++;
  598. if(c==12)
  599. {
  600. SendClientMessage(playerid,-1,"You have been kicked out of his gang!");
  601. PlayerInfo[playerid][aMember] = -1;
  602. SavePlayer(playerid);
  603. }
  604. }
  605. }
  606. }
  607. for(new i=0; i<MAX_GANG;i++)
  608. {
  609. if(PlayerInfo[playerid][aMember] == i || PlayerInfo[playerid][aLeader] == i)
  610. {
  611. SetPlayerPos(playerid,GangInfo[i][sX],GangInfo[i][sY],GangInfo[i][sZ]);
  612. }
  613. }
  614. return 1;
  615. }
  616.  
  617. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  618. {
  619. if(!ispassenger)
  620. {
  621. new Float:Poz[3]; GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  622. for(new i = 0; i < 15; i++)
  623. {
  624. for(new a = 0; a < sizeof(GangInfo); a++)
  625. {
  626. if(vehicleid == VehID[a][i])
  627. {
  628. if(PlayerInfo[playerid][aMember] != a && PlayerInfo[playerid][aLeader] !=a)
  629. {
  630. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  631. new str[128];
  632. format(str,sizeof(str),"~b~%s",GangInfo[a][Name]);
  633. GameTextForPlayer(playerid, str, 2500, 5);
  634. }
  635. if(IsPlayerAdmin(playerid))
  636. {
  637. new str[128];
  638. format(str,sizeof(str),"{FF9900}Gang ID: {FFFFFF}%d {FF0000}| {FF9900}Car slot: {FFFFFF}%d",a,i);
  639. SendClientMessage(playerid,-1,str);
  640. }
  641. }
  642. }
  643. }
  644. }
  645. return 1;
  646. }
  647.  
  648. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
  649. {
  650. new org=-1;
  651. if(PlayerInfo[playerid][aLeader] > -1)
  652. {
  653. org = PlayerInfo[playerid][aLeader];
  654. }
  655. if(PlayerInfo[playerid][aMember] > -1)
  656. {
  657. org = PlayerInfo[playerid][aMember];
  658. }
  659. if(GangInfo[org][AllowedPD] == 1)
  660. {
  661. new org2=-1;
  662. if(PlayerInfo[damagedid][aLeader] > -1)
  663. {
  664. org2 = PlayerInfo[damagedid][aLeader];
  665. }
  666. if(PlayerInfo[damagedid][aMember] > -1)
  667. {
  668. org2 = PlayerInfo[damagedid][aMember];
  669. }
  670. if(org2>-1)
  671. {
  672. if(GangInfo[org2][AllowedPD] != 1)
  673. {
  674. if(damagedid != playerid)
  675. {
  676. if(weaponid == 23)
  677. {
  678. new Float:px,Float:py,Float:pz;
  679. GetPlayerPos(damagedid,px,py,pz);
  680. if(IsPlayerInRangeOfPoint(playerid,25.0,px,py,pz))
  681. {
  682. if(Tazan[damagedid] == 1)return 1;
  683. if(EmptyTaser[playerid] == 1){return SendClientMessage(playerid,-1,"You need to wait for reload of taser!");}
  684. new string[128];
  685. format(string,sizeof(string),"**%s takes out a taser and strikes %s for 8 seconds.",GetName(playerid),GetName(damagedid));
  686. ProxDetector(18.0, playerid, string, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA);
  687. format(string,sizeof(string),"%s {FFFFFF}you are shocked for 8 seconds.",GetName(playerid));
  688. SendClientMessage(damagedid,LJUBICASTA,string);
  689. format(string,sizeof(string),"You shocked %s for 8 seconds",GetName(damagedid));
  690. SendClientMessage(playerid,LJUBICASTA,string);
  691. TogglePlayerControllable(damagedid,0);
  692. Tazan[damagedid] = 1;
  693. EmptyTaser[playerid] = 1;
  694. SetTimerEx("Tazz",8000,0,"d",damagedid);
  695. SetTimerEx("Taz1",3000,0,"d",playerid);
  696. }
  697. }
  698. }
  699. }else return SendClientMessage(playerid,-1,"The player is a member of the police!");
  700. }
  701. else
  702. {
  703. if(damagedid != playerid)
  704. {
  705. if(weaponid == 23)
  706. {
  707. new Float:px,Float:py,Float:pz;
  708. GetPlayerPos(damagedid,px,py,pz);
  709. if(IsPlayerInRangeOfPoint(playerid,25.0,px,py,pz))
  710. {
  711. if(Tazan[damagedid] == 1)return 1;
  712. if(EmptyTaser[playerid] == 1){return SendClientMessage(playerid,-1,"You need to wait for reload of taser!");}
  713. new string[128];
  714. format(string,sizeof(string),"**%s takes out a taser and strikes %s for 8 seconds.",GetName(playerid),GetName(damagedid));
  715. ProxDetector(18.0, playerid, string, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA);
  716. format(string,sizeof(string),"%s {FFFFFF}you are shocked for 8 seconds.",GetName(playerid));
  717. SendClientMessage(damagedid,LJUBICASTA,string);
  718. format(string,sizeof(string),"You shocked %s for 8 seconds",GetName(damagedid));
  719. SendClientMessage(playerid,LJUBICASTA,string);
  720. TogglePlayerControllable(damagedid,0);
  721. Tazan[damagedid] = 1;
  722. EmptyTaser[playerid] = 1;
  723. SetTimerEx("Tazz",8000,0,"d",damagedid);
  724. SetTimerEx("Taz1",3000,0,"d",playerid);
  725. }
  726. }
  727. }
  728. }
  729. }else return SendClientMessage(playerid,-1,"You are not member of the police!");
  730. return 1;
  731. }
  732.  
  733. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  734. {
  735. if( newkeys == KEY_SECONDARY_ATTACK )
  736. {
  737. for(new i=0;i<MAX_GANG;i++)
  738. {
  739. if(IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[i][uX], GangInfo[i][uY], GangInfo[i][uZ]) && !IsPlayerInAnyVehicle(playerid) && (PlayerInfo[playerid][aMember] == i || PlayerInfo[playerid][aLeader] == i))
  740. {
  741. SetPlayerVirtualWorld(playerid, GangInfo[i][VW]);
  742. SetPlayerInterior(playerid, GangInfo[i][Int]);
  743. SetPlayerPos(playerid, GangInfo[i][iX], GangInfo[i][iY], GangInfo[i][iZ]);
  744. }
  745. if(IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[i][iX], GangInfo[i][iY], GangInfo[i][iZ]) && !IsPlayerInAnyVehicle(playerid))
  746. {
  747. SetPlayerVirtualWorld(playerid, GangInfo[i][VW]);
  748. SetPlayerInterior(playerid, GangInfo[i][Int]);
  749. SetPlayerPos(playerid, GangInfo[i][uX], GangInfo[i][uY], GangInfo[i][uZ]);
  750. }
  751. }
  752. }
  753. return 1;
  754. }
  755. stock getEmptyID(const len, const lokacija[])
  756. {
  757. new id = (-1);
  758. for(new loop = (0), provjera = (-1), Data_[64] = "\0"; loop != len; loop++)
  759. {
  760. provjera = (loop);
  761. format(Data_, (sizeof Data_), lokacija ,provjera);
  762. if(!fexist(Data_))
  763. {
  764. id = (provjera);
  765. break;
  766. }
  767. }
  768. return (id);
  769. }
  770. stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  771. {
  772. // Created by Y_Less
  773.  
  774. new Float:a;
  775.  
  776. GetPlayerPos(playerid, x, y, a);
  777. GetPlayerFacingAngle(playerid, a);
  778.  
  779. if (GetPlayerVehicleID(playerid)) {
  780. GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  781. }
  782.  
  783. x += (distance * floatsin(-a, degrees));
  784. y += (distance * floatcos(-a, degrees));
  785. }
  786. stock GetVehicleSpeed(vehicleid)
  787. {
  788. new Float:V[3];
  789. GetVehicleVelocity(vehicleid, V[0], V[1], V[2]);
  790. return floatround(floatsqroot(V[0] * V[0] + V[1] * V[1] + V[2] * V[2]) * 180.00);
  791. }
  792. stock GetPlayerID(const name[])
  793. {
  794. for(new i; i<MAX_PLAYERS; i++)
  795. {
  796. if(IsPlayerConnected(i))
  797. {
  798. new pName[MAX_PLAYER_NAME];
  799. GetPlayerName(i, pName, sizeof(pName));
  800. if(strcmp(name, pName, true)==0)
  801. {
  802. return i;
  803. }
  804. }
  805. }
  806. return -1;
  807. }
  808. stock udb_hash(buf[]) //HASH PASS
  809. {
  810. new length=strlen(buf);
  811. new s1 = 1;
  812. new s2 = 0;
  813. new n;
  814. for (n=0; n<length; n++)
  815. {
  816. s1 = (s1 + buf[n]) % 65521;
  817. s2 = (s2 + s1) % 65521;
  818. }
  819. return (s2 << 16) + s1;
  820. }
  821. forward JailTimer(playerid,org);
  822. public JailTimer(playerid,org)
  823. {
  824. if(Jailed[playerid] == 1)
  825. {
  826. if(JailTime[playerid] == 0)
  827. {
  828. Jailed[playerid] = 0;
  829. SendClientMessage(playerid,-1,"You are released from prison");
  830. SetPlayerPos(playerid,GangInfo[org][puX], GangInfo[org][puY], GangInfo[org][puZ]);
  831. }
  832. else
  833. {
  834. JailTime[playerid] -= 1000;
  835. SetTimerEx("JailTimer", 1000,false,"id",playerid,org);
  836. }
  837. }
  838. return 1;
  839. }
  840. forward RadarPicture(playerid);
  841. public RadarPicture(playerid)
  842. {
  843. Pictured[playerid] = 0;
  844. return 1;
  845. }
  846. forward Taz1(playerid);
  847. public Taz1(playerid)
  848. {
  849. EmptyTaser[playerid] = 0;
  850. return 1;
  851. }
  852. forward Tazz(playerid);
  853. public Tazz(playerid)
  854. {
  855. TogglePlayerControllable(playerid,1);
  856. Tazan[playerid] = 0;
  857. return 1;
  858. }
  859.  
  860. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  861. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  862. {
  863. if(IsPlayerConnected(playerid))
  864. {
  865. new Float:posx, Float:posy, Float:posz;
  866. new Float:oldposx, Float:oldposy, Float:oldposz;
  867. new Float:tempposx, Float:tempposy, Float:tempposz;
  868. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  869. for(new i = 0; i < MAX_PLAYERS; i++)
  870. {
  871. if(IsPlayerConnected(i))
  872. {
  873. GetPlayerPos(i, posx, posy, posz);
  874. tempposx = (oldposx -posx);
  875. tempposy = (oldposy -posy);
  876. tempposz = (oldposz -posz);
  877. if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
  878. {
  879. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  880. {
  881. SendClientMessage(i, col1, string);
  882. }
  883. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  884. {
  885. SendClientMessage(i, col2, string);
  886. }
  887. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  888. {
  889. SendClientMessage(i, col3, string);
  890. }
  891. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  892. {
  893. SendClientMessage(i, col4, string);
  894. }
  895. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  896. {
  897. SendClientMessage(i, col5, string);
  898. }
  899. }
  900. }
  901. }
  902. }
  903. return 1;
  904. }
  905.  
  906. public OnPlayerUpdate(playerid)
  907. {
  908. new playerState = GetPlayerState(playerid);
  909. if(IsPlayerInAnyVehicle(playerid) && playerState == PLAYER_STATE_DRIVER)
  910. {
  911. RadarCheck(playerid);
  912. }
  913. return 1;
  914. }
  915.  
  916. forward RadarCheck(playerid);
  917. public RadarCheck(playerid)
  918. {
  919. new org;
  920. if(PlayerInfo[playerid][aLeader] > -1)
  921. {
  922. org = PlayerInfo[playerid][aLeader];
  923. }
  924. if(PlayerInfo[playerid][aMember] > -1)
  925. {
  926. org = PlayerInfo[playerid][aMember];
  927. }
  928. if(GangInfo[org][AllowedPD] == 1) {return 1;}
  929. for(new i=0; i<MAX_PLAYERS; i++)
  930. {
  931. if(PlacedRadar[i] == 1)
  932. {
  933. new Float:rX,Float:rY,Float:rZ;
  934. GetDynamicObjectPos(RadarObject[i],rX,rY,rZ);
  935. if(Pictured[playerid] == 0)
  936. {
  937. if(IsPlayerInRangeOfPoint(playerid,30.0,rX,rY,rZ))
  938. {
  939. new VehId = GetPlayerVehicleID(playerid);
  940. if(GetVehicleSpeed(VehId) > SpeedRadar[i])
  941. {
  942. Pictured[playerid] = 1;
  943. new String[200];
  944. format(String,sizeof(String),"{FF0000}Radar | {FF9900}Ticket: {FFFFFF}%d$ {FF0000}| {FF9900}You drive {FFFFFF}%d km/h {FF0000}| {FF9900}Allowed {FFFFFF}%d km/h {FF0000}| {FF9900}Pictured: {FFFFFF}%s",PriceRadar[i],GetVehicleSpeed(VehId),SpeedRadar[i],GetName(i));
  945. SendClientMessage(playerid,-1,String);
  946. GivePlayerMoney(playerid,-PriceRadar[i]);
  947. format(String,sizeof(String),"{FF0000}Radar | {FF9900}Ticket: {FFFFFF}%d$ {FF0000}| {FF9900}He drive {FFFFFF}%d km/h {FF0000}| {FF9900}Allowed {FFFFFF}%d km/h {FF0000}| {FF9900}Name: {FFFFFF}%s",PriceRadar[i],GetVehicleSpeed(VehId),SpeedRadar[i],GetName(playerid));
  948. SendClientMessage(i,-1,String);
  949. SetTimerEx("RadarPicture", 6500,false,"i",playerid);
  950. }
  951. }
  952. }
  953. }
  954. }
  955. return 1;
  956. }
  957. forward ChatGang(idorg, const string[]);
  958. public ChatGang(idorg, const string[])
  959. {
  960. foreach(Player, i)
  961. {
  962. if(PlayerInfo[i][aLeader] == idorg || PlayerInfo[i][aMember] == idorg) SendClientMessage(i, -1, string);
  963. }
  964. return 1;
  965. }
  966. forward DChat(const string[]);
  967. public DChat(const string[])
  968. {
  969. for(new a=0;a<sizeof(GangInfo);a++)
  970. {
  971. if(GangInfo[a][AllowedD] == 1)
  972. {
  973. foreach(Player, i)
  974. {
  975. if(PlayerInfo[i][aLeader] == a || PlayerInfo[i][aMember] == a)
  976. {
  977. SendClientMessage(i, -1, string);
  978. }
  979. }
  980. }
  981. }
  982. return 1;
  983. }
  984. forward FDChat(const string[]);
  985. public FDChat(const string[])
  986. {
  987. for(new a=0;a<sizeof(GangInfo);a++)
  988. {
  989. if(GangInfo[a][AllowedFD] == 1)
  990. {
  991. foreach(Player, i)
  992. {
  993. if(PlayerInfo[i][aLeader] == a || PlayerInfo[i][aMember] == a)
  994. {
  995. SendClientMessage(i, -1, string);
  996. }
  997. }
  998. }
  999. }
  1000. return 1;
  1001. }
  1002. forward PDChat(const string[]);
  1003. public PDChat(const string[])
  1004. {
  1005. for(new a=0;a<sizeof(GangInfo);a++)
  1006. {
  1007. if(GangInfo[a][AllowedPD] == 1)
  1008. {
  1009. foreach(Player, i)
  1010. {
  1011. if(PlayerInfo[i][aLeader] == a || PlayerInfo[i][aMember] == a)
  1012. {
  1013. SendClientMessage(i, -1, string);
  1014. }
  1015. }
  1016. }
  1017. }
  1018. return 1;
  1019. }
  1020. forward HChat(const string[]);
  1021. public HChat(const string[])
  1022. {
  1023. for(new a=0;a<sizeof(GangInfo);a++)
  1024. {
  1025. if(GangInfo[a][AllowedH] == 1)
  1026. {
  1027. foreach(Player, i)
  1028. {
  1029. if(PlayerInfo[i][aLeader] == a || PlayerInfo[i][aMember] == a)
  1030. {
  1031. SendClientMessage(i, -1, string);
  1032. }
  1033. }
  1034. }
  1035. }
  1036. return 1;
  1037. }
  1038. stock GetName(playerid)
  1039. {
  1040. new name[MAX_PLAYER_NAME];
  1041. GetPlayerName(playerid, name, sizeof(name));
  1042. return name;
  1043. }
  1044. forward LoadFire(pozid,name[],value[]);
  1045. public LoadFire(pozid,name[],value[])
  1046. {
  1047. INI_Float("X",FireInfo[pozid][X]);
  1048. INI_Float("Y",FireInfo[pozid][Y]);
  1049. INI_Float("Z",FireInfo[pozid][Z]);
  1050. INI_Float("X1",FireInfo[pozid][X1]);
  1051. INI_Float("Y1",FireInfo[pozid][Y1]);
  1052. INI_Float("Z1",FireInfo[pozid][Z1]);
  1053. INI_Float("X2",FireInfo[pozid][X2]);
  1054. INI_Float("Y2",FireInfo[pozid][Y2]);
  1055. INI_Float("Z2",FireInfo[pozid][Z2]);
  1056. INI_Float("X3",FireInfo[pozid][X3]);
  1057. INI_Float("Y3",FireInfo[pozid][Y3]);
  1058. INI_Float("Z3",FireInfo[pozid][Z3]);
  1059. INI_Float("X4",FireInfo[pozid][X4]);
  1060. INI_Float("Y4",FireInfo[pozid][Y4]);
  1061. INI_Float("Z4",FireInfo[pozid][Z4]);
  1062. INI_Int("FireNumber",FireNumber);
  1063. return 1;
  1064. }
  1065. ////////////////////////////////////////////////
  1066. stock SaveFire(pozid)
  1067. {
  1068. new str[64]; format(str,64,"Gangs/Fire/%d.ini",pozid);
  1069. new INI:File = INI_Open(str);
  1070. INI_SetTag(File,"Fire");
  1071. INI_WriteFloat(File,"X", FireInfo[pozid][X]);
  1072. INI_WriteFloat(File,"Y", FireInfo[pozid][Y]);
  1073. INI_WriteFloat(File,"Z", FireInfo[pozid][Z]);
  1074. INI_WriteFloat(File,"X1", FireInfo[pozid][X1]);
  1075. INI_WriteFloat(File,"Y1", FireInfo[pozid][Y1]);
  1076. INI_WriteFloat(File,"Z1", FireInfo[pozid][Z1]);
  1077. INI_WriteFloat(File,"X2", FireInfo[pozid][X2]);
  1078. INI_WriteFloat(File,"Y2", FireInfo[pozid][Y2]);
  1079. INI_WriteFloat(File,"Z2", FireInfo[pozid][Z2]);
  1080. INI_WriteFloat(File,"X3", FireInfo[pozid][X3]);
  1081. INI_WriteFloat(File,"Y3", FireInfo[pozid][Y3]);
  1082. INI_WriteFloat(File,"Z3", FireInfo[pozid][Z3]);
  1083. INI_WriteFloat(File,"X4", FireInfo[pozid][X4]);
  1084. INI_WriteFloat(File,"Y4", FireInfo[pozid][Y4]);
  1085. INI_WriteFloat(File,"Z4", FireInfo[pozid][Z4]);
  1086. INI_WriteInt(File,"FireNumber", FireNumber);
  1087. INI_Close(File);
  1088. return 1;
  1089. }
  1090. forward LoadPlayer_data(playerid,name[],value[]);
  1091. public LoadPlayer_data(playerid,name[],value[])
  1092. {
  1093. INI_Int("pLeader",PlayerInfo[playerid][aLeader]);
  1094. INI_Int("pMember",PlayerInfo[playerid][aMember]);
  1095. INI_Int("pRank",PlayerInfo[playerid][Rank]);
  1096. INI_Int("Skin",PlayerInfo[playerid][pSkin]);
  1097. return 1;
  1098. }
  1099. ////////////////////////////////////////////////
  1100. stock SavePlayer(playerid)
  1101. {
  1102. new str[64]; format(str,64,"Gangs/Users/%s",GetName(playerid));
  1103. new INI:File = INI_Open(str);
  1104. INI_SetTag(File,"data");
  1105. INI_WriteInt(File,"pLeader", PlayerInfo[playerid][aLeader]);
  1106. INI_WriteInt(File,"pMember", PlayerInfo[playerid][aMember]);
  1107. INI_WriteInt(File,"pRank", PlayerInfo[playerid][Rank]);
  1108. INI_WriteInt(File,"Skin", PlayerInfo[playerid][pSkin]);
  1109. INI_Close(File);
  1110. return 1;
  1111. }
  1112.  
  1113. forward LoadGangs(idorg,name[],value[]);
  1114. public LoadGangs(idorg,name[],value[])
  1115. {
  1116. for(new i=0;i<15;i++)
  1117. {
  1118. new string[128];
  1119. format(string,sizeof(string),"Created%d",i);
  1120. INI_Int(string,vCreated[idorg][i]);
  1121. }
  1122. for(new i=0;i<15;i++)
  1123. {
  1124. new string[128];
  1125. format(string,sizeof(string),"Vehicle%d",i);
  1126. INI_Int(string,VehiclesID[idorg][i]);
  1127. }
  1128. for(new i=0;i<15;i++)
  1129. {
  1130. new string[128];
  1131. format(string,sizeof(string),"VehicleB%d",i);
  1132. INI_Int(string,VehiclesColor[idorg][i]);
  1133. }
  1134. INI_Float("uX",GangInfo[idorg][uX]);
  1135. INI_Float("uY",GangInfo[idorg][uY]);
  1136. INI_Float("uZ",GangInfo[idorg][uZ]);
  1137. INI_Float("iX",GangInfo[idorg][iX]);
  1138. INI_Float("iY",GangInfo[idorg][iY]);
  1139. INI_Float("iZ",GangInfo[idorg][iZ]);
  1140. INI_Float("sX",GangInfo[idorg][sX]);
  1141. INI_Float("sY",GangInfo[idorg][sY]);
  1142. INI_Float("sZ",GangInfo[idorg][sZ]);
  1143. INI_Float("LokX",GangInfo[idorg][LokX]);
  1144. INI_Float("LokY",GangInfo[idorg][LokY]);
  1145. INI_Float("LokZ",GangInfo[idorg][LokZ]);
  1146. INI_Float("orX",GangInfo[idorg][orX]);
  1147. INI_Float("orY",GangInfo[idorg][orY]);
  1148. INI_Float("orZ",GangInfo[idorg][orZ]);
  1149. INI_Float("puX",GangInfo[idorg][puX]);
  1150. INI_Float("puY",GangInfo[idorg][puY]);
  1151. INI_Float("puZ",GangInfo[idorg][puZ]);
  1152. INI_Float("arX",GangInfo[idorg][arX]);
  1153. INI_Float("arY",GangInfo[idorg][arY]);
  1154. INI_Float("arZ",GangInfo[idorg][arZ]);
  1155. INI_Float("duX",GangInfo[idorg][duX]);
  1156. INI_Float("duY",GangInfo[idorg][duY]);
  1157. INI_Float("duZ",GangInfo[idorg][duZ]);
  1158. for(new i=0;i<4;i++)
  1159. {
  1160. new string[128];
  1161. format(string,sizeof(string),"Vehiclek1%d",i);
  1162. INI_Float(string,Vehicle[idorg][i][0]);
  1163. }
  1164. for(new i=0;i<4;i++)
  1165. {
  1166. new string[128];
  1167. format(string,sizeof(string),"Vehiclek2%d",i);
  1168. INI_Float(string,Vehicle[idorg][i][1]);
  1169. }
  1170. for(new i=0;i<4;i++)
  1171. {
  1172. new string[128];
  1173. format(string,sizeof(string),"Vehiclek3%d",i);
  1174. INI_Float(string,Vehicle[idorg][i][2]);
  1175. }
  1176. for(new i=0;i<4;i++)
  1177. {
  1178. new string[128];
  1179. format(string,sizeof(string),"Vehiclek4%d",i);
  1180. INI_Float(string,Vehicle[idorg][i][3]);
  1181. }
  1182. for(new i=0;i<4;i++)
  1183. {
  1184. new string[128];
  1185. format(string,sizeof(string),"Vehiclek5%d",i);
  1186. INI_Float(string,Vehicle[idorg][i][4]);
  1187. }
  1188. for(new i=0;i<4;i++)
  1189. {
  1190. new string[128];
  1191. format(string,sizeof(string),"Vehiclek6%d",i);
  1192. INI_Float(string,Vehicle[idorg][i][5]);
  1193. }
  1194. for(new i=0;i<4;i++)
  1195. {
  1196. new string[128];
  1197. format(string,sizeof(string),"Vehiclek7%d",i);
  1198. INI_Float(string,Vehicle[idorg][i][6]);
  1199. }
  1200. for(new i=0;i<4;i++)
  1201. {
  1202. new string[128];
  1203. format(string,sizeof(string),"Vehiclek8%d",i);
  1204. INI_Float(string,Vehicle[idorg][i][7]);
  1205. }
  1206. for(new i=0;i<4;i++)
  1207. {
  1208. new string[128];
  1209. format(string,sizeof(string),"Vehiclek9%d",i);
  1210. INI_Float(string,Vehicle[idorg][i][8]);
  1211. }
  1212. for(new i=0;i<4;i++)
  1213. {
  1214. new string[128];
  1215. format(string,sizeof(string),"Vehiclek10%d",i);
  1216. INI_Float(string,Vehicle[idorg][i][9]);
  1217. }
  1218. for(new i=0;i<4;i++)
  1219. {
  1220. new string[128];
  1221. format(string,sizeof(string),"Vehiclek11%d",i);
  1222. INI_Float(string,Vehicle[idorg][i][10]);
  1223. }
  1224. for(new i=0;i<4;i++)
  1225. {
  1226. new string[128];
  1227. format(string,sizeof(string),"Vehiclek12%d",i);
  1228. INI_Float(string,Vehicle[idorg][i][11]);
  1229. }
  1230. for(new i=0;i<4;i++)
  1231. {
  1232. new string[128];
  1233. format(string,sizeof(string),"Vehiclek13%d",i);
  1234. INI_Float(string,Vehicle[idorg][i][12]);
  1235. }
  1236. for(new i=0;i<4;i++)
  1237. {
  1238. new string[128];
  1239. format(string,sizeof(string),"Vehiclek14%d",i);
  1240. INI_Float(string,Vehicle[idorg][i][13]);
  1241. }
  1242. for(new i=0;i<4;i++)
  1243. {
  1244. new string[128];
  1245. format(string,sizeof(string),"Vehiclek15%d",i);
  1246. INI_Float(string,Vehicle[idorg][i][14]);
  1247. }
  1248. INI_String("Leader1",Leader[0][idorg],MAX_PLAYER_NAME);
  1249. INI_String("Leader2",Leader[1][idorg],MAX_PLAYER_NAME);
  1250. INI_String("Member1",Member[0][idorg],MAX_PLAYER_NAME);
  1251. INI_String("Member2",Member[1][idorg],MAX_PLAYER_NAME);
  1252. INI_String("Member3",Member[2][idorg],MAX_PLAYER_NAME);
  1253. INI_String("Member4",Member[3][idorg],MAX_PLAYER_NAME);
  1254. INI_String("Member5",Member[4][idorg],MAX_PLAYER_NAME);
  1255. INI_String("Member6",Member[5][idorg],MAX_PLAYER_NAME);
  1256. INI_String("Member7",Member[6][idorg],MAX_PLAYER_NAME);
  1257. INI_String("Member8",Member[7][idorg],MAX_PLAYER_NAME);
  1258. INI_String("Member9",Member[8][idorg],MAX_PLAYER_NAME);
  1259. INI_String("Member10",Member[9][idorg],MAX_PLAYER_NAME);
  1260. INI_String("Member11",Member[10][idorg],MAX_PLAYER_NAME);
  1261. INI_String("Member12",Member[11][idorg],MAX_PLAYER_NAME);
  1262. INI_String("Name",GangInfo[idorg][Name],128);
  1263. INI_String("Rank1",GangInfo[idorg][Rank1],128);
  1264. INI_String("Rank2",GangInfo[idorg][Rank2],128);
  1265. INI_String("Rank3",GangInfo[idorg][Rank3],128);
  1266. INI_String("Rank4",GangInfo[idorg][Rank4],128);
  1267. INI_String("Rank5",GangInfo[idorg][Rank5],128);
  1268. INI_String("Rank6",GangInfo[idorg][Rank6],128);
  1269. INI_Int("Int",GangInfo[idorg][Int]);
  1270. INI_Int("VW",GangInfo[idorg][VW]);
  1271. INI_Int("rSkin1",GangInfo[idorg][rSkin1]);
  1272. INI_Int("rSkin2",GangInfo[idorg][rSkin2]);
  1273. INI_Int("rSkin3",GangInfo[idorg][rSkin3]);
  1274. INI_Int("rSkin4",GangInfo[idorg][rSkin4]);
  1275. INI_Int("rSkin5",GangInfo[idorg][rSkin5]);
  1276. INI_Int("rSkin6",GangInfo[idorg][rSkin6]);
  1277. INI_Int("AllowedF",GangInfo[idorg][AllowedF]);
  1278. INI_Int("AllowedR",GangInfo[idorg][AllowedR]);
  1279. INI_Int("AllowedD",GangInfo[idorg][AllowedD]);
  1280. INI_Int("AllowedH",GangInfo[idorg][AllowedH]);
  1281. INI_Int("AllowedPD",GangInfo[idorg][AllowedPD]);
  1282. INI_Int("AllowedFD",GangInfo[idorg][AllowedFD]);
  1283. return 1;
  1284. }
  1285. ///////////////////////////////////////////////////
  1286. stock SaveGangs(idorg)
  1287. {
  1288. new orgFile[80];
  1289. format(orgFile,sizeof(orgFile),GANGS,idorg);
  1290. new INI:File = INI_Open(orgFile);
  1291. INI_SetTag(File,"Gang");
  1292. for(new i=0;i<15;i++)
  1293. {
  1294. new string[128];
  1295. format(string,sizeof(string),"Created%d",i);
  1296. INI_WriteInt(File,string,vCreated[idorg][i]);
  1297. }
  1298. for(new i=0;i<15;i++)
  1299. {
  1300. new string[128];
  1301. format(string,sizeof(string),"Vehicle%d",i);
  1302. INI_WriteInt(File,string,VehiclesID[idorg][i]);
  1303. }
  1304. for(new i=0;i<15;i++)
  1305. {
  1306. new string[128];
  1307. format(string,sizeof(string),"VehicleB%d",i);
  1308. INI_WriteInt(File,string,VehiclesColor[idorg][i]);
  1309. }
  1310. INI_WriteFloat(File,"uX",GangInfo[idorg][uX]);
  1311. INI_WriteFloat(File,"uY",GangInfo[idorg][uY]);
  1312. INI_WriteFloat(File,"uZ",GangInfo[idorg][uZ]);
  1313. INI_WriteFloat(File,"iX",GangInfo[idorg][iX]);
  1314. INI_WriteFloat(File,"iY",GangInfo[idorg][iY]);
  1315. INI_WriteFloat(File,"iZ",GangInfo[idorg][iZ]);
  1316. INI_WriteFloat(File,"sX",GangInfo[idorg][sX]);
  1317. INI_WriteFloat(File,"sY",GangInfo[idorg][sY]);
  1318. INI_WriteFloat(File,"sZ",GangInfo[idorg][sZ]);
  1319. INI_WriteFloat(File,"LokX",GangInfo[idorg][LokX]);
  1320. INI_WriteFloat(File,"LokY",GangInfo[idorg][LokY]);
  1321. INI_WriteFloat(File,"LokZ",GangInfo[idorg][LokZ]);
  1322. INI_WriteFloat(File,"orX",GangInfo[idorg][orX]);
  1323. INI_WriteFloat(File,"orY",GangInfo[idorg][orY]);
  1324. INI_WriteFloat(File,"orZ",GangInfo[idorg][orZ]);
  1325. INI_WriteFloat(File,"puX",GangInfo[idorg][puX]);
  1326. INI_WriteFloat(File,"puY",GangInfo[idorg][puY]);
  1327. INI_WriteFloat(File,"puZ",GangInfo[idorg][puZ]);
  1328. INI_WriteFloat(File,"arX",GangInfo[idorg][arX]);
  1329. INI_WriteFloat(File,"arY",GangInfo[idorg][arY]);
  1330. INI_WriteFloat(File,"arZ",GangInfo[idorg][arZ]);
  1331. INI_WriteFloat(File,"duX",GangInfo[idorg][duX]);
  1332. INI_WriteFloat(File,"duY",GangInfo[idorg][duY]);
  1333. INI_WriteFloat(File,"duZ",GangInfo[idorg][duZ]);
  1334. for(new i=0;i<4;i++)
  1335. {
  1336. new string[128];
  1337. format(string,sizeof(string),"Vehiclek1%d",i);
  1338. INI_WriteFloat(File,string,Vehicle[idorg][i][0]);
  1339. }
  1340. for(new i=0;i<4;i++)
  1341. {
  1342. new string[128];
  1343. format(string,sizeof(string),"Vehiclek2%d",i);
  1344. INI_WriteFloat(File,string,Vehicle[idorg][i][1]);
  1345. }
  1346. for(new i=0;i<4;i++)
  1347. {
  1348. new string[128];
  1349. format(string,sizeof(string),"Vehiclek3%d",i);
  1350. INI_WriteFloat(File,string,Vehicle[idorg][i][2]);
  1351. }
  1352. for(new i=0;i<4;i++)
  1353. {
  1354. new string[128];
  1355. format(string,sizeof(string),"Vehiclek4%d",i);
  1356. INI_WriteFloat(File,string,Vehicle[idorg][i][3]);
  1357. }
  1358. for(new i=0;i<4;i++)
  1359. {
  1360. new string[128];
  1361. format(string,sizeof(string),"Vehiclek5%d",i);
  1362. INI_WriteFloat(File,string,Vehicle[idorg][i][4]);
  1363. }
  1364. for(new i=0;i<4;i++)
  1365. {
  1366. new string[128];
  1367. format(string,sizeof(string),"Vehiclek6%d",i);
  1368. INI_WriteFloat(File,string,Vehicle[idorg][i][5]);
  1369. }
  1370. for(new i=0;i<4;i++)
  1371. {
  1372. new string[128];
  1373. format(string,sizeof(string),"Vehiclek7%d",i);
  1374. INI_WriteFloat(File,string,Vehicle[idorg][i][6]);
  1375. }
  1376. for(new i=0;i<4;i++)
  1377. {
  1378. new string[128];
  1379. format(string,sizeof(string),"Vehiclek8%d",i);
  1380. INI_WriteFloat(File,string,Vehicle[idorg][i][7]);
  1381. }
  1382. for(new i=0;i<4;i++)
  1383. {
  1384. new string[128];
  1385. format(string,sizeof(string),"Vehiclek9%d",i);
  1386. INI_WriteFloat(File,string,Vehicle[idorg][i][8]);
  1387. }
  1388. for(new i=0;i<4;i++)
  1389. {
  1390. new string[128];
  1391. format(string,sizeof(string),"Vehiclek10%d",i);
  1392. INI_WriteFloat(File,string,Vehicle[idorg][i][9]);
  1393. }
  1394. for(new i=0;i<4;i++)
  1395. {
  1396. new string[128];
  1397. format(string,sizeof(string),"Vehiclek11%d",i);
  1398. INI_WriteFloat(File,string,Vehicle[idorg][i][10]);
  1399. }
  1400. for(new i=0;i<4;i++)
  1401. {
  1402. new string[128];
  1403. format(string,sizeof(string),"Vehiclek12%d",i);
  1404. INI_WriteFloat(File,string,Vehicle[idorg][i][11]);
  1405. }
  1406. for(new i=0;i<4;i++)
  1407. {
  1408. new string[128];
  1409. format(string,sizeof(string),"Vehiclek13%d",i);
  1410. INI_WriteFloat(File,string,Vehicle[idorg][i][12]);
  1411. }
  1412. for(new i=0;i<4;i++)
  1413. {
  1414. new string[128];
  1415. format(string,sizeof(string),"Vehiclek14%d",i);
  1416. INI_WriteFloat(File,string,Vehicle[idorg][i][13]);
  1417. }
  1418. for(new i=0;i<4;i++)
  1419. {
  1420. new string[128];
  1421. format(string,sizeof(string),"Vehiclek15%d",i);
  1422. INI_WriteFloat(File,string,Vehicle[idorg][i][14]);
  1423. }
  1424. INI_WriteString(File,"Leader1",Leader[0][idorg]);
  1425. INI_WriteString(File,"Leader2",Leader[1][idorg]);
  1426. INI_WriteString(File,"Member1",Member[0][idorg]);
  1427. INI_WriteString(File,"Member2",Member[1][idorg]);
  1428. INI_WriteString(File,"Member3",Member[2][idorg]);
  1429. INI_WriteString(File,"Member4",Member[3][idorg]);
  1430. INI_WriteString(File,"Member5",Member[4][idorg]);
  1431. INI_WriteString(File,"Member6",Member[5][idorg]);
  1432. INI_WriteString(File,"Member7",Member[6][idorg]);
  1433. INI_WriteString(File,"Member8",Member[7][idorg]);
  1434. INI_WriteString(File,"Member9",Member[8][idorg]);
  1435. INI_WriteString(File,"Member10",Member[9][idorg]);
  1436. INI_WriteString(File,"Member11",Member[10][idorg]);
  1437. INI_WriteString(File,"Member12",Member[11][idorg]);
  1438. INI_WriteString(File,"Name",GangInfo[idorg][Name]);
  1439. INI_WriteString(File,"Rank1",GangInfo[idorg][Rank1]);
  1440. INI_WriteString(File,"Rank2",GangInfo[idorg][Rank2]);
  1441. INI_WriteString(File,"Rank3",GangInfo[idorg][Rank3]);
  1442. INI_WriteString(File,"Rank4",GangInfo[idorg][Rank4]);
  1443. INI_WriteString(File,"Rank5",GangInfo[idorg][Rank5]);
  1444. INI_WriteString(File,"Rank6",GangInfo[idorg][Rank6]);
  1445. INI_WriteInt(File,"Int",GangInfo[idorg][Int]);
  1446. INI_WriteInt(File,"VW",GangInfo[idorg][VW]);
  1447. INI_WriteInt(File,"rSkin1",GangInfo[idorg][rSkin1]);
  1448. INI_WriteInt(File,"rSkin2",GangInfo[idorg][rSkin2]);
  1449. INI_WriteInt(File,"rSkin3",GangInfo[idorg][rSkin3]);
  1450. INI_WriteInt(File,"rSkin4",GangInfo[idorg][rSkin4]);
  1451. INI_WriteInt(File,"rSkin5",GangInfo[idorg][rSkin5]);
  1452. INI_WriteInt(File,"rSkin6",GangInfo[idorg][rSkin6]);
  1453. INI_WriteInt(File,"AllowedF",GangInfo[idorg][AllowedF]);
  1454. INI_WriteInt(File,"AllowedR",GangInfo[idorg][AllowedR]);
  1455. INI_WriteInt(File,"AllowedD",GangInfo[idorg][AllowedD]);
  1456. INI_WriteInt(File,"AllowedH",GangInfo[idorg][AllowedH]);
  1457. INI_WriteInt(File,"AllowedPD",GangInfo[idorg][AllowedPD]);
  1458. INI_WriteInt(File,"AllowedFD",GangInfo[idorg][AllowedFD]);
  1459. INI_Close(File);
  1460. return 1;
  1461. }
  1462.  
  1463. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1464. {
  1465. if(dialogid == DIALOG_SKIN2)
  1466. {
  1467. new skin;
  1468. if(!response) return 1;
  1469. if(sscanf(inputtext,"d",skin)) return ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Change the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1470. if(skin < 0 || skin > 299) return ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Wrong ID of the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1471. if(rank[playerid] == 1)
  1472. {
  1473. GangInfo[orga[playerid]][rSkin1]=skin;
  1474. for(new i=0;i<MAX_PLAYERS;i++)
  1475. {
  1476. if(PlayerInfo[i][aMember] == orga[playerid] && PlayerInfo[i][Rank] == 1)
  1477. {
  1478. PlayerInfo[i][pSkin]=skin;
  1479. SetPlayerSkin(i,skin);
  1480. SavePlayer(i);
  1481. }
  1482. }
  1483. }
  1484. else if(rank[playerid] == 2)
  1485. {
  1486. GangInfo[orga[playerid]][rSkin2]=skin;
  1487. for(new i=0;i<MAX_PLAYERS;i++)
  1488. {
  1489. if(PlayerInfo[i][aMember] == orga[playerid] && PlayerInfo[i][Rank] == 2)
  1490. {
  1491. PlayerInfo[i][pSkin]=skin;
  1492. SetPlayerSkin(i,skin);
  1493. SavePlayer(i);
  1494. }
  1495. }
  1496. }
  1497. else if(rank[playerid] == 3)
  1498. {
  1499. GangInfo[orga[playerid]][rSkin3]=skin;
  1500. for(new i=0;i<MAX_PLAYERS;i++)
  1501. {
  1502. if(PlayerInfo[i][aMember] == orga[playerid] && PlayerInfo[i][Rank] == 3)
  1503. {
  1504. PlayerInfo[i][pSkin]=skin;
  1505. SetPlayerSkin(i,skin);
  1506. SavePlayer(i);
  1507. }
  1508. }
  1509. }
  1510. else if(rank[playerid] == 4)
  1511. {
  1512. GangInfo[orga[playerid]][rSkin4]=skin;
  1513. for(new i=0;i<MAX_PLAYERS;i++)
  1514. {
  1515. if(PlayerInfo[i][aMember] == orga[playerid] && PlayerInfo[i][Rank] == 4)
  1516. {
  1517. PlayerInfo[i][pSkin]=skin;
  1518. SetPlayerSkin(i,skin);
  1519. SavePlayer(i);
  1520. }
  1521. }
  1522. }
  1523. else if(rank[playerid] == 5)
  1524. {
  1525. GangInfo[orga[playerid]][rSkin5]=skin;
  1526. for(new i=0;i<MAX_PLAYERS;i++)
  1527. {
  1528. if(PlayerInfo[i][aMember] == orga[playerid] && PlayerInfo[i][Rank] == 5)
  1529. {
  1530. PlayerInfo[i][pSkin]=skin;
  1531. SetPlayerSkin(i,skin);
  1532. SavePlayer(i);
  1533. }
  1534. }
  1535. }
  1536. else if(rank[playerid] == 6)
  1537. {
  1538. GangInfo[orga[playerid]][rSkin6]=skin;
  1539. for(new i=0;i<MAX_PLAYERS;i++)
  1540. {
  1541. if(PlayerInfo[i][aMember] == orga[playerid] && PlayerInfo[i][Rank] == 6)
  1542. {
  1543. PlayerInfo[i][pSkin]=skin;
  1544. SetPlayerSkin(i,skin);
  1545. SavePlayer(i);
  1546. }
  1547. }
  1548. }
  1549. SendClientMessage(playerid,-1,"{00C0FF}ID of the skin successfully saved!");
  1550. ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_LIST, "Skins", "Rank 1\nRank 2\nRank 3\nRank 4\nRank 5\nRank 6", "OK", "Cancel");
  1551. SaveGangs(orga[playerid]);
  1552. }
  1553. if(dialogid == DIALOG_RANK2)
  1554. {
  1555. new ime[128];
  1556. if(!response) return 1;
  1557. if(sscanf(inputtext,"s",ime)) return ShowPlayerDialog(playerid, DIALOG_RANK2, 1, ""WHITE"Change name of the rank", ""WHITE"Enter the new name of the rank", "OK", "Cancel");
  1558. if(rank[playerid] == 1)
  1559. {
  1560. strmid(GangInfo[orga[playerid]][Rank1],ime,0,strlen(ime),255);
  1561. }
  1562. else if(rank[playerid] == 2)
  1563. {
  1564. strmid(GangInfo[orga[playerid]][Rank2],ime,0,strlen(ime),255);
  1565. }
  1566. else if(rank[playerid] == 3)
  1567. {
  1568. strmid(GangInfo[orga[playerid]][Rank3],ime,0,strlen(ime),255);
  1569. }
  1570. else if(rank[playerid] == 4)
  1571. {
  1572. strmid(GangInfo[orga[playerid]][Rank4],ime,0,strlen(ime),255);
  1573. }
  1574. else if(rank[playerid] == 5)
  1575. {
  1576. strmid(GangInfo[orga[playerid]][Rank5],ime,0,strlen(ime),255);
  1577. }
  1578. else if(rank[playerid] == 6)
  1579. {
  1580. strmid(GangInfo[orga[playerid]][Rank6],ime,0,strlen(ime),255);
  1581. }
  1582. SendClientMessage(playerid,-1,"{00C0FF}Name of rank successfully saved!");
  1583. ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_LIST, "Ranks", "Rank 1\nRank 2\nRank 3\nRank 4\nRank 5\nRank 6", "OK", "Cancel");
  1584. SaveGangs(orga[playerid]);
  1585. }
  1586. if(dialogid == DIALOG_SKIN)
  1587. {
  1588. if(!response) return 1;
  1589. switch(listitem)
  1590. {
  1591. case 0:
  1592. {
  1593. ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Change the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1594. rank[playerid] = 1;
  1595. }
  1596. case 1:
  1597. {
  1598. ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Change the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1599. rank[playerid] = 2;
  1600. }
  1601. case 2:
  1602. {
  1603. ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Change the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1604. rank[playerid] = 3;
  1605. }
  1606. case 3:
  1607. {
  1608. ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Change the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1609. rank[playerid] = 4;
  1610. }
  1611. case 4:
  1612. {
  1613. ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Change the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1614. rank[playerid] = 5;
  1615. }
  1616. case 5:
  1617. {
  1618. ShowPlayerDialog(playerid, DIALOG_SKIN2, 1, ""WHITE"Change the skin", ""WHITE"Enter the ID of the skin", "OK", "Cancel");
  1619. rank[playerid] = 6;
  1620. }
  1621. }
  1622. }
  1623. if(dialogid == DIALOG_RANK)
  1624. {
  1625. if(!response) return 1;
  1626. switch(listitem)
  1627. {
  1628. case 0:
  1629. {
  1630. ShowPlayerDialog(playerid, DIALOG_RANK2, 1, ""WHITE"Change name of the rank", ""WHITE"Enter the new name of the rank 1", "OK", "Cancel");
  1631. rank[playerid] = 1;
  1632. }
  1633. case 1:
  1634. {
  1635. ShowPlayerDialog(playerid, DIALOG_RANK2, 1, ""WHITE"Change name of the rank", ""WHITE"Enter the new name of the rank 2", "OK", "Cancel");
  1636. rank[playerid] = 2;
  1637. }
  1638. case 2:
  1639. {
  1640. ShowPlayerDialog(playerid, DIALOG_RANK2, 1, ""WHITE"Change name of the rank", ""WHITE"Enter the new name of the rank 3", "OK", "Cancel");
  1641. rank[playerid] = 3;
  1642. }
  1643. case 3:
  1644. {
  1645. ShowPlayerDialog(playerid, DIALOG_RANK2, 1, ""WHITE"Change name of the rank", ""WHITE"Enter the new name of the rank 4", "OK", "Cancel");
  1646. rank[playerid] = 4;
  1647. }
  1648. case 4:
  1649. {
  1650. ShowPlayerDialog(playerid, DIALOG_RANK2, 1, ""WHITE"Change name of the rank", ""WHITE"Enter the new name of the rank 5", "OK", "Cancel");
  1651. rank[playerid] = 5;
  1652. }
  1653. case 5:
  1654. {
  1655. ShowPlayerDialog(playerid, DIALOG_RANK2, 1, ""WHITE"Change name of the rank", ""WHITE"Enter the new name of the rank 6", "OK", "Cancel");
  1656. rank[playerid] = 6;
  1657. }
  1658. }
  1659. }
  1660. if(dialogid == DIALOG_COORDINATES)
  1661. {
  1662. if(!response) return 1;
  1663. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,SCRVENA,"You can't be in vehicle!");
  1664. switch(listitem)
  1665. {
  1666. case 0:
  1667. {
  1668. new Float:gx,Float:gy,Float:gz;
  1669. GetPlayerPos(playerid,gx,gy,gz);
  1670. GangInfo[orga[playerid]][sX]=gx;
  1671. GangInfo[orga[playerid]][sY]=gy;
  1672. GangInfo[orga[playerid]][sZ]=gz;
  1673. SendClientMessage(playerid,-1,"{00C0FF}Coordinates of spawn saved!");
  1674. SaveGangs(orga[playerid]);
  1675. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapoms for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1676. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!");
  1677. }
  1678. case 1:
  1679. {
  1680. new Float:gx,Float:gy,Float:gz;
  1681. new string[128];
  1682. GetPlayerPos(playerid,gx,gy,gz);
  1683. GangInfo[orga[playerid]][uX]=gx;
  1684. GangInfo[orga[playerid]][uY]=gy;
  1685. GangInfo[orga[playerid]][uZ]=gz;
  1686. DestroyDynamicPickup(GangPickup[orga[playerid]]);
  1687. GangPickup[orga[playerid]] = CreateDynamicPickup(1272, 1, gx, gy, gz);
  1688. DestroyDynamic3DTextLabel(GangLabel[orga[playerid]]);
  1689. format(string,sizeof(string),"[ %s ]",GangInfo[orga[playerid]][Name]);
  1690. GangLabel[orga[playerid]] = CreateDynamic3DTextLabel(string,0x660066BB,GangInfo[orga[playerid]][uX],GangInfo[orga[playerid]][uY],GangInfo[orga[playerid]][uZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  1691. SendClientMessage(playerid,-1,"{00C0FF}Coordinates the entrance to the interior saved!");
  1692. SaveGangs(orga[playerid]);
  1693. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapoms for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1694. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!");
  1695. }
  1696. case 2:
  1697. {
  1698. new Float:gx,Float:gy,Float:gz;
  1699. GetPlayerPos(playerid,gx,gy,gz);
  1700. GangInfo[orga[playerid]][iX]=gx;
  1701. GangInfo[orga[playerid]][iY]=gy;
  1702. GangInfo[orga[playerid]][iZ]=gz;
  1703. GangInfo[orga[playerid]][Int]=GetPlayerInterior(playerid);
  1704. GangInfo[orga[playerid]][VW]=GetPlayerVirtualWorld(playerid);
  1705. DestroyDynamicPickup(GangPickup2[orga[playerid]]);
  1706. GangPickup2[orga[playerid]] = CreateDynamicPickup(1272, 1, gx, gy, gz);
  1707. SendClientMessage(playerid,-1,"{00C0FF}Coordinates exit from the interior saved!");
  1708. SaveGangs(orga[playerid]);
  1709. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapoms for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1710. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!");
  1711. }
  1712. case 3:
  1713. {
  1714. new Float:gx,Float:gy,Float:gz;
  1715. GetPlayerPos(playerid,gx,gy,gz);
  1716. GangInfo[orga[playerid]][LokX]=gx;
  1717. GangInfo[orga[playerid]][LokY]=gy;
  1718. GangInfo[orga[playerid]][LokZ]=gz;
  1719. SendClientMessage(playerid,-1,"{00C0FF}Coordinates the collection of weapons of Hitman saved!");
  1720. SaveGangs(orga[playerid]);
  1721. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapoms for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1722. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!");
  1723. }
  1724. case 4:
  1725. {
  1726. new Float:gx,Float:gy,Float:gz;
  1727. GetPlayerPos(playerid,gx,gy,gz);
  1728. GangInfo[orga[playerid]][orX]=gx;
  1729. GangInfo[orga[playerid]][orY]=gy;
  1730. GangInfo[orga[playerid]][orZ]=gz;
  1731. DestroyPickup(PDWeapons[orga[playerid]]);
  1732. PDWeapons[orga[playerid]] = CreatePickup(355, 1, GangInfo[orga[playerid]][orX],GangInfo[orga[playerid]][orY],GangInfo[orga[playerid]][orZ], 0);
  1733. SendClientMessage(playerid,-1,"{00C0FF}Coordinates the collection of weapons of PD saved!");
  1734. SaveGangs(orga[playerid]);
  1735. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapoms for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1736. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1737. }
  1738. case 5:
  1739. {
  1740. new Float:gx,Float:gy,Float:gz;
  1741. GetPlayerPos(playerid,gx,gy,gz);
  1742. GangInfo[orga[playerid]][puX]=gx;
  1743. GangInfo[orga[playerid]][puY]=gy;
  1744. GangInfo[orga[playerid]][puZ]=gz;
  1745. DestroyDynamicPickup(Arrest[orga[playerid]]);
  1746. DestroyDynamic3DTextLabel(ArrestLabel[orga[playerid]]);
  1747. Arrest[orga[playerid]] = CreateDynamicPickup(1314, 1, GangInfo[orga[playerid]][puX],GangInfo[orga[playerid]][puY],GangInfo[orga[playerid]][puZ], 0);
  1748. ArrestLabel[orga[playerid]] = CreateDynamic3DTextLabel("{FF9900}Place for arrest {FF3300}[{FFFFFF}/arrest{FF3300}]",-1,GangInfo[orga[playerid]][puX],GangInfo[orga[playerid]][puY],GangInfo[orga[playerid]][puZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  1749. SendClientMessage(playerid,-1,"{00C0FF}Place for arrest saved!");
  1750. SaveGangs(orga[playerid]);
  1751. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapoms for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1752. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1753. }
  1754. case 6:
  1755. {
  1756. new Float:gx,Float:gy,Float:gz;
  1757. GetPlayerPos(playerid,gx,gy,gz);
  1758. GangInfo[orga[playerid]][arX]=gx;
  1759. GangInfo[orga[playerid]][arY]=gy;
  1760. GangInfo[orga[playerid]][arZ]=gz;
  1761. SendClientMessage(playerid,-1,"{00C0FF}Place for spawn arrested player saved!");
  1762. SaveGangs(orga[playerid]);
  1763. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapons for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1764. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1765. }
  1766. case 7:
  1767. {
  1768. new Float:gx,Float:gy,Float:gz;
  1769. GetPlayerPos(playerid,gx,gy,gz);
  1770. GangInfo[orga[playerid]][duX]=gx;
  1771. GangInfo[orga[playerid]][duY]=gy;
  1772. GangInfo[orga[playerid]][duZ]=gz;
  1773. SendClientMessage(playerid,-1,"{00C0FF}Place for pickup fire extinguisher saved!");
  1774. SaveGangs(orga[playerid]);
  1775. DestroyDynamicPickup(Aparat[orga[playerid]]);
  1776. DestroyDynamic3DTextLabel(AparatLabel[orga[playerid]]);
  1777. Aparat[orga[playerid]] = CreateDynamicPickup(1239, 1, GangInfo[orga[playerid]][duX],GangInfo[orga[playerid]][duY],GangInfo[orga[playerid]][duZ], 0);
  1778. AparatLabel[orga[playerid]] = CreateDynamic3DTextLabel("{FF9900}Place for pickup fire extinguisher {FF3300}[{FFFFFF}/fireext{FF3300}]",-1,GangInfo[orga[playerid]][duX],GangInfo[orga[playerid]][duY],GangInfo[orga[playerid]][duZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  1779. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapons for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1780. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1781. }
  1782. }
  1783. }
  1784. if(dialogid == DIALOG_VATRA)
  1785. {
  1786. new org;
  1787. if(!response) return 1;
  1788. if(sscanf(inputtext,"i",org)) return ShowPlayerDialog(playerid, DIALOG_VATRA, 1, ""WHITE"Fire", ""WHITE"Enter ID of fire", "OK", "Cancel");
  1789. new oFile[50];
  1790. format(oFile, sizeof(oFile), FIRE, org);
  1791. if(!fexist(oFile))return ShowPlayerDialog(playerid, DIALOG_VATRA, 1, ""WHITE"Fire doesnt exist", ""WHITE"Enter ID of fire", "OK", "Cancel");
  1792. poz[playerid]=org;
  1793. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1794. ShowPlayerDialog(playerid, DIALOG_FIRE, DIALOG_STYLE_LIST, "Editing", "Fire object 1\nFire object 2\nFire object 3\nFire object 4\nFire object 5", "OK", "Cancel");
  1795. }
  1796. if(dialogid == DIALOG_FIRE)
  1797. {
  1798. if(!response) return 1;
  1799. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,SCRVENA,"You cant be in vehicle!");
  1800. switch(listitem)
  1801. {
  1802. case 0:
  1803. {
  1804. new Float:gx,Float:gy,Float:gz;
  1805. GetPlayerPos(playerid,gx,gy,gz);
  1806. FireInfo[poz[playerid]][X]=gx;
  1807. FireInfo[poz[playerid]][Y]=gy;
  1808. FireInfo[poz[playerid]][Z]=gz;
  1809. SendClientMessage(playerid,-1,"{00C0FF}Coordinates of fire object 1 saved!");
  1810. SaveFire(poz[playerid]);
  1811. ShowPlayerDialog(playerid, DIALOG_FIRE, DIALOG_STYLE_LIST, "Editing", "Fire object 1\nFire object 2\nFire object 3\nFire object 4\nFire object 5", "OK", "Cancel");
  1812. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1813. }
  1814. case 1:
  1815. {
  1816. new Float:gx,Float:gy,Float:gz;
  1817. GetPlayerPos(playerid,gx,gy,gz);
  1818. FireInfo[poz[playerid]][X1]=gx;
  1819. FireInfo[poz[playerid]][Y1]=gy;
  1820. FireInfo[poz[playerid]][Z1]=gz;
  1821. SendClientMessage(playerid,-1,"{00C0FF}Coordinates of fire object 2 saved!");
  1822. SaveFire(poz[playerid]);
  1823. ShowPlayerDialog(playerid, DIALOG_FIRE, DIALOG_STYLE_LIST, "Editing", "Fire object 1\nFire object 2\nFire object 3\nFire object 4\nFire object 5", "OK", "Cancel");
  1824. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1825. }
  1826. case 2:
  1827. {
  1828. new Float:gx,Float:gy,Float:gz;
  1829. GetPlayerPos(playerid,gx,gy,gz);
  1830. FireInfo[poz[playerid]][X2]=gx;
  1831. FireInfo[poz[playerid]][Y2]=gy;
  1832. FireInfo[poz[playerid]][Z2]=gz;
  1833. SendClientMessage(playerid,-1,"{00C0FF}Coordinates of fire object 3 saved!");
  1834. SaveFire(poz[playerid]);
  1835. ShowPlayerDialog(playerid, DIALOG_FIRE, DIALOG_STYLE_LIST, "Editing", "Fire object 1\nFire object 2\nFire object 3\nFire object 4\nFire object 5", "OK", "Cancel");
  1836. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1837. }
  1838. case 3:
  1839. {
  1840. new Float:gx,Float:gy,Float:gz;
  1841. GetPlayerPos(playerid,gx,gy,gz);
  1842. FireInfo[poz[playerid]][X3]=gx;
  1843. FireInfo[poz[playerid]][Y3]=gy;
  1844. FireInfo[poz[playerid]][Z3]=gz;
  1845. SendClientMessage(playerid,-1,"{00C0FF}Coordinates of fire object 4 saved!");
  1846. SaveFire(poz[playerid]);
  1847. ShowPlayerDialog(playerid, DIALOG_FIRE, DIALOG_STYLE_LIST, "Editing", "Fire object 1\nFire object 2\nFire object 3\nFire object 4\nFire object 5", "OK", "Cancel");
  1848. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1849. }
  1850. case 4:
  1851. {
  1852. new Float:gx,Float:gy,Float:gz;
  1853. GetPlayerPos(playerid,gx,gy,gz);
  1854. FireInfo[poz[playerid]][X4]=gx;
  1855. FireInfo[poz[playerid]][Y4]=gy;
  1856. FireInfo[poz[playerid]][Z4]=gz;
  1857. SendClientMessage(playerid,-1,"{00C0FF}Coordinates of fire object 5 saved!");
  1858. SaveFire(poz[playerid]);
  1859. ShowPlayerDialog(playerid, DIALOG_FIRE, DIALOG_STYLE_LIST, "Editing", "Fire object 1\nFire object 2\nFire object 3\nFire object 4\nFire object 5", "OK", "Cancel");
  1860. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!!");
  1861. }
  1862. }
  1863. }
  1864. if(dialogid == DIALOG_NAME)
  1865. {
  1866. new ime[128];
  1867. if(!response) return 1;
  1868. if(sscanf(inputtext,"s",ime)) return ShowPlayerDialog(playerid, DIALOG_NAME, 1, ""WHITE"Changing name", ""WHITE"Enter the new name of the gang", "OK", "Cancel");
  1869. if(strlen(ime) < 1)return SendClientMessage(playerid,SCRVENA,"The name must contain at least one letter!");
  1870. SendClientMessage(playerid,-1,"{00C0FF}Name has changed!");
  1871. new string[128];
  1872. strmid(GangInfo[orga[playerid]][Name],ime,0,strlen(ime),255);
  1873. SaveGangs(orga[playerid]);
  1874. DestroyDynamic3DTextLabel(GangLabel[orga[playerid]]);
  1875. format(string,sizeof(string),"[ %s ]",GangInfo[orga[playerid]][Name]);
  1876. GangLabel[orga[playerid]] = CreateDynamic3DTextLabel(string,0x660066BB,GangInfo[orga[playerid]][uX],GangInfo[orga[playerid]][uY],GangInfo[orga[playerid]][uZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  1877. }
  1878. if(dialogid == DIALOG_EDITING)
  1879. {
  1880. if(!response) return 1;
  1881. switch(listitem)
  1882. {
  1883. case 0:
  1884. {
  1885. ShowPlayerDialog(playerid, DIALOG_NAME, 1, ""WHITE"Changing name", ""WHITE"Enter the new name of the gang", "OK", "Cancel");
  1886. }
  1887. case 1:
  1888. {
  1889. ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_LIST, "Ranks", "Rank 1\nRank 2\nRank 3\nRank 4\nRank 5\nRank 6", "OK", "Cancel");
  1890. }
  1891. case 2:
  1892. {
  1893. ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_LIST, "Skins", "Rank 1\nRank 2\nRank 3\nRank 4\nRank 5\nRank 6", "OK", "Cancel");
  1894. }
  1895. case 3:
  1896. {
  1897. SendClientMessage(playerid,-1,"{00C0FF}Coordinates are saved as soon as you click on one of the offered!");
  1898. ShowPlayerDialog(playerid, DIALOG_COORDINATES, DIALOG_STYLE_LIST, "Coordinates", "Spawn for players\nEntering the interior\nExiting the interior\nCollecting weapons for Hitman\nCollecting weapons for PD\nPlace for arrest\nPlace for spawn arrested player\nLocation of fire extinguisher", "OK", "Cancel");
  1899. }
  1900. case 4:
  1901. {
  1902. ShowPlayerDialog(playerid, DIALOG_LICENSE, DIALOG_STYLE_LIST, "Allow/Disallow", "Allow /f chat\nAllow /r chat\nAllow /d chat\nAllow Hitman commands\nAllow PD commands\nAllow FD commands", "OK", "Cancel");
  1903. }
  1904. }
  1905. }
  1906. if(dialogid == DIALOG_GANG)
  1907. {
  1908. new org;
  1909. if(!response) return 1;
  1910. if(sscanf(inputtext,"i",org)) return ShowPlayerDialog(playerid, DIALOG_GANG, 1, ""WHITE"Editing", ""WHITE"Enter the ID of the gang you want to edit", "Next", "Cancel");
  1911. new oFile[50];
  1912. format(oFile, sizeof(oFile), GANGS, org);
  1913. if(!fexist(oFile))return ShowPlayerDialog(playerid, DIALOG_GANG, 1, ""WHITE"Gang does not exist", ""WHITE"Enter the ID of the gang you want to edit", "Next", "Cancel");
  1914. orga[playerid]=org;
  1915. ShowPlayerDialog(playerid, DIALOG_EDITING, DIALOG_STYLE_LIST, "Editing", "Change the name of the gang\nChange the name of the ranks\nChange skins\nEdit coordinates\nAllow commands", "OK", "Cancel");
  1916. }
  1917. if(dialogid == DIALOG_LAPTOP)
  1918. {
  1919. if(response)
  1920. {
  1921. switch(listitem)
  1922. {
  1923. case 0:
  1924. {
  1925. new info[2048];
  1926. strcat(info, ""ZUTA"Targets\n\n", sizeof(info));
  1927. if(PlayerInfo[playerid][Rank] > 3)
  1928. {
  1929. for(new i = 0; i != MAX_PLAYERS; i++)
  1930. {
  1931. if(PlayerInfo[i][Target] != 0)
  1932. {
  1933. if(PlayerInfo[i][HaveTarget] == 0)
  1934. {
  1935. new String[250];
  1936. format(String,sizeof(String),"{FF0000}|Target| {FF9900}Player: {FFFFFF}%s {FF0000}| {FF9900}Price: {FFFFFF}%d$ {FF0000}| {FF9900}ID Target: {FFFFFF}%d {FF0000}|\n",GetName(i),PlayerInfo[i][TargetPrice],i);
  1937. strcat(info, String, sizeof(info));
  1938. }
  1939. }
  1940. }
  1941. }
  1942. ShowPlayerDialog(playerid, DIALOG_TARGETS, DIALOG_STYLE_MSGBOX, ""WHITE"Targets", info, "OK", "");
  1943. }
  1944. case 1:
  1945. {
  1946. new String[250];
  1947. if(PlayerInfo[playerid][TargetPrice] != 0)
  1948. {
  1949. format(String,sizeof(String),"{FF0000}|Your target| {FF9900}Player: {FFFFFF}%s {FF0000}| {FF9900}Price: {FFFFFF}%d$ {FF0000}|",PlayerInfo[playerid][NameVictim],PlayerInfo[playerid][TargetPrice]);
  1950. SendClientMessage(playerid,-1,String);
  1951. }
  1952. else return SendClientMessage(playerid,-1,"You dont have target!");
  1953. }
  1954. case 2:
  1955. {
  1956. ShowPlayerDialog(playerid,DIALOG_LOCATIONISP,DIALOG_STYLE_LIST,"Location of packet","Base\n Wilowfield\n LS Aero\n Near MD\n Santa Maria Beach\n Near Skate Park\n Near MD","OK","Cancel");
  1957. }
  1958. }
  1959. }
  1960. return 1;
  1961. }
  1962. if(dialogid == DIALOG_LOCATIONISP)
  1963. {
  1964. if(response)
  1965. {
  1966. switch(listitem)
  1967. {
  1968. case 0:
  1969. {
  1970. SetPlayerCheckpoint(playerid,GangInfo[orga[playerid]][LokX],GangInfo[orga[playerid]][LokY],GangInfo[orga[playerid]][LokZ],2.0);
  1971. CP[playerid] = 1;
  1972. }
  1973. case 1:
  1974. {
  1975. SetPlayerCheckpoint(playerid,2741.5186,-1945.7740,13.2050,2.0);
  1976. CP[playerid] = 2;
  1977. }
  1978. case 2:
  1979. {
  1980. SetPlayerCheckpoint(playerid,1733.5438,-2689.5618,13.5766,2.0);
  1981. CP[playerid] = 3;
  1982. }
  1983. case 3:
  1984. {
  1985. SetPlayerCheckpoint(playerid,1360.8369,-1523.3380,13.2865,2.0);
  1986. CP[playerid] = 4;
  1987. }
  1988. case 4:
  1989. {
  1990. SetPlayerCheckpoint(playerid,1000.7914,-2150.4417,12.8338,2.0);
  1991. CP[playerid] = 5;
  1992. }
  1993. case 5:
  1994. {
  1995. SetPlayerCheckpoint(playerid,2017.3931,-1306.2031,20.6147,2.0);
  1996. CP[playerid] = 6;
  1997. }
  1998. case 6:
  1999. {
  2000. SetPlayerCheckpoint(playerid,879.3303,-1363.1744,13.3739,2.0);
  2001. CP[playerid] = 7;
  2002. }
  2003. }
  2004. }
  2005. return 1;
  2006. }
  2007. if(dialogid == DIALOG_WEAPON)
  2008. {
  2009. if(response)
  2010. {
  2011. switch(listitem)
  2012. {
  2013. case 0:
  2014. {
  2015. GivePlayerWeapon(playerid,1,1);
  2016. }
  2017. case 1:
  2018. {
  2019. GivePlayerWeapon(playerid,4,300);
  2020. }
  2021. case 2:
  2022. {
  2023. GivePlayerWeapon(playerid,24,300);
  2024. }
  2025. case 3:
  2026. {
  2027. GivePlayerWeapon(playerid,29,300);
  2028. }
  2029. case 4:
  2030. {
  2031. GivePlayerWeapon(playerid,31,300);
  2032. }
  2033. case 5:
  2034. {
  2035. GivePlayerWeapon(playerid,34,300);
  2036. }
  2037. case 6:
  2038. {
  2039. GivePlayerWeapon(playerid,25,300);
  2040. }
  2041. }
  2042. }
  2043. return 1;
  2044. }
  2045. if(dialogid == DIALOG_LICENSE)
  2046. {
  2047. if(!response) return 1;
  2048. switch(listitem)
  2049. {
  2050. case 0:
  2051. {
  2052. if(GangInfo[orga[playerid]][AllowedF]==0)
  2053. {
  2054. GangInfo[orga[playerid]][AllowedF]=1;
  2055. SendClientMessage(playerid,-1,"{00C0FF}You allowed this gang /f chat!");
  2056. SaveGangs(orga[playerid]);
  2057. }
  2058. else
  2059. {
  2060. GangInfo[orga[playerid]][AllowedF]=0;
  2061. SendClientMessage(playerid,-1,"{00C0FF}You disallowed this gang /f chat!");
  2062. SaveGangs(orga[playerid]);
  2063. }
  2064. }
  2065. case 1:
  2066. {
  2067. if(GangInfo[orga[playerid]][AllowedR]==0)
  2068. {
  2069. GangInfo[orga[playerid]][AllowedR]=1;
  2070. SendClientMessage(playerid,-1,"{00C0FF}You allowed this gang /r chat!");
  2071. SaveGangs(orga[playerid]);
  2072. }
  2073. else
  2074. {
  2075. GangInfo[orga[playerid]][AllowedR]=0;
  2076. SendClientMessage(playerid,-1,"{00C0FF}You disallowed this gang /r chat!");
  2077. SaveGangs(orga[playerid]);
  2078. }
  2079. }
  2080. case 2:
  2081. {
  2082. if(GangInfo[orga[playerid]][AllowedD]==0)
  2083. {
  2084. GangInfo[orga[playerid]][AllowedD]=1;
  2085. SendClientMessage(playerid,-1,"{00C0FF}You allowed this gang /d chat!");
  2086. SaveGangs(orga[playerid]);
  2087. }
  2088. else
  2089. {
  2090. GangInfo[orga[playerid]][AllowedD]=0;
  2091. SendClientMessage(playerid,-1,"{00C0FF}You disallowed this gang /d chat!");
  2092. SaveGangs(orga[playerid]);
  2093. }
  2094. }
  2095. case 3:
  2096. {
  2097. if(GangInfo[orga[playerid]][AllowedH]==0)
  2098. {
  2099. GangInfo[orga[playerid]][AllowedH]=1;
  2100. SendClientMessage(playerid,-1,"{00C0FF}You allowed Hitman commands to this gang(/laptop,/givetarget,/targets)!");
  2101. SaveGangs(orga[playerid]);
  2102. }
  2103. else
  2104. {
  2105. GangInfo[orga[playerid]][AllowedH]=0;
  2106. SendClientMessage(playerid,-1,"{00C0FF}You disallowed Hitman commands to this gang(/laptop,/givetarget,/targets)!");
  2107. SaveGangs(orga[playerid]);
  2108. }
  2109. }
  2110. case 4:
  2111. {
  2112. if(GangInfo[orga[playerid]][AllowedPD]==0)
  2113. {
  2114. GangInfo[orga[playerid]][AllowedPD]=1;
  2115. SendClientMessage(playerid,-1,"{00C0FF}You allowed PD commands to this gang(/arrest,/cuff,/uncuff,/su,/wanted,/m,/ticket,/pu,/radar)!");
  2116. SaveGangs(orga[playerid]);
  2117. }
  2118. else
  2119. {
  2120. GangInfo[orga[playerid]][AllowedPD]=0;
  2121. SendClientMessage(playerid,-1,"{00C0FF}You disallowed PD commands to this gang(/arrest,/cuff,/uncuff,/su,/wanted,/m,/ticket,/pu,/radar)!");
  2122. SaveGangs(orga[playerid]);
  2123. }
  2124. }
  2125. case 5:
  2126. {
  2127. if(GangInfo[orga[playerid]][AllowedFD]==0)
  2128. {
  2129. GangInfo[orga[playerid]][AllowedFD]=1;
  2130. SendClientMessage(playerid,-1,"{00C0FF}You allowed FD commands to this gang(/flocate,/fireext,Fire will start automatically every 10 minutes)!");
  2131. SaveGangs(orga[playerid]);
  2132. }
  2133. else
  2134. {
  2135. GangInfo[orga[playerid]][AllowedFD]=0;
  2136. SendClientMessage(playerid,-1,"{00C0FF}You disallowed FD commands to this gang(/flocate,/fireext,Fire will start automatically every 10 minutes)!");
  2137. SaveGangs(orga[playerid]);
  2138. }
  2139. }
  2140. }
  2141. }
  2142. if(dialogid == DIALOG_TICKET)
  2143. {
  2144. if(response)
  2145. {
  2146. SendClientMessage(playerid,-1,"You paid the ticket!");
  2147. SendClientMessage(TicketWrote[playerid],-1,"The player has paid the ticket!");
  2148. GivePlayerMoney(playerid,-TicketPrice[playerid]);
  2149. TicketWrote[playerid]=-1;
  2150. TicketPrice[playerid]=0;
  2151. }
  2152. if(!response)
  2153. {
  2154. SendClientMessage(playerid,-1,"You refused to pay the ticket!");
  2155. SendClientMessage(TicketWrote[playerid],-1,"The player has refused to pay the ticket!");
  2156. TicketWrote[playerid]=-1;
  2157. TicketPrice[playerid]=0;
  2158. }
  2159. }
  2160. if(dialogid == DIALOG_PDWEAPONS)
  2161. {
  2162. if(response)
  2163. {
  2164. switch(listitem)
  2165. {
  2166. case 0: // Patrol
  2167. {
  2168. GivePlayerWeapon(playerid,24,200);
  2169. GivePlayerWeapon(playerid,41,250);
  2170. GivePlayerWeapon(playerid,3,1);
  2171. GivePlayerWeapon(playerid,25,50);
  2172. }
  2173. case 1: // Pursuit
  2174. {
  2175. GivePlayerWeapon(playerid,24,200);
  2176. GivePlayerWeapon(playerid,41,250);
  2177. GivePlayerWeapon(playerid,3,1);
  2178. GivePlayerWeapon(playerid,29,300);
  2179. }
  2180. case 2: // Special
  2181. {
  2182. GivePlayerWeapon(playerid,24,200);
  2183. GivePlayerWeapon(playerid,41,250);
  2184. GivePlayerWeapon(playerid,3,1);
  2185. GivePlayerWeapon(playerid,29,300);
  2186. GivePlayerWeapon(playerid,30,400);
  2187.  
  2188. }
  2189. case 3: // Professional
  2190. {
  2191. GivePlayerWeapon(playerid,24,200);
  2192. GivePlayerWeapon(playerid,41,250);
  2193. GivePlayerWeapon(playerid,3,1);
  2194. GivePlayerWeapon(playerid,29,300);
  2195. GivePlayerWeapon(playerid,31,400);
  2196.  
  2197. }
  2198. case 4: // undercover
  2199. {
  2200. GivePlayerWeapon(playerid,23,200);
  2201. GivePlayerWeapon(playerid,4,1);
  2202. SetPlayerArmour(playerid,0.0);
  2203. }
  2204. case 5: // Sniper
  2205. {
  2206. GivePlayerWeapon(playerid,24,200);
  2207. GivePlayerWeapon(playerid,3,1);
  2208. GivePlayerWeapon(playerid,46,1);
  2209. GivePlayerWeapon(playerid,34,60);
  2210. }
  2211. case 6: // health i armour
  2212. {
  2213. SetPlayerHealth(playerid,100.0);
  2214. SetPlayerArmour(playerid,100.0);
  2215. }
  2216. case 7: // Taser
  2217. {
  2218. GivePlayerWeapon(playerid,23,150);
  2219. }
  2220. }
  2221. }
  2222. }
  2223. return 1;
  2224. }
  2225.  
  2226. YCMD:fireext(playerid, params[],help)
  2227. {
  2228. new org=-1;
  2229. if(PlayerInfo[playerid][aLeader] > -1)
  2230. {
  2231. org = PlayerInfo[playerid][aLeader];
  2232. }
  2233. if(PlayerInfo[playerid][aMember] > -1)
  2234. {
  2235. org = PlayerInfo[playerid][aMember];
  2236. }
  2237. if(GangInfo[org][AllowedFD] == 1)
  2238. {
  2239. if(IsPlayerInRangeOfPoint(playerid,2,GangInfo[org][duX],GangInfo[org][duY],GangInfo[org][duZ]))
  2240. {
  2241. if(Fire == 1)
  2242. {
  2243. GivePlayerWeapon(playerid,42,999);
  2244. SendClientMessage(playerid,-1,"You pickup fire extinguisher!");
  2245. }
  2246. else return SendClientMessage(playerid,-1,"No fire right now!");
  2247. }else return SendClientMessage(playerid,-1,""CRVENA"You arent close to cabinets!");
  2248. }
  2249. else{SendClientMessage(playerid,SCRVENA,"You arent member of FD!");}
  2250. return 1;
  2251. }
  2252.  
  2253. YCMD:editfire(playerid,params[],help)
  2254. {
  2255. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner");
  2256. ShowPlayerDialog(playerid, DIALOG_VATRA, 1, ""WHITE"Fire", ""WHITE"Enter ID of the fire you want to edit", "Dalje", "Odustani");
  2257. return 1;
  2258. }
  2259.  
  2260. YCMD:flocate(playerid, params[],help)
  2261. {
  2262. new org=-1;
  2263. if(PlayerInfo[playerid][aLeader] > -1)
  2264. {
  2265. org = PlayerInfo[playerid][aLeader];
  2266. }
  2267. if(PlayerInfo[playerid][aMember] > -1)
  2268. {
  2269. org = PlayerInfo[playerid][aMember];
  2270. }
  2271. if(GangInfo[org][AllowedPD] == 1 || GangInfo[org][AllowedFD] == 1)
  2272. {
  2273. if(Fire == 1)
  2274. {
  2275. SetPlayerCheckpoint(playerid,FireInfo[Fireid][X],FireInfo[Fireid][Y],FireInfo[Fireid][Z],5.0);
  2276. SendClientMessage(playerid,SCRVENA,"[Headquaters]: {33CCFF}Fire located on your GPS!");
  2277. }
  2278. else return SendClientMessage(playerid,-1,"No fire right now!");
  2279. }
  2280. else{SendClientMessage(playerid,SCRVENA,"You arent member of FD!");}
  2281. return 1;
  2282. }
  2283.  
  2284. YCMD:fire(playerid, params[],help)
  2285. {
  2286. if(IsPlayerAdmin(playerid))
  2287. {
  2288. CreateFire();
  2289. SendClientMessage(playerid,-1,"You created fire for FD!");
  2290. }
  2291. return 1;
  2292. }
  2293.  
  2294. YCMD:createfire(playerid,params[],help)
  2295. {
  2296. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Samo Vlasnik!");
  2297. new id=getEmptyID(MAX_FIRE,"Gangs/Fire/%d.ini");
  2298. FireInfo[id][X]=0;
  2299. FireInfo[id][Y]=0;
  2300. FireInfo[id][Z]=0;
  2301. FireInfo[id][X1]=0;
  2302. FireInfo[id][Y1]=0;
  2303. FireInfo[id][Z1]=0;
  2304. FireInfo[id][X2]=0;
  2305. FireInfo[id][Y2]=0;
  2306. FireInfo[id][Z2]=0;
  2307. FireInfo[id][X3]=0;
  2308. FireInfo[id][Y3]=0;
  2309. FireInfo[id][Z3]=0;
  2310. FireInfo[id][X4]=0;
  2311. FireInfo[id][Y4]=0;
  2312. FireInfo[id][Z4]=0;
  2313. FireNumber++;
  2314. SaveFire(id);
  2315. SendClientMessage(playerid,-1,"{FF9900}successful created fire folder!");
  2316. return 1;
  2317. }
  2318.  
  2319. YCMD:arrest(playerid, params[],help)
  2320. {
  2321. new Razlog;
  2322. new IDKojegZatvaras;
  2323. new Vrijeme;
  2324. new org=-1;
  2325. if(PlayerInfo[playerid][aLeader] > -1)
  2326. {
  2327. org = PlayerInfo[playerid][aLeader];
  2328. }
  2329. if(PlayerInfo[playerid][aMember] > -1)
  2330. {
  2331. org = PlayerInfo[playerid][aMember];
  2332. }
  2333. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2334. if(sscanf(params, "udd",IDKojegZatvaras,Vrijeme,Razlog)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/arrest [ID] [Vrijeme] [Cijena]");
  2335. else
  2336. {
  2337. if(PlayerInfo[IDKojegZatvaras][WantedLevel] == 0) return SendClientMessage(playerid,SVJETLOPLAVA,"The player must be claimed by law!");
  2338. if(IsPlayerInRangeOfPoint(playerid,15.0,GangInfo[org][puX], GangInfo[org][puY], GangInfo[org][puZ]) && IsPlayerInRangeOfPoint(IDKojegZatvaras,15.0,GangInfo[org][puX], GangInfo[org][puY], GangInfo[org][puZ]))
  2339. {
  2340. new Poruka[220];
  2341. format(Poruka,sizeof(Poruka),"{FF9900}You're under arrest by a police officer {FF0000}%s {FF9900}for {FF0000}%d {FF9900}minutes and {FF0000}%d$",GetName(playerid),Vrijeme,Razlog);
  2342. SendClientMessage(IDKojegZatvaras,-1,Poruka);
  2343. format(Poruka,sizeof(Poruka),"{FF9900}You arrested {FF0000}%s {FF9900}in jail for {FF0000}%d {FF9900}ninutes and {FF0000}%d$",GetName(IDKojegZatvaras),Vrijeme,Razlog);
  2344. SendClientMessage(playerid,-1,Poruka);
  2345. new org2=-1;
  2346. if(PlayerInfo[IDKojegZatvaras][aLeader] > -1)
  2347. {
  2348. org2 = PlayerInfo[IDKojegZatvaras][aLeader];
  2349. }
  2350. if(PlayerInfo[IDKojegZatvaras][aMember] > -1)
  2351. {
  2352. org2 = PlayerInfo[IDKojegZatvaras][aMember];
  2353. }
  2354. if(org2>-1)
  2355. {
  2356. if(GangInfo[org2][AllowedH] == 1) format(Poruka,sizeof(Poruka),"{FF0000}News: {FFFFFF}%s {FF9900}was arrested for multiple murders,arrested him {FFFFFF}%s",GetName(IDKojegZatvaras),GetName(playerid));
  2357. else if(GangInfo[org2][AllowedF] == 1 && GangInfo[org2][AllowedH] == 0) format(Poruka,sizeof(Poruka),"{FF0000}News: {FFFFFF}%s {FF9900}was arrested for multiple robberies committed,arrested him {FFFFFF}%s",GetName(IDKojegZatvaras),GetName(playerid));
  2358. else format(Poruka,sizeof(Poruka),"{FF0000}News: {FFFFFF}%s {FF9900}was arrested for unknown reasons, arrested him {FFFFFF}%s",GetName(IDKojegZatvaras),GetName(playerid));
  2359. }
  2360. else format(Poruka,sizeof(Poruka),"{FF0000}News: {FFFFFF}%s {FF9900}was arrested for unknown reasons, arrested him {FFFFFF}%s",GetName(IDKojegZatvaras),GetName(playerid));
  2361. SendClientMessageToAll(-1,Poruka);
  2362. Jailed[IDKojegZatvaras] = 1;
  2363. GivePlayerMoney(playerid,-Razlog);
  2364. new VrijemeZatvora = Vrijeme*60000;
  2365. JailTime[IDKojegZatvaras] = VrijemeZatvora;
  2366. SetTimerEx("JailTimer", 1000,false,"id",IDKojegZatvaras,org);
  2367. SetPlayerPos(IDKojegZatvaras,GangInfo[org][arX],GangInfo[org][arY],GangInfo[org][arZ]);
  2368. RemovePlayerAttachedObject(IDKojegZatvaras, 0);
  2369. SetPlayerSpecialAction(IDKojegZatvaras, SPECIAL_ACTION_NONE);
  2370. TogglePlayerControllable(IDKojegZatvaras,1);
  2371. }else{SendClientMessage(playerid,-1,"{FF0000}Not in the range of the prison can not arrest suspect!");}
  2372. }
  2373. return 1;
  2374. }
  2375.  
  2376. YCMD:uncuff(playerid, params[],help)
  2377. {
  2378. new org=-1;
  2379. if(PlayerInfo[playerid][aLeader] > -1)
  2380. {
  2381. org = PlayerInfo[playerid][aLeader];
  2382. }
  2383. if(PlayerInfo[playerid][aMember] > -1)
  2384. {
  2385. org = PlayerInfo[playerid][aMember];
  2386. }
  2387. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2388. new user;
  2389. if(sscanf(params, "u",user)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/uncuff [Player]");
  2390. else
  2391. {
  2392. new Float:Xa, Float:Za, Float:Ya;
  2393. GetPlayerPos(user,Xa,Ya,Za);
  2394. if(IsPlayerInRangeOfPoint(playerid,6.0,Xa,Ya,Za))
  2395. {
  2396. GameTextForPlayer(user, "~r~Uncuffed!", 2500, 3);
  2397. RemovePlayerAttachedObject(user, 0);
  2398. SetPlayerSpecialAction(user, SPECIAL_ACTION_NONE);
  2399. new str[50];
  2400. format(str,sizeof(str),"{949294}* You are uncuff %s",GetName(user));
  2401. SendClientMessage(playerid,-1,str);
  2402. TogglePlayerControllable(user,1);
  2403. }
  2404. }
  2405. return 1;
  2406. }
  2407. YCMD:cuff(playerid, params[],help)
  2408. {
  2409. new org=-1;
  2410. if(PlayerInfo[playerid][aLeader] > -1)
  2411. {
  2412. org = PlayerInfo[playerid][aLeader];
  2413. }
  2414. if(PlayerInfo[playerid][aMember] > -1)
  2415. {
  2416. org = PlayerInfo[playerid][aMember];
  2417. }
  2418. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2419. new user;
  2420. if(sscanf(params, "u",user)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/cuff [Player]");
  2421. else
  2422. {
  2423. new Float:Xa, Float:Za, Float:Ya;
  2424. GetPlayerPos(user,Xa,Ya,Za);
  2425. new org2=-1;
  2426. if(PlayerInfo[user][aLeader] > -1)
  2427. {
  2428. org2 = PlayerInfo[user][aLeader];
  2429. }
  2430. if(PlayerInfo[user][aMember] > -1)
  2431. {
  2432. org2 = PlayerInfo[user][aMember];
  2433. }
  2434. if(org2>-1)
  2435. {
  2436. if(GangInfo[org2][AllowedPD] == 1){return SendClientMessage(playerid,-1,"{FF0000}You can not cuff members of the police!");}
  2437. }
  2438. if(IsPlayerInRangeOfPoint(playerid,6.0,Xa,Ya,Za))
  2439. {
  2440. RemovePlayerAttachedObject(user, 0);
  2441. GameTextForPlayer(user, "~r~Cuffed!", 2500, 3);
  2442. SetPlayerAttachedObject(user, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
  2443. new str[50];
  2444. format(str,sizeof(str),"{949294}* You are cuff %s",GetName(user));
  2445. SendClientMessage(playerid,-1,str);
  2446. TogglePlayerControllable(user,0);
  2447. SetPlayerSpecialAction(user, SPECIAL_ACTION_CUFFED);
  2448. }
  2449. }
  2450. return 1;
  2451. }
  2452.  
  2453. YCMD:radar(playerid, params[],help)
  2454. {
  2455. new org=-1;
  2456. if(PlayerInfo[playerid][aLeader] > -1)
  2457. {
  2458. org = PlayerInfo[playerid][aLeader];
  2459. }
  2460. if(PlayerInfo[playerid][aMember] > -1)
  2461. {
  2462. org = PlayerInfo[playerid][aMember];
  2463. }
  2464. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2465. if(PlacedRadar[playerid] == 0)
  2466. {
  2467. new cijena,brzina;
  2468. if(sscanf(params, "dd",brzina,cijena)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/radar [Max.Speed] [Price]");
  2469. else
  2470. {
  2471. new Float:raX,Float:raY,Float:raZ;
  2472. GetPlayerPos(playerid, raX, raY, raZ);
  2473. GetXYInFrontOfPlayer(playerid, raX, raY, 2);
  2474. PlacedRadar[playerid] = 1;
  2475. SpeedRadar[playerid] = brzina;
  2476. PriceRadar[playerid] = cijena;
  2477. RadarObject[playerid] = CreateDynamicObject(18880, raX,raY,raZ-2.5,0.0,0.0,0.0);
  2478. new str[180];
  2479. format(str,sizeof(str),"\n%s\n{33CCFF}Max Speed: {FFFFFF}%d km/h\n{33CCFF}Ticket Price:{FFFFFF} %d$",GetName(playerid),brzina,cijena);
  2480. RadarLabel[playerid] = CreateDynamic3DTextLabel(str,0x008080FF,raX, raY, raZ+2, 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
  2481. }
  2482. }else{SendClientMessage(playerid,-1,"{FF0000}* You have already set up radar!");}
  2483. return 1;
  2484. }
  2485.  
  2486. YCMD:removeradar(playerid, params[],help)
  2487. {
  2488. new org=-1;
  2489. if(PlayerInfo[playerid][aLeader] > -1)
  2490. {
  2491. org = PlayerInfo[playerid][aLeader];
  2492. }
  2493. if(PlayerInfo[playerid][aMember] > -1)
  2494. {
  2495. org = PlayerInfo[playerid][aMember];
  2496. }
  2497. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2498. if(PlacedRadar[playerid] == 1)
  2499. {
  2500. new Float:rX,Float:rY,Float:rZ;
  2501. GetDynamicObjectPos(RadarObject[playerid],rX,rY,rZ);
  2502. if(IsPlayerInRangeOfPoint(playerid,6.0,rX,rY,rZ))
  2503. {
  2504. DestroyDynamicObject(RadarObject[playerid]);
  2505. PlacedRadar[playerid] = 0;
  2506. SendClientMessage(playerid,SVJETLOPLAVA,"Radar removed!");
  2507. DestroyDynamic3DTextLabel(RadarLabel[playerid]);
  2508. }else{SendClientMessage(playerid,-1,"{FF0000}* You are not near your radar!");}
  2509.  
  2510. }else{SendClientMessage(playerid,-1,"{FF0000}* You have not placed radar!");}
  2511. return 1;
  2512. }
  2513.  
  2514. YCMD:su(playerid, params[],help)
  2515. {
  2516. new org=-1;
  2517. if(PlayerInfo[playerid][aLeader] > -1)
  2518. {
  2519. org = PlayerInfo[playerid][aLeader];
  2520. }
  2521. if(PlayerInfo[playerid][aMember] > -1)
  2522. {
  2523. org = PlayerInfo[playerid][aMember];
  2524. }
  2525. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2526. new razlog[60],id;
  2527. if(sscanf(params, "us[60]",id,razlog)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/su [ID/Name] [Reason]");
  2528. else
  2529. if(id != INVALID_PLAYER_ID)
  2530. {
  2531. new org2=-1;
  2532. if(PlayerInfo[id][aLeader] > -1)
  2533. {
  2534. org2 = PlayerInfo[id][aLeader];
  2535. }
  2536. if(PlayerInfo[id][aMember] > -1)
  2537. {
  2538. org2 = PlayerInfo[id][aMember];
  2539. }
  2540. if(org2>-1)
  2541. {
  2542. if(GangInfo[org2][AllowedPD]==1){return SendClientMessage(playerid,SVJETLOPLAVA,"You can not accuse the police!");}
  2543. }
  2544. PlayerInfo[id][WantedLevel] +=1;
  2545. SetPlayerWantedLevel(id,PlayerInfo[id][WantedLevel]);
  2546. new String[200];
  2547. format(String,sizeof(String),"{FF0000}|{FF9900} Crime: {FFFFFF}%s {FF0000}| {FF9900}Reported: {FFFFFF}%s {FF0000}|",razlog,GetName(playerid));
  2548. SendClientMessage(id,-1,String);
  2549. format(String,sizeof(String),"{0099CC}|Police| {FF9900}Crime: {FFFFFF}%s | {FF9900}Person: {FFFFFF}%s | {FF9900}Reported: {FFFFFF}%s",razlog,GetName(id),GetName(playerid));
  2550. DChat(String);
  2551. }else{SendClientMessage(playerid,SVJETLOPLAVA,"Wrong ID!");}
  2552. return 1;
  2553. }
  2554.  
  2555. YCMD:pu(playerid, params[],help)
  2556. {
  2557. new org=-1;
  2558. if(PlayerInfo[playerid][aLeader] > -1)
  2559. {
  2560. org = PlayerInfo[playerid][aLeader];
  2561. }
  2562. if(PlayerInfo[playerid][aMember] > -1)
  2563. {
  2564. org = PlayerInfo[playerid][aMember];
  2565. }
  2566. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2567. new mjesto,id;
  2568. if(sscanf(params, "ud",id,mjesto)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/pu [ID/Name] [Place (1-3)]");
  2569. else
  2570. if(id != INVALID_PLAYER_ID)
  2571. {
  2572. if(IsPlayerInAnyVehicle(playerid))
  2573. {
  2574. new Float:aaX,Float:aaY,Float:aaZ;
  2575. GetPlayerPos(id,aaX,aaY,aaZ);
  2576. if(IsPlayerInRangeOfPoint(playerid,6.0,aaX,aaY,aaZ))
  2577. {
  2578. if(!IsPlayerInAnyVehicle(id))
  2579. {
  2580. new vehicleid = GetPlayerVehicleID(playerid);
  2581. PutPlayerInVehicle(id, vehicleid, mjesto);
  2582. }else{SendClientMessage(playerid,SVJETLOPLAVA,"* This person is already in the vehicle!");}
  2583. }else{SendClientMessage(playerid,SVJETLOPLAVA,"* This person is not close to you!");}
  2584. }else{SendClientMessage(playerid,SVJETLOPLAVA,"* You must be in the vehicle!");}
  2585. }else{SendClientMessage(playerid,SVJETLOPLAVA,"* Wrong ID!");}
  2586. return 1;
  2587. }
  2588.  
  2589. YCMD:wanted(playerid, params[],help)
  2590. {
  2591. new org=-1;
  2592. new info[2048],prov=0;
  2593. if(PlayerInfo[playerid][aLeader] > -1)
  2594. {
  2595. org = PlayerInfo[playerid][aLeader];
  2596. }
  2597. if(PlayerInfo[playerid][aMember] > -1)
  2598. {
  2599. org = PlayerInfo[playerid][aMember];
  2600. }
  2601. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2602. strcat(info, ""ZUTA"Wanted\n\n", sizeof(info));
  2603. for(new i = 0; i != MAX_PLAYERS; i++)
  2604. {
  2605. if(PlayerInfo[i][WantedLevel] != 0)
  2606. {
  2607. new String[200];
  2608. format(String,sizeof(String),"{FF0000}|{FF9900}Wanted{FF0000}| {FF9900}Player: {FFFFFF}%s {FF0000}| {FF9900}WL: {FFFFFF}%d {FF0000}| {FF9900}ID player: {FFFFFF}%d {FF0000}|\n",GetName(i),PlayerInfo[i][WantedLevel],i);
  2609. strcat(info, String, sizeof(info));
  2610. prov=1;
  2611. }
  2612. }
  2613. if(prov==0)
  2614. {
  2615. strcat(info, "{FF9900}There are currently no wanted persons!", sizeof(info));
  2616. }
  2617. ShowPlayerDialog(playerid, DIALOG_TARGETS, DIALOG_STYLE_MSGBOX, ""WHITE"Wanted", info, "OK", "");
  2618. return 1;
  2619. }
  2620.  
  2621. YCMD:ticket(playerid, params[],help)
  2622. {
  2623. new org=-1;
  2624. if(PlayerInfo[playerid][aLeader] > -1)
  2625. {
  2626. org = PlayerInfo[playerid][aLeader];
  2627. }
  2628. if(PlayerInfo[playerid][aMember] > -1)
  2629. {
  2630. org = PlayerInfo[playerid][aMember];
  2631. }
  2632. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2633. new id, cjena, razlog[32], Float:Poz[3],String[150];
  2634. if(sscanf(params, "uis[32]", id, cjena, razlog)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/ticket [Player ID] [Price (1-2000)] [Reason]");
  2635. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF0000}This player is offline!");
  2636. if(id == playerid) return SendClientMessage(playerid, -1, "{FF0000}You can not write ticket to you!");
  2637. if(cjena < 1 || cjena > 2000) return SendClientMessage(playerid, -1, "{FF0000}Price may be the least $1, and most $2000!");
  2638. if(strlen(razlog) > 32) return SendClientMessage(playerid, -1, "{FF0000}Too long a reason!");
  2639. GetPlayerPos(id, Poz[0], Poz[1], Poz[2]);
  2640. if(!IsPlayerInRangeOfPoint(playerid, 5.0, Poz[0], Poz[1], Poz[2])) return SendClientMessage(playerid, -1, "{FF0000}You are too far!");
  2641. TicketWrote[id] = playerid;
  2642. TicketPrice[id] = cjena;
  2643. format(String,sizeof(String),"Police officer %s you wrote a ticket of $%d. Reason: {FFFFFF}%s",GetName(playerid), cjena, razlog);
  2644. ShowPlayerDialog(id, DIALOG_TICKET, DIALOG_STYLE_MSGBOX, ""WHITE"Kazna", String, "Plati", "Odustani");
  2645. format(String,sizeof(String),"You have written a ticket player %s of $%d. Reason: {FFFFFF}%s",GetName(id), cjena, razlog);
  2646. SendClientMessage(playerid,SVJETLOPLAVA,String);
  2647. return 1;
  2648. }
  2649.  
  2650. YCMD:m(playerid,params[],help)
  2651. {
  2652. new org=-1,prov=0;
  2653. new vehicleid=GetPlayerVehicleID(playerid);
  2654. if(PlayerInfo[playerid][aLeader] > -1)
  2655. {
  2656. org = PlayerInfo[playerid][aLeader];
  2657. }
  2658. if(PlayerInfo[playerid][aMember] > -1)
  2659. {
  2660. org = PlayerInfo[playerid][aMember];
  2661. }
  2662. if(GangInfo[org][AllowedPD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed PD commands!");
  2663. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"You are not in the vehicle!");
  2664. for(new i = 0; i < 15; i++)
  2665. {
  2666. if(vehicleid == VehID[org][i])
  2667. {
  2668. new string[250];
  2669. if(sscanf(params, "s[250]",string)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/m [text]");
  2670. {
  2671. new stringa[250];
  2672. format(stringa,sizeof(stringa),"%s | %s megaphone: %s",GangInfo[org][Name],GetName(playerid),string);
  2673. ProxDetector(20.0, playerid, stringa,AZUTA,AZUTA,AZUTA,AZUTA,AZUTA);
  2674. prov=1;
  2675. }
  2676. }
  2677. }
  2678. if(prov==0) return SendClientMessage(playerid,-1,"You are not in the vehicle of your organization!");
  2679. return 1;
  2680. }
  2681.  
  2682. YCMD:targets(playerid,params[],help)
  2683. {
  2684. new info[2048],prov=0;
  2685. if(PlayerInfo[playerid][aLeader] < 0 && PlayerInfo[playerid][aMember] < 0 ) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"You are not a member of any gang!");
  2686. new org;
  2687. if(PlayerInfo[playerid][aLeader] > -1)
  2688. {
  2689. org = PlayerInfo[playerid][aLeader];
  2690. }
  2691. if(PlayerInfo[playerid][aMember] > -1)
  2692. {
  2693. org = PlayerInfo[playerid][aMember];
  2694. }
  2695. if(GangInfo[org][AllowedH] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed Hitman commands!");
  2696. strcat(info, ""ZUTA"Targets\n\n", sizeof(info));
  2697. if(PlayerInfo[playerid][Rank] > 3)
  2698. {
  2699. for(new i = 0; i != MAX_PLAYERS; i++)
  2700. {
  2701. if(PlayerInfo[i][Target] != 0)
  2702. {
  2703. if(PlayerInfo[i][HaveTarget] == 0)
  2704. {
  2705. new String[250];
  2706. format(String,sizeof(String),"{FF0000}|Target| {FF9900}Player: {FFFFFF}%s {FF0000}| {FF9900}Price: {FFFFFF}%d$ {FF0000}| {FF9900}ID Target: {FFFFFF}%d {FF0000}|\n",GetName(i),PlayerInfo[i][TargetPrice],i);
  2707. strcat(info, String, sizeof(info));
  2708. prov=1;
  2709. }
  2710. }
  2711. }
  2712. }
  2713. if(prov==0)
  2714. {
  2715. strcat(info, "{FF9900}There are currently no targets!", sizeof(info));
  2716. }
  2717. ShowPlayerDialog(playerid, DIALOG_TARGETS, DIALOG_STYLE_MSGBOX, ""WHITE"Targets", info, "OK", "");
  2718. return 1;
  2719. }
  2720.  
  2721. YCMD:givetarget(playerid, params[],help)
  2722. {
  2723. new user,meta;
  2724. if(sscanf(params, "uu",user, meta)) return SendClientMessage(playerid, SVJETLOPLAVA, "Usage:{FFFFFF} /givetarget [ID player] [ID Target]");
  2725. else
  2726. {
  2727. if(PlayerInfo[playerid][aLeader] < 0 && PlayerInfo[playerid][aMember] < 0 ) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"You are not a member of any gang!");
  2728. new org;
  2729. if(PlayerInfo[playerid][aLeader] > -1)
  2730. {
  2731. org = PlayerInfo[playerid][aLeader];
  2732. }
  2733. if(PlayerInfo[playerid][aMember] > -1)
  2734. {
  2735. org = PlayerInfo[playerid][aMember];
  2736. }
  2737. if(GangInfo[org][AllowedH] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed Hitman commands!");
  2738. if(PlayerInfo[playerid][Rank] > 3)
  2739. {
  2740. if(PlayerInfo[meta][HaveTarget] == 0)
  2741. {
  2742. if(PlayerInfo[meta][Target] != 0)
  2743. {
  2744. if(PlayerInfo[user][HaveVictim] == 0)
  2745. {
  2746. if(PlayerInfo[user][aMember] == org || PlayerInfo[user][aLeader] == org)
  2747. {
  2748. PlayerInfo[meta][HaveTarget] = 1;
  2749. PlayerInfo[user][HaveVictim] = 1;
  2750. format(PlayerInfo[user][NameVictim],24,"%s",GetName(meta));
  2751. format(PlayerInfo[user][NameTarget],24,"%s",GetName(user));
  2752. new String[125];
  2753. format(String,sizeof(String),"You give target %s to %s",GetName(meta),GetName(user));
  2754. SendClientMessage(playerid,AZUTA,String);
  2755. format(String,sizeof(String),"Hitman %s has give you target %s",GetName(playerid),GetName(meta));
  2756. SendClientMessage(user,AZUTA,String);
  2757. }
  2758. else{SendClientMessage(playerid,AZUTA,"That player isnt Hitman!");}
  2759. }
  2760. else{SendClientMessage(playerid,AZUTA,"That Hitman have target!");}
  2761. }
  2762. else{SendClientMessage(playerid,AZUTA,"That player isnt target!");}
  2763. }
  2764. else{SendClientMessage(playerid,AZUTA,"That target doesnt exist!");}
  2765.  
  2766. }
  2767. else{SendClientMessage(playerid,AZUTA,"JUst RANK 4+");}
  2768. }
  2769. return 1;
  2770. }
  2771.  
  2772. YCMD:contract(playerid, params[],help)
  2773. {
  2774. new user,cijena;
  2775. if(sscanf(params, "ud",user, cijena)) return SendClientMessage(playerid, -1, "Usage:{FFFFFF} /contract [ID] [Price]");
  2776. else
  2777. {
  2778. if(user == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"Wrong ID");
  2779. if(user == playerid) return SendClientMessage(playerid, -1, "You can not contract yourself!");
  2780. if(PlayerInfo[user][aLeader] == PlayerInfo[playerid][aLeader]) return SendClientMessage(playerid, -1, "You cant contract your boss!");
  2781. if(cijena > 1000)
  2782. {
  2783. if(GetPlayerMoney(playerid) > cijena)
  2784. {
  2785. PlayerInfo[user][Target] = 1;
  2786. PlayerInfo[user][TargetPrice] = PlayerInfo[user][TargetPrice]+cijena;
  2787. GivePlayerMoney(playerid,-cijena);
  2788. new String[230];
  2789. format(String,sizeof(String),"You contract %s for %d$",GetName(user),cijena);
  2790. SendClientMessage(playerid,-1,String);
  2791. format(String,sizeof(String),"|News| New target: %s | Price: %d$ | Contract: %s | ID Target: %d |",GetName(user),cijena,GetName(playerid),user);
  2792. HChat(String);
  2793. }
  2794. else{SendClientMessage(playerid,-1,"You do not have that much money!!");}
  2795.  
  2796. }
  2797. else{SendClientMessage(playerid,-1,"Price need to be more than 1000$!!");}
  2798. }
  2799. return 1;
  2800. }
  2801.  
  2802. YCMD:laptop(playerid, params[],help)
  2803. {
  2804. if(PlayerInfo[playerid][aLeader] < 0 && PlayerInfo[playerid][aMember] < 0 ) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"You are not a member of any gang!");
  2805. new org;
  2806. if(PlayerInfo[playerid][aLeader] > -1)
  2807. {
  2808. org = PlayerInfo[playerid][aLeader];
  2809. }
  2810. if(PlayerInfo[playerid][aMember] > -1)
  2811. {
  2812. org = PlayerInfo[playerid][aMember];
  2813. }
  2814. orga[playerid]=org;
  2815. if(GangInfo[org][AllowedH] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed Hitman commands!");
  2816. ShowPlayerDialog(playerid, DIALOG_LAPTOP, DIALOG_STYLE_LIST, "Laptop", " Targets\n Your target\n Pakets", "OK", "Cancel");
  2817. return 1;
  2818. }
  2819.  
  2820. YCMD:editing(playerid,params[],help)
  2821. {
  2822. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  2823. ShowPlayerDialog(playerid, DIALOG_GANG, 1, ""WHITE"Editing", ""WHITE"Enter the ID of the gang you want to edit", "Next", "Cancel");
  2824. return 1;
  2825. }
  2826.  
  2827. YCMD:ganghelp(playerid,params[],help)
  2828. {
  2829. new info[2048];
  2830. if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][aLeader] < 0) return SendClientMessage(playerid,SCRVENA,"You are not allowed!");
  2831. strcat(info, ""ZUTA"Gang Help\n\n", sizeof(info));
  2832. if(IsPlayerAdmin(playerid))
  2833. {
  2834. strcat(info, ""CRVENA"Create/Delete gang\n", sizeof(info));
  2835. strcat(info, ""SIVA"/creategang-Create file of the gang\n", sizeof(info));
  2836. strcat(info, " /deletegang-Delete gang,all vehicles of gang,pickups and labels\n", sizeof(info));
  2837. strcat(info, ""CRVENA"Adding/Removing vehicles\n", sizeof(info));
  2838. strcat(info, ""SIVA"/addvehicle-You create a vehicle for a particular gang that you selected\n", sizeof(info));
  2839. strcat(info, "/deletevehicle-Deletes a specified vehicle from the gang that you selected\n", sizeof(info));
  2840. strcat(info, "/agangpark-Park the car at the coordinates where you are now\n", sizeof(info));
  2841. strcat(info, ""CRVENA"Make/Remove Leader\n", sizeof(info));
  2842. strcat(info, ""SIVA"/makeleader-You give leader certain player\n", sizeof(info));
  2843. strcat(info, "/leaderslist-See the list of leaders in a particular gang\n", sizeof(info));
  2844. strcat(info, "/removeleader-Removing the leader of a particular person in a particular gang\n", sizeof(info));
  2845. strcat(info, ""CRVENA"Editing\n", sizeof(info));
  2846. strcat(info, ""SIVA"/editing-Editing skins,names of ranks,name of the gang,coordinates\n", sizeof(info));
  2847. strcat(info, "/fire - Creating fire for firefighters\n", sizeof(info));
  2848. strcat(info, "/makefire - Creating a file where fire will be saved\n", sizeof(info));
  2849. strcat(info, "/editfire - Using this command you can save coordinates where fire object will be created at specific fire ID\n", sizeof(info));
  2850. }
  2851. if(PlayerInfo[playerid][aLeader] > -1)
  2852. {
  2853. strcat(info, ""CRVENA"Leader commands\n", sizeof(info));
  2854. strcat(info, ""SIVA"/invite-Invite player to your gang\n", sizeof(info));
  2855. strcat(info, "/uninvite-Kick player from your gang\n", sizeof(info));
  2856. strcat(info, "/members-See list of online members in your gang\n", sizeof(info));
  2857. strcat(info, "/allmembers-See all members of your gang\n", sizeof(info));
  2858. strcat(info, "/f-Chat of your gang\n", sizeof(info));
  2859. strcat(info, "/giverank-Give a certain rank members of your gang\n", sizeof(info));
  2860. strcat(info, "/laptop-Some options for Hitmans\n", sizeof(info));
  2861. strcat(info, "/givetarget-Give target to memeber of your gang\n", sizeof(info));
  2862. strcat(info, "/targets-View the available targets\n", sizeof(info));
  2863. }
  2864. ShowPlayerDialog(playerid, DIALOG_GANGHELP, DIALOG_STYLE_MSGBOX, ""WHITE"Gang Help", info, "Ok", "");
  2865. return 1;
  2866. }
  2867.  
  2868. YCMD:deletegang(playerid,params[],help)
  2869. {
  2870. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  2871. new org;
  2872. if(sscanf(params,"i",org)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/deletegang [ID Gang]");
  2873. new oFile[50];
  2874. format(oFile, sizeof(oFile), GANGS, org);
  2875. if(fexist(oFile))
  2876. {
  2877. for(new i=0;i<15;i++)
  2878. {
  2879. DestroyVehicle(VehID[org][i]);
  2880. vCreated[org][i]=0;
  2881. VehID[org][i] = 0;
  2882. DestroyDynamicPickup(GangPickup[org]);
  2883. DestroyDynamicPickup(GangPickup2[org]);
  2884. DestroyDynamic3DTextLabel(GangLabel[org]);
  2885. }
  2886. strmid(Leader[0][org],"Nobody",0,strlen("Nobody"),255);
  2887. strmid(Leader[1][org],"Nobody",0,strlen("Nobody"),255);
  2888. strmid(Member[0][org],"Nobody",0,strlen("Nobody"),255);
  2889. strmid(Member[1][org],"Nobody",0,strlen("Nobody"),255);
  2890. strmid(Member[2][org],"Nobody",0,strlen("Nobody"),255);
  2891. strmid(Member[3][org],"Nobody",0,strlen("Nobody"),255);
  2892. strmid(Member[4][org],"Nobody",0,strlen("Nobody"),255);
  2893. strmid(Member[5][org],"Nobody",0,strlen("Nobody"),255);
  2894. strmid(Member[6][org],"Nobody",0,strlen("Nobody"),255);
  2895. strmid(Member[7][org],"Nobody",0,strlen("Nobody"),255);
  2896. strmid(Member[8][org],"Nobody",0,strlen("Nobody"),255);
  2897. strmid(Member[9][org],"Nobody",0,strlen("Nobody"),255);
  2898. strmid(Member[10][org],"Nobody",0,strlen("Nobody"),255);
  2899. strmid(Member[11][org],"Nobody",0,strlen("Nobody"),255);
  2900. strmid(GangInfo[org][Name],"No name",0,strlen("No name"),255);
  2901. strmid(GangInfo[org][Rank1],"Rank 1",0,strlen("Rank 1"),255);
  2902. strmid(GangInfo[org][Rank2],"Rank 2",0,strlen("Rank 2"),255);
  2903. strmid(GangInfo[org][Rank3],"Rank 3",0,strlen("Rank 3"),255);
  2904. strmid(GangInfo[org][Rank4],"Rank 4",0,strlen("Rank 4"),255);
  2905. strmid(GangInfo[org][Rank5],"Rank 5",0,strlen("Rank 5"),255);
  2906. strmid(GangInfo[org][Rank6],"Leader",0,strlen("Leader"),255);
  2907. GangInfo[org][uX] = 0;
  2908. GangInfo[org][uY] = 0;
  2909. GangInfo[org][uZ] = 0;
  2910. GangInfo[org][sX] = 0;
  2911. GangInfo[org][sY] = 0;
  2912. GangInfo[org][sZ] = 0;
  2913. fremove(oFile);
  2914. SendClientMessage(playerid,-1,"{00C0FF}Successfully deleted gang!");
  2915. }else return SendClientMessage(playerid,SCRVENA,"This gang does not exist!");
  2916. return 1;
  2917. }
  2918. YCMD:agangpark(playerid,params[],help)
  2919. {
  2920. new org,slot;
  2921. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  2922. if(sscanf(params,"dd",org,slot)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/agangpark [ID gang][Vehicle slot]");
  2923. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,SCRVENA,"You must be in the vehicle!");
  2924. new oFile[50];
  2925. format(oFile, sizeof(oFile), GANGS, org);
  2926. if(!fexist(oFile))return SendClientMessage(playerid,SCRVENA,"This gang does not exist!");
  2927. new Float:x,Float:y,Float:z,Float:a;
  2928. GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
  2929. GetVehicleZAngle(GetPlayerVehicleID(playerid),a);
  2930. Vehicle[org][0][slot] = x;
  2931. Vehicle[org][1][slot] = y;
  2932. Vehicle[org][2][slot] = z;
  2933. Vehicle[org][3][slot] = a;
  2934. SaveGangs(org);
  2935. DestroyVehicle(VehID[org][slot]);
  2936. VehID[org][slot] = CreateVehicle(VehiclesID[org][slot],Vehicle[org][0][slot],Vehicle[org][1][slot],Vehicle[org][2][slot],Vehicle[org][3][slot],VehiclesColor[org][slot],VehiclesColor[org][slot],30000);
  2937. SendClientMessage(playerid,-1,"{00C0FF}Coordinates successfully saved!");
  2938. return 1;
  2939. }
  2940. YCMD:deletevehicle(playerid,params[],help)
  2941. {
  2942. new org,auid;
  2943. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  2944. if(sscanf(params,"dd",org,auid)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/deletevehicle [ID gang][Vehicle slot]");
  2945. if(vCreated[org][auid] == 0) return SendClientMessage(playerid,SCRVENA,"This vehicle is not created!");
  2946. new oFile[50];
  2947. format(oFile, sizeof(oFile), GANGS, org);
  2948. if(!fexist(oFile))return SendClientMessage(playerid,SCRVENA,"This gang does not exist!");
  2949. DestroyVehicle(VehID[org][auid]);
  2950. vCreated[org][auid] = 0;
  2951. Vehicle[org][0][auid] = 0.000000;
  2952. Vehicle[org][1][auid] = 0.000000;
  2953. Vehicle[org][2][auid] = 0.000000;
  2954. Vehicle[org][3][auid] = 0.000000;
  2955. VehiclesID[org][auid] = 0;
  2956. VehiclesColor[org][auid] = 0;
  2957. VehID[org][auid] = 0;
  2958. SendClientMessage(playerid,-1,"{00C0FF}The vehicle successfully deleted!");
  2959. SaveGangs(org);
  2960. return 1;
  2961. }
  2962. YCMD:leaderslist(playerid,params[],help)
  2963. {
  2964. new org;
  2965. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  2966. if(sscanf(params,"d",org)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/leaderslist [ID gang]");
  2967. new oFile[50];
  2968. format(oFile, sizeof(oFile), GANGS, org);
  2969. if(!fexist(oFile)) return SendClientMessage(playerid,SCRVENA,"This gang does not exist!");
  2970. new str[128];
  2971. SendClientMessage(playerid, -1, " ");
  2972. SendClientMessage(playerid, -1, " ");
  2973. SendClientMessage(playerid, -1, " ");
  2974. SendClientMessage(playerid, -1, " ");
  2975. format(str,256,"{00C0FF}Leaders: %s",GangInfo[org][Name]);
  2976. SendClientMessage(playerid,-1,str);
  2977. format(str,256,"Leader 1: %s| Leader 2:%s",Leader[0][org],Leader[1][org]);
  2978. SendClientMessage(playerid, 0xFFFDD1aa, str);
  2979. return 1;
  2980. }
  2981. YCMD:removeleader(playerid,params[],help)
  2982. {
  2983. new ime[128],org;
  2984. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  2985. if(sscanf(params,"ds",org,ime)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/removeleader [ID gang][Name_Surname]");
  2986. new cl=-1;
  2987. for(new i=0;i<2;i++)
  2988. {
  2989. if(udb_hash(Leader[i][org]) == udb_hash(ime))
  2990. {
  2991. cl=i;
  2992. }
  2993. }
  2994. if(cl==-1)return SendClientMessage(playerid,SCRVENA,"This person is not a leader of this gang!");
  2995. new m[24]; format(m,24,"Leader%d",cl+1);
  2996. new dFile[50];
  2997. format(dFile, sizeof(dFile), GANGS, org);
  2998. new INI:File = INI_Open(dFile);
  2999. INI_SetTag(File, "Gang");
  3000. INI_WriteString(File,m,"Nobody");
  3001. INI_Close(File);
  3002. strmid(Leader[cl][org],"Nobody",0,strlen("Nobody"),255);
  3003. new ida = GetPlayerID(ime);
  3004. if(IsPlayerConnected(ida))
  3005. {
  3006. SendClientMessage(ida,-1,"{00C0FF}You're off the position of leader!");
  3007. PlayerInfo[ida][aLeader] = -1;
  3008. PlayerInfo[ida][pSkin] = 0;
  3009. SetPlayerSkin(ida, PlayerInfo[ida][pSkin]);
  3010. SavePlayer(ida);
  3011. }
  3012. return 1;
  3013. }
  3014.  
  3015. YCMD:f(playerid, params[],help)
  3016. {
  3017. #pragma unused help
  3018. new tekst[256];
  3019. if(PlayerInfo[playerid][aLeader] < 0 && PlayerInfo[playerid][aMember] < 0 ) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"You are not a member of any gang!");
  3020. if (sscanf(params, "s[90]", tekst)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/f [Text]");
  3021. new org;
  3022. new rak[128];
  3023. if(PlayerInfo[playerid][aLeader] > -1)
  3024. {
  3025. org = PlayerInfo[playerid][aLeader];
  3026. }
  3027. if(PlayerInfo[playerid][aMember] > -1)
  3028. {
  3029. org = PlayerInfo[playerid][aMember];
  3030. }
  3031. if(GangInfo[org][AllowedF] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed /f chat!");
  3032. if(PlayerInfo[playerid][Rank] == 1)
  3033. {
  3034. strmid(rak,GangInfo[org][Rank1],0,strlen(GangInfo[org][Rank1]),255);
  3035. }
  3036. if(PlayerInfo[playerid][Rank] == 2)
  3037. {
  3038. strmid(rak,GangInfo[org][Rank2],0,strlen(GangInfo[org][Rank2]),255);
  3039. }
  3040. if(PlayerInfo[playerid][Rank] == 3)
  3041. {
  3042. strmid(rak,GangInfo[org][Rank3],0,strlen(GangInfo[org][Rank3]),255);
  3043. }
  3044. if(PlayerInfo[playerid][Rank] == 4)
  3045. {
  3046. strmid(rak,GangInfo[org][Rank4],0,strlen(GangInfo[org][Rank4]),255);
  3047. }
  3048. if(PlayerInfo[playerid][Rank] == 5)
  3049. {
  3050. strmid(rak,GangInfo[org][Rank5],0,strlen(GangInfo[org][Rank5]),255);
  3051. }
  3052. if(PlayerInfo[playerid][Rank] == 6)
  3053. {
  3054. strmid(rak,GangInfo[org][Rank6],0,strlen(GangInfo[org][Rank6]),255);
  3055. }
  3056. new string[256];
  3057. format(string, sizeof(string), "{FF9933}Gang[F] Chat | {FFFFFF}%s: {FF9933}(%s): "SIVA"%s", GetName(playerid),rak, params[0] );
  3058. return ChatGang(org,string);
  3059. }
  3060. YCMD:r(playerid, params[],help)
  3061. {
  3062. #pragma unused help
  3063. new tekst[256];
  3064. if(PlayerInfo[playerid][aLeader] < 0 && PlayerInfo[playerid][aMember] < 0 ) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"You are not a member of any gang!");
  3065. if (sscanf(params, "s[90]", tekst)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/r [Text]");
  3066. new org;
  3067. new rak[128];
  3068. if(PlayerInfo[playerid][aLeader] > -1)
  3069. {
  3070. org = PlayerInfo[playerid][aLeader];
  3071. }
  3072. if(PlayerInfo[playerid][aMember] > -1)
  3073. {
  3074. org = PlayerInfo[playerid][aMember];
  3075. }
  3076. if(GangInfo[org][AllowedR] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed /r chat!");
  3077. if(PlayerInfo[playerid][Rank] == 1)
  3078. {
  3079. strmid(rak,GangInfo[org][Rank1],0,strlen(GangInfo[org][Rank1]),255);
  3080. }
  3081. if(PlayerInfo[playerid][Rank] == 2)
  3082. {
  3083. strmid(rak,GangInfo[org][Rank2],0,strlen(GangInfo[org][Rank2]),255);
  3084. }
  3085. if(PlayerInfo[playerid][Rank] == 3)
  3086. {
  3087. strmid(rak,GangInfo[org][Rank3],0,strlen(GangInfo[org][Rank3]),255);
  3088. }
  3089. if(PlayerInfo[playerid][Rank] == 4)
  3090. {
  3091. strmid(rak,GangInfo[org][Rank4],0,strlen(GangInfo[org][Rank4]),255);
  3092. }
  3093. if(PlayerInfo[playerid][Rank] == 5)
  3094. {
  3095. strmid(rak,GangInfo[org][Rank5],0,strlen(GangInfo[org][Rank5]),255);
  3096. }
  3097. if(PlayerInfo[playerid][Rank] == 6)
  3098. {
  3099. strmid(rak,GangInfo[org][Rank6],0,strlen(GangInfo[org][Rank6]),255);
  3100. }
  3101. new string[256];
  3102. format(string, sizeof(string), "{0066CC}Gang[R] Chat | {FFFFFF}%s: {0066CC}(%s): "SIVA"%s", GetName(playerid),rak, params[0]);
  3103. return ChatGang(org,string);
  3104. }
  3105. YCMD:d(playerid, params[],help)
  3106. {
  3107. #pragma unused help
  3108. new tekst[256];
  3109. if(PlayerInfo[playerid][aLeader] < 0 && PlayerInfo[playerid][aMember] < 0 ) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"You are not a member of any gang!");
  3110. if (sscanf(params, "s[90]", tekst)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/d [Text]");
  3111. new org;
  3112. new rak[128];
  3113. if(PlayerInfo[playerid][aLeader] > -1)
  3114. {
  3115. org = PlayerInfo[playerid][aLeader];
  3116. }
  3117. if(PlayerInfo[playerid][aMember] > -1)
  3118. {
  3119. org = PlayerInfo[playerid][aMember];
  3120. }
  3121. if(GangInfo[org][AllowedD] == 0) return SendClientMessage(playerid,-1,""CRVENA"[Tony] "SIVA"This gang does not have allowed /d chat!");
  3122. if(PlayerInfo[playerid][Rank] == 1)
  3123. {
  3124. strmid(rak,GangInfo[org][Rank1],0,strlen(GangInfo[org][Rank1]),255);
  3125. }
  3126. if(PlayerInfo[playerid][Rank] == 2)
  3127. {
  3128. strmid(rak,GangInfo[org][Rank2],0,strlen(GangInfo[org][Rank2]),255);
  3129. }
  3130. if(PlayerInfo[playerid][Rank] == 3)
  3131. {
  3132. strmid(rak,GangInfo[org][Rank3],0,strlen(GangInfo[org][Rank3]),255);
  3133. }
  3134. if(PlayerInfo[playerid][Rank] == 4)
  3135. {
  3136. strmid(rak,GangInfo[org][Rank4],0,strlen(GangInfo[org][Rank4]),255);
  3137. }
  3138. if(PlayerInfo[playerid][Rank] == 5)
  3139. {
  3140. strmid(rak,GangInfo[org][Rank5],0,strlen(GangInfo[org][Rank5]),255);
  3141. }
  3142. if(PlayerInfo[playerid][Rank] == 6)
  3143. {
  3144. strmid(rak,GangInfo[org][Rank6],0,strlen(GangInfo[org][Rank6]),255);
  3145. }
  3146. new string[256];
  3147. format(string, sizeof(string), "{339966}Gang[D] Chat | {FFFFFF}%s: {339966}(%s): "SIVA"%s", GetName(playerid),rak, params[0]);
  3148. return DChat(string);
  3149. }
  3150.  
  3151. YCMD:giverank(playerid,params[],help)
  3152. {
  3153. new id,ranka;
  3154. if(PlayerInfo[playerid][aLeader] < 0) return SendClientMessage(playerid,-1,"You are not authorized!");
  3155. if(sscanf(params,"ud",id,ranka)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/giverank [ID of player][Rank(1-5)]");
  3156. if(PlayerInfo[id][aMember] != PlayerInfo[playerid][aLeader]) return SendClientMessage(playerid,SCRVENA,"The player is not a member of your gang!");
  3157. if(ranka < 1 || ranka > 5) return SendClientMessage(playerid,SCRVENA,"Ranks go from 1 to 5!");
  3158. new string[128];
  3159. format(string,sizeof(string),"{00C0FF}You've reached the rank %d!",ranka);
  3160. SendClientMessage(id,-1,string);
  3161. format(string,sizeof(string),"{00C0FF}Member %s you have given rank %d!",GetName(id),ranka);
  3162. SendClientMessage(playerid,-1,string);
  3163. new org=PlayerInfo[playerid][aLeader];
  3164. PlayerInfo[id][Rank] = ranka;
  3165. if(ranka == 1)
  3166. {
  3167. PlayerInfo[id][pSkin]=GangInfo[org][rSkin1];
  3168. }
  3169. else if(ranka == 2)
  3170. {
  3171. PlayerInfo[id][pSkin]=GangInfo[org][rSkin2];
  3172. }
  3173. else if(ranka == 3)
  3174. {
  3175. PlayerInfo[id][pSkin]=GangInfo[org][rSkin3];
  3176. }
  3177. else if(ranka == 4)
  3178. {
  3179. PlayerInfo[id][pSkin]=GangInfo[org][rSkin4];
  3180. }
  3181. else if(ranka == 5)
  3182. {
  3183. PlayerInfo[id][pSkin]=GangInfo[org][rSkin5];
  3184. }
  3185. SetPlayerSkin(id, PlayerInfo[id][pSkin]);
  3186. SavePlayer(id);
  3187. return 1;
  3188. }
  3189. YCMD:members(playerid,params[],help)
  3190. {
  3191. if(PlayerInfo[playerid][aLeader] < 0 && PlayerInfo[playerid][aMember] < 0) return SendClientMessage(playerid,SCRVENA,"You are not authorized!");
  3192. new org;
  3193. new string[128];
  3194. if(PlayerInfo[playerid][aLeader] > -1)
  3195. {
  3196. org = PlayerInfo[playerid][aLeader];
  3197. }
  3198. if(PlayerInfo[playerid][aMember] > -1)
  3199. {
  3200. org = PlayerInfo[playerid][aMember];
  3201. }
  3202. format(string, sizeof(string), "{00C0FF}_____%s Members Online_____",GangInfo[org][Name]);
  3203. SendClientMessage(playerid,-1,string);
  3204. for(new i=0;i<MAX_PLAYERS;i++)
  3205. {
  3206. if((PlayerInfo[i][aMember] == org || PlayerInfo[i][aLeader] == org) && IsPlayerConnected(i))
  3207. {
  3208. format(string, sizeof(string), " - {FFFFFF}%s - Rank:%d", GetName(i),PlayerInfo[i][Rank]);
  3209. SendClientMessage(playerid, -1, string);
  3210. }
  3211. }
  3212. return 1;
  3213. }
  3214. YCMD:allmembers(playerid,params[],help)
  3215. {
  3216. if(PlayerInfo[playerid][aLeader] < 0) return SendClientMessage(playerid,SCRVENA,"You are not a leader!");
  3217. new org = PlayerInfo[playerid][aLeader];
  3218. new str[128];
  3219. SendClientMessage(playerid, -1, " ");
  3220. SendClientMessage(playerid, -1, " ");
  3221. SendClientMessage(playerid, -1, " ");
  3222. SendClientMessage(playerid, -1, " ");
  3223. format(str,256," All Members: %s",GangInfo[org][Name]);
  3224. SendClientMessage(playerid, 0xFFFB7Daa, str);
  3225. format(str,256," %s|%s|%s|%s|%s",Member[0][org],Member[1][org],Member[2][org],Member[3][org],Member[4][org]);
  3226. SendClientMessage(playerid, 0xFFFDD1aa, str);
  3227. format(str,256," %s|%s|%s|%s|%s",Member[5][org],Member[6][org],Member[7][org],Member[8][org],Member[9][org]);
  3228. SendClientMessage(playerid, 0xFFFDD1aa, str);
  3229. format(str,256," %s|%s",Member[10][org],Member[11][org]);
  3230. SendClientMessage(playerid, 0xFFFDD1aa, str);
  3231. return 1;
  3232. }
  3233. YCMD:uninvite(playerid,params[],help)
  3234. {
  3235. new id[128];
  3236. if(PlayerInfo[playerid][aLeader] < 0) return SendClientMessage(playerid,SCRVENA,"You are not a leader!");
  3237. if(sscanf(params,"s",id)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/uninvite [Name_Surname]");
  3238. new org = PlayerInfo[playerid][aLeader];
  3239. new cl=-1;
  3240. for(new i=0;i<12;i++)
  3241. {
  3242. if(udb_hash(Member[i][org]) == udb_hash(id))
  3243. {
  3244. cl=i;
  3245. }
  3246. }
  3247. if(cl==-1)return SendClientMessage(playerid,SCRVENA,"The player is not a member of your gang!");
  3248. new m[24]; format(m,24,"Member%d",cl+1);
  3249. new dFile[50];
  3250. format(dFile, sizeof(dFile), GANGS, org);
  3251. new INI:File = INI_Open(dFile);
  3252. INI_SetTag(File, "Gang");
  3253. INI_WriteString(File,m,"Nobody");
  3254. INI_Close(File);
  3255. strmid(Member[cl][org],"Nobody",0,strlen("Nobody"),255);
  3256. new ida = GetPlayerID(id);
  3257. if(IsPlayerConnected(ida))
  3258. {
  3259. SendClientMessage(ida,-1,"{00C0FF}You have been kicked out of your gang!");
  3260. PlayerInfo[ida][aMember] = -1;
  3261. PlayerInfo[ida][pSkin] = 0;
  3262. SetPlayerSkin(ida, PlayerInfo[ida][pSkin]);
  3263. SavePlayer(ida);
  3264. }
  3265. return 1;
  3266. }
  3267. YCMD:invite(playerid,params[],help)
  3268. {
  3269. new id;
  3270. if(PlayerInfo[playerid][aLeader] < 0) return SendClientMessage(playerid,SCRVENA,"You are not a leader!");
  3271. if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/invite [ID of player]");
  3272. if(!IsPlayerConnected(id)) return SendClientMessage(playerid,SCRVENA,"Player is offline!");
  3273. if(id == playerid) return SendClientMessage(playerid,SCRVENA,"You can not invite yourself!");
  3274. if(PlayerInfo[id][aMember] > -1 || PlayerInfo[id][aLeader] > -1) return SendClientMessage(playerid,SCRVENA,"The player is already a member of a gang!");
  3275. new c = 0;
  3276. new org = PlayerInfo[playerid][aLeader];
  3277. for(new n = 0; n < 12; n++)
  3278. {
  3279. if(udb_hash(Member[n][org]) == udb_hash("Nobody"))
  3280. {
  3281. new str[128];
  3282. format(str,sizeof(str),"{00C0FF}You are invited in %s | Leader %s!",GangInfo[org][Name], GetName(playerid));
  3283. SendClientMessage(id,-1,str);
  3284. format(str,sizeof(str),"{00C0FF}You are invite a player %s!", GetName(id));
  3285. SendClientMessage(playerid,-1,str);
  3286. PlayerInfo[id][aMember] = org;
  3287. PlayerInfo[id][Rank] = 1;
  3288. PlayerInfo[id][pSkin] = GangInfo[org][rSkin1];
  3289. SetPlayerSkin(id, PlayerInfo[id][pSkin]);
  3290. SavePlayer(id);
  3291. strmid(Member[n][org],GetName(id),0,strlen(GetName(id)),255);
  3292. SaveGangs(org);
  3293. return 1;
  3294. }
  3295. else if(udb_hash(Member[n][org]) != udb_hash("Nobody"))
  3296. {
  3297. c++;
  3298. if(c == 12) return SendClientMessage(playerid, -1, "{B3B3B3}({FF0000}Error!{B3B3B3}){FFFFFF} No place in gang!");
  3299. }
  3300. }
  3301. return 1;
  3302. }
  3303. YCMD:makeleader(playerid,params[],help)
  3304. {
  3305. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  3306. new org,id;
  3307. if(sscanf(params,"ui",id,org))
  3308. {
  3309. SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/makeleader [ID of player] [ID of gang]");
  3310. for(new i=0;i<MAX_GANG;i++)
  3311. {
  3312. new rFile[50];
  3313. format(rFile, sizeof(rFile), GANGS, i);
  3314. if(fexist(rFile))
  3315. {
  3316. new string[128];
  3317. format(string,sizeof(string),"|{A3A3A3}Gang ID: {FFFFFF}%d | {A3A3A3}Name:{FFFFFF}%s|",i,GangInfo[i][Name]);
  3318. SendClientMessage(playerid,-1,string);
  3319. }
  3320. }
  3321. }
  3322. else
  3323. {
  3324. new oFile[50];
  3325. format(oFile, sizeof(oFile), GANGS, org);
  3326. if(!fexist(oFile))return SendClientMessage(playerid,SCRVENA,"This band does not exist!");
  3327. if(!IsPlayerConnected(id)) return SendClientMessage(playerid,SCRVENA,"Player is offline!");
  3328. if(PlayerInfo[id][aMember] > -1 || PlayerInfo[id][aLeader] > -1) return SendClientMessage(playerid,SCRVENA,"The player is already a member/Leader of a gang!");
  3329. new c = 0;
  3330. for(new n = 0; n < 2; n++)
  3331. {
  3332. if(udb_hash(Leader[n][org]) == udb_hash("Nobody"))
  3333. {
  3334. new str[256];
  3335. format(str,sizeof(str),"{00C0FF}You are set for the leader of the gang %s | Admin %s!",GangInfo[org][Name], GetName(playerid));
  3336. SendClientMessage(id,-1,str);
  3337. format(str,sizeof(str),"{00C0FF}You have set for the leader of %s player %s!",GangInfo[org][Name], GetName(id));
  3338. SendClientMessage(playerid,-1,str);
  3339. strmid(Leader[n][org],GetName(id),0,strlen(GetName(id)),255);
  3340. PlayerInfo[id][aLeader] = org;
  3341. PlayerInfo[id][Rank] = 6;
  3342. PlayerInfo[id][pSkin] = GangInfo[org][rSkin6];
  3343. SetPlayerSkin(id, PlayerInfo[id][pSkin]);
  3344. SavePlayer(id);
  3345. SaveGangs(org);
  3346. return 1;
  3347. }
  3348. else if(udb_hash(Leader[n][org]) != udb_hash("Nobody"))
  3349. {
  3350. c++;
  3351. if(c == 2) return SendClientMessage(playerid, -1, "{B3B3B3}({FF0000}Error!{B3B3B3}){FFFFFF} No place in gang!");
  3352. }
  3353. }
  3354. }
  3355. return 1;
  3356. }
  3357. YCMD:creategang(playerid,params[],help)
  3358. {
  3359. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  3360. new org;
  3361. if(sscanf(params,"i",org)) return SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/creategang [ID Gang]");
  3362. new oFile[50];
  3363. format(oFile, sizeof(oFile), GANGS, org);
  3364. if(!fexist(oFile))
  3365. {
  3366. strmid(Leader[0][org],"Nobody",0,strlen("Nobody"),255);
  3367. strmid(Leader[1][org],"Nobody",0,strlen("Nobody"),255);
  3368. strmid(Member[0][org],"Nobody",0,strlen("Nobody"),255);
  3369. strmid(Member[1][org],"Nobody",0,strlen("Nobody"),255);
  3370. strmid(Member[2][org],"Nobody",0,strlen("Nobody"),255);
  3371. strmid(Member[3][org],"Nobody",0,strlen("Nobody"),255);
  3372. strmid(Member[4][org],"Nobody",0,strlen("Nobody"),255);
  3373. strmid(Member[5][org],"Nobody",0,strlen("Nobody"),255);
  3374. strmid(Member[6][org],"Nobody",0,strlen("Nobody"),255);
  3375. strmid(Member[7][org],"Nobody",0,strlen("Nobody"),255);
  3376. strmid(Member[8][org],"Nobody",0,strlen("Nobody"),255);
  3377. strmid(Member[9][org],"Nobody",0,strlen("Nobody"),255);
  3378. strmid(Member[10][org],"Nobody",0,strlen("Nobody"),255);
  3379. strmid(Member[11][org],"Nobody",0,strlen("Nobody"),255);
  3380. strmid(GangInfo[org][Name],"No name",0,strlen("No name"),255);
  3381. strmid(GangInfo[org][Rank1],"Rank 1",0,strlen("Rank 1"),255);
  3382. strmid(GangInfo[org][Rank2],"Rank 2",0,strlen("Rank 2"),255);
  3383. strmid(GangInfo[org][Rank3],"Rank 3",0,strlen("Rank 3"),255);
  3384. strmid(GangInfo[org][Rank4],"Rank 4",0,strlen("Rank 4"),255);
  3385. strmid(GangInfo[org][Rank5],"Rank 5",0,strlen("Rank 5"),255);
  3386. strmid(GangInfo[org][Rank6],"Leader",0,strlen("Leader"),255);
  3387. SaveGangs(org);
  3388. SendClientMessage(playerid,-1,"{00C0FF}Successfully make gang!");
  3389. }else return SendClientMessage(playerid,SCRVENA,"This gang already exists!");
  3390. return 1;
  3391. }
  3392. YCMD:addvehicle(playerid, params[],help)
  3393. {
  3394. #pragma unused help
  3395. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""SPLAVA"[Tony] "SIVA"Only owner!");
  3396. new idbande,idvozila,mvozila,boja;
  3397. if(sscanf(params, "dddd",idbande,idvozila,mvozila,boja))
  3398. {
  3399. SendClientMessage(playerid,-1,""CRVENA"Tony Help | "SIVA"/addvehicle [ID gang] [Vehicle slot(0-14)] [Model of vehicle] [Color of vehicle]");
  3400. return 1;
  3401. }
  3402. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,SCRVENA,"You must be in the vehicle!");
  3403. if(idvozila > 14 || idvozila < 0) return SendClientMessage(playerid,SCRVENA,"Maximum slot of cars was 14 (0-14)!");
  3404. if(vCreated[idbande][idvozila] == 1) return SendClientMessage(playerid,SCRVENA,"This vehicle is already created!");
  3405. new oFile[50];
  3406. format(oFile, sizeof(oFile), GANGS, idbande);
  3407. if(!fexist(oFile)) return SendClientMessage(playerid,SCRVENA,"This gang already exists!");
  3408. new Float:pax,Float:pay,Float:paz,Float:paa;
  3409. GetVehiclePos(GetPlayerVehicleID(playerid),pax,pay,paz);
  3410. GetVehicleZAngle(GetPlayerVehicleID(playerid),paa);
  3411. Vehicle[idbande][0][idvozila] = pax;
  3412. Vehicle[idbande][1][idvozila] = pay;
  3413. Vehicle[idbande][2][idvozila] = paz;
  3414. Vehicle[idbande][3][idvozila] = paa;
  3415. VehiclesID[idbande][idvozila] = mvozila;
  3416. VehiclesColor[idbande][idvozila] = boja;
  3417. vCreated[idbande][idvozila] = 1;
  3418. VehID[idbande][idvozila] = CreateVehicle(VehiclesID[idbande][idvozila],Vehicle[idbande][0][idvozila],Vehicle[idbande][1][idvozila],Vehicle[idbande][2][idvozila],Vehicle[idbande][3][idvozila],VehiclesColor[idbande][idvozila],VehiclesColor[idbande][idvozila],30000);
  3419. SaveGangs(idbande);
  3420. return 1;
  3421. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement