Advertisement
ShomyScript

Dinamicno kreiranje organizacija Rework - Shomy

Feb 21st, 2019
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 97.90 KB | None | 0 0
  1. // Include //
  2.  
  3.  
  4. #include < a_samp >
  5. #include < YSI\y_ini >
  6. #include < YSI\y_commands >
  7. #include < sscanf2 >
  8.  
  9. // Define //
  10.  
  11. #define col_srvboja "{0057AE}"
  12. #define col_white "{FFFFFF}"
  13.  
  14. #undef MAX_PLAYERS
  15. #define MAX_PLAYERS 50
  16.  
  17. #define MAX_CLANOVI 30 // Podesite
  18.  
  19. #define MAX_ORGS 30
  20. #define MAX_ORGVEHS 100
  21. #define MAX_ORGGATES 60
  22. #define ORG_FILE "/Organizacije/%d.ini"
  23. #define ORGVEH_FILE "/OrgVozila/%d.ini"
  24. #define ORGGATES_FILE "/OrgKapije/%d.ini"
  25.  
  26. #define SCM SendClientMessage
  27. #define SPD ShowPlayerDialog
  28.  
  29. // Dialozi //
  30.  
  31. enum {
  32.  
  33. DIALOG_ORGCREATE,
  34. DIALOG_ORGCREATE2,
  35. DIALOG_ORGCREATE8,
  36. DIALOG_ORGCREATE3,
  37. DIALOG_ORGCREATE4,
  38. DIALOG_ORGCREATE5,
  39. DIALOG_ORGCREATE7,
  40. DIALOG_ORGCREATE6,
  41. DIALOG_ORGCREATE9,
  42. DIALOG_RANK2,
  43. DIALOG_RANK3,
  44. DIALOG_RANK4,
  45. DIALOG_RANK5,
  46. DIALOG_ZONACREATE,
  47.  
  48. DIALOG_ORGINV,
  49. DIALOG_ORGCMD,
  50. DIALOG_LIDERCMD,
  51. DIALOG_CLANOVI,
  52. DIALOG_UBACICLANA,
  53. DIALOG_IZBACICLANA,
  54. DIALOG_IZBACICLANAOFF,
  55. DIALOG_DODELIRANK,
  56. DIALOG_SAVEZ,
  57. DIALOG_ORGSEF,
  58. DIALOG_OSTAVINOVAC,
  59. DIALOG_OSTAVIDROGU,
  60. DIALOG_OSTAVIMATS,
  61. DIALOG_UZMINOVAC,
  62. DIALOG_UZMIMATS,
  63. DIALOG_UZMIDROGU,
  64. DIALOG_LIDERSEF,
  65. DIALOG_UZMIOPREMU,
  66. DIALOG_SEFINF
  67. }
  68.  
  69. // Enum //
  70.  
  71. enum ORG_INFO {
  72.  
  73. bool:orgLiderSlot1,
  74. bool:orgLiderSlot2,
  75. Float:orgPosX,
  76. Float:orgPosY,
  77. Float:orgPosZ,
  78. Float:orgSefX,
  79. Float:orgSefY,
  80. Float:orgSefZ,
  81. Float:orgSefRX,
  82. Float:orgSefRY,
  83. Float:orgSefRZ,
  84. orgSefNovac,
  85. orgSefMats,
  86. orgSefDroga,
  87. orgSefID,
  88. orgSefObjID,
  89. Text3D:orgSefLabel,
  90. Float:orgPDDutyX,
  91. Float:orgPDDutyY,
  92. Float:orgPDDutyZ,
  93. Text3D:orgPDDutyLabel,
  94. orgPDDutyPickup,
  95. Float:orgGunX,
  96. Float:orgGunY,
  97. Float:orgGunZ,
  98. Text3D:orgGunLabel,
  99. orgGunPickup,
  100. Float:orgHapsenjeX,
  101. Float:orgHapsenjeY,
  102. Float:orgHapsenjeZ,
  103. Text3D:orgHapsenjeLabel,
  104. orgHapsenjePickup,
  105. orgBoja,
  106. zBoja,
  107. orgIme[ 30 ],
  108. orgSkracenica[ 5 ],
  109. orgRank1[ 24 ],
  110. orgRank2[ 24 ],
  111. orgRank3[ 24 ],
  112. orgRank4[ 24 ],
  113. orgRank5[ 24 ],
  114. orgSkin1,
  115. orgSkin2,
  116. orgSkin3,
  117. orgSkin4,
  118. orgSkin5,
  119. orgZSkin1,
  120. orgZSkin2,
  121. orgZSkin3,
  122. orgZSkin4,
  123. orgZSkin5,
  124. Float:zMinX,
  125. Float:zMinY,
  126. Float:zMaxX,
  127. Float:zMaxY,
  128. Float:pPosX,
  129. Float:pPosY,
  130. Float:pPosZ,
  131. Float:intPosX,
  132. Float:intPosY,
  133. Float:intPosZ,
  134. orgZauzeta,
  135. orgUSavezu,
  136. bool:orgMafija,
  137. bool:orgBanda,
  138. bool:orgDrzavna,
  139. orgClan1[ MAX_PLAYER_NAME ],
  140. orgClan2[ MAX_PLAYER_NAME ],
  141. orgClan3[ MAX_PLAYER_NAME ],
  142. orgClan4[ MAX_PLAYER_NAME ],
  143. orgClan5[ MAX_PLAYER_NAME ],
  144. orgClan6[ MAX_PLAYER_NAME ],
  145. orgClan7[ MAX_PLAYER_NAME ],
  146. orgClan8[ MAX_PLAYER_NAME ],
  147. orgClan9[ MAX_PLAYER_NAME ],
  148. orgClan10[ MAX_PLAYER_NAME ],
  149. orgClan11[ MAX_PLAYER_NAME ],
  150. orgClan12[ MAX_PLAYER_NAME ],
  151. orgClan13[ MAX_PLAYER_NAME ],
  152. orgClan14[ MAX_PLAYER_NAME ],
  153. orgClan15[ MAX_PLAYER_NAME ],
  154. orgClan16[ MAX_PLAYER_NAME ],
  155. orgClan17[ MAX_PLAYER_NAME ],
  156. orgClan18[ MAX_PLAYER_NAME ],
  157. orgClan19[ MAX_PLAYER_NAME ],
  158. orgClan20[ MAX_PLAYER_NAME ],
  159. orgClan21[ MAX_PLAYER_NAME ],
  160. orgClan22[ MAX_PLAYER_NAME ],
  161. orgClan23[ MAX_PLAYER_NAME ],
  162. orgClan24[ MAX_PLAYER_NAME ],
  163. orgClan25[ MAX_PLAYER_NAME ],
  164. orgClan26[ MAX_PLAYER_NAME ],
  165. orgClan27[ MAX_PLAYER_NAME ],
  166. orgClan28[ MAX_PLAYER_NAME ],
  167. orgClan29[ MAX_PLAYER_NAME ],
  168. orgClan30[ MAX_PLAYER_NAME ],
  169. orgLider1[ MAX_PLAYER_NAME ],
  170. orgLider2[ MAX_PLAYER_NAME ],
  171. orgClanovi,
  172. orgInt,
  173. orgVW,
  174. zID,
  175. oID,
  176. pID
  177. }
  178. enum ORGVEH_INFO {
  179.  
  180. Float:ovPosX,
  181. Float:ovPosY,
  182. Float:ovPosZ,
  183. Float:ovRotA,
  184. ovBoja1,
  185. ovBoja2,
  186. ovModel,
  187. ovOrgID,
  188. ovID
  189. }
  190. enum ORGGATE_INFO {
  191.  
  192. Float:ogPosX,
  193. Float:ogPosY,
  194. Float:ogPosZ,
  195. Float:ogRotX,
  196. Float:ogRotY,
  197. Float:ogRotZ,
  198. Float:oogPosX,
  199. Float:oogPosY,
  200. Float:oogPosZ,
  201. Float:oogRotX,
  202. Float:oogRotY,
  203. Float:oogRotZ,
  204. ogOrgID,
  205. ogBrzinaZ,
  206. ogVremeZ,
  207. ogObjID,
  208. ogID,
  209. bool:ogOtvorena
  210. }
  211.  
  212. // New //
  213.  
  214. new OrgInfo[ MAX_ORGS ][ ORG_INFO ], Text3D:OrgLabel[ sizeof(OrgInfo) ], Text3D:ZauzimanjeLabel[ sizeof(OrgInfo) ], KreiraOrg[ MAX_PLAYERS ], KreiraZonu[ MAX_PLAYERS ], bool:KreiraPickup[ MAX_PLAYERS ], PoslaoSavez[ MAX_PLAYERS ];
  215. new pClan[ MAX_PLAYERS ], pRank[ MAX_PLAYERS ], pLider[ MAX_PLAYERS ], bool:pUlogovan[ MAX_PLAYERS ], pZensko[ MAX_PLAYERS ], pWanted[ MAX_PLAYERS ], pZatvorVreme[ MAX_PLAYERS ]; // Dodati u PlayerInfo
  216. new oPozvan[ MAX_PLAYERS ], ZauzimanjeTimer[ MAX_PLAYERS ], Zauzima[ MAX_PLAYERS ], KapijaTimer[ MAX_ORGGATES ], bool:LociraOrgHangar[ MAX_PLAYERS ], bool:CekaSavez[ MAX_PLAYERS ], KreiraSef[ MAX_PLAYERS ];
  217. new OrgVehInfo[ MAX_ORGVEHS ][ ORGVEH_INFO ], Text3D:OrgVehLabel[ sizeof(OrgVehInfo) ], OrgGateInfo[ MAX_ORGGATES ][ ORGGATE_INFO ], KreiraKapiju[ MAX_PLAYERS ], bool:KreiraZatvorenu[ MAX_PLAYERS ], TipVozila[ MAX_VEHICLES ];
  218. new bool:PoliceDuty[ MAX_PLAYERS ], StariSkin[ MAX_PLAYERS ], bool:UzeoOpremu[ MAX_PLAYERS ], ZatvorTimer[ MAX_PLAYERS ];
  219.  
  220. // Publics //
  221.  
  222. public OnPlayerEnterCheckpoint(playerid) {
  223.  
  224. if(LociraOrgHangar[ playerid ]) { DisablePlayerCheckpoint(playerid); LociraOrgHangar[ playerid ] = false; }
  225. return 1;
  226. }
  227. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  228.  
  229. switch(dialogid) {
  230. case DIALOG_ORGCREATE: {
  231. if(response) {
  232. new ime[ 30 ], i = NextORGID(MAX_ORGS);
  233. if(sscanf(inputtext, "s[30]", ime)) return SPD(playerid, DIALOG_ORGCREATE, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime organizacije.\nMax 30 slova.","Dalje","Izlaz");
  234. KreiraOrg[ playerid ] = i;
  235. OrgInfo[ i ][ orgIme ] = ime;
  236. SPD(playerid, DIALOG_ORGCREATE2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite skracenicu organizacije.\nPrimer - GSF","Dalje","Izlaz");
  237.  
  238. }
  239. }
  240. case DIALOG_ORGCREATE2: {
  241. if(response) {
  242. new skracenica[ 5 ], i = KreiraOrg[ playerid ];
  243. if(sscanf(inputtext, "s[5]", skracenica)) return SPD(playerid, DIALOG_ORGCREATE2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite skracenicu organizacije.\nPrimer - GSF","Dalje","Izlaz");
  244. OrgInfo[ i ][ orgSkracenica ] = skracenica;
  245. SPD(playerid, DIALOG_ORGCREATE8, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite vrstu organizacije.\n1 - Banda\n2 - Mafija\n3 - Drzavna","Dalje","Izlaz");
  246. }
  247. }
  248. case DIALOG_ORGCREATE8: {
  249. if(response) {
  250. new vrsta, i = KreiraOrg[ playerid ];
  251. if(sscanf(inputtext, "d", vrsta)) return SPD(playerid, DIALOG_ORGCREATE8, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite vrstu organizacije.\n1 - Banda\n2 - Mafija\n3 - Drzavna","Dalje","Izlaz");
  252. if(vrsta == 1) { OrgInfo[ i ][ orgBanda ] = true; }
  253. else if(vrsta == 2) { OrgInfo[ i ][ orgMafija ] = true; }
  254. else if(vrsta == 3) { OrgInfo[ i ][ orgDrzavna ] = true; }
  255. SPD(playerid, DIALOG_ORGCREATE3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite HEX Boju organizacije.\nPrimer: 0xFFFFFFFF","Dalje","Izlaz");
  256. }
  257. }
  258. case DIALOG_ORGCREATE3: {
  259. if(response) {
  260. new hex, i = KreiraOrg[ playerid ];
  261. if(sscanf(inputtext, "h", hex)) return SPD(playerid, DIALOG_ORGCREATE3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite HEX Boju organizacije.\nPrimer: 0xFFFFFFFF","Dalje","Izlaz");
  262. OrgInfo[ i ][ orgBoja ] = hex;
  263. SPD(playerid, DIALOG_ORGCREATE4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 1. ranka.\nPrimer: Recruit.","Dalje","Izlaz");
  264. }
  265. }
  266. case DIALOG_ORGCREATE4: {
  267. if(response) {
  268. new r1[ 24 ], i = KreiraOrg[ playerid ];
  269. if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_ORGCREATE4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 1. ranka.\nPrimer: Kadet.","Dalje","Izlaz");
  270. OrgInfo[ i ][ orgRank1 ] = r1;
  271. SPD(playerid, DIALOG_RANK2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 2. ranka.\nPrimer: Corporal.","Dalje","Izlaz");
  272. }
  273. }
  274. case DIALOG_RANK2: {
  275. if(response) {
  276. new r1[ 24 ], i = KreiraOrg[ playerid ];
  277. if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 2. ranka.\nPrimer: Corporal.","Dalje","Izlaz");
  278. OrgInfo[ i ][ orgRank2 ] = r1;
  279. SPD(playerid, DIALOG_RANK3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 3. ranka.\nPrimer: Sergenant.","Dalje","Izlaz");
  280. }
  281. }
  282. case DIALOG_RANK3: {
  283. if(response) {
  284. new r1[ 24 ], i = KreiraOrg[ playerid ];
  285. if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 3. ranka.\nPrimer: Sergenant.","Dalje","Izlaz");
  286. OrgInfo[ i ][ orgRank3 ] = r1;
  287. SPD(playerid, DIALOG_RANK4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 4. ranka (podlider).\nPrimer: Assistant of Cheif.","Dalje","Izlaz");
  288. }
  289. }
  290. case DIALOG_RANK4: {
  291. if(response) {
  292. new r1[ 24 ], i = KreiraOrg[ playerid ];
  293. if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 4. ranka (podlider).\nPrimer: Assistant of Cheif.","Dalje","Izlaz");
  294. OrgInfo[ i ][ orgRank4 ] = r1;
  295. SPD(playerid, DIALOG_RANK5, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 5. ranka (lider).\nPrimer: Cheif.","Dalje","Izlaz");
  296. }
  297. }
  298. case DIALOG_RANK5: {
  299. if(response) {
  300. new r1[ 24 ], i = KreiraOrg[ playerid ];
  301. if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK5, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 5. ranka (lider).\nPrimer: Cheif.","Dalje","Izlaz");
  302. OrgInfo[ i ][ orgRank5 ] = r1;
  303. SPD(playerid, DIALOG_ORGCREATE6, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 muskih skinova.","Dalje","Izlaz");
  304. }
  305. }
  306. case DIALOG_ORGCREATE6: {
  307. if(response) {
  308. new s1, s2, s3, s4, s5, i = KreiraOrg[ playerid ];
  309. if(sscanf(inputtext, "ddddd", s1, s2, s3, s4, s5)) return SPD(playerid, DIALOG_ORGCREATE6, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 muskih skinova.","Dalje","Izlaz");
  310. OrgInfo[ i ][ orgSkin1 ] = s1; OrgInfo[ i ][ orgSkin2 ] = s2; OrgInfo[ i ][ orgSkin3 ] = s3; OrgInfo[ i ][ orgSkin4 ] = s4; OrgInfo[ i ][ orgSkin5 ] = s5;
  311. SPD(playerid, DIALOG_ORGCREATE9, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 zenskih skinova.","Dalje","Izlaz");
  312. }
  313. }
  314. case DIALOG_ORGCREATE9: {
  315. if(response) {
  316. new s1, s2, s3, s4, s5, i = KreiraOrg[ playerid ];
  317. if(sscanf(inputtext, "ddddd", s1, s2, s3, s4, s5)) return SPD(playerid, DIALOG_ORGCREATE6, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 zenskih skinova.","Dalje","Izlaz");
  318. OrgInfo[ i ][ orgZSkin1 ] = s1; OrgInfo[ i ][ orgZSkin2 ] = s2; OrgInfo[ i ][ orgZSkin3 ] = s3; OrgInfo[ i ][ orgZSkin4 ] = s4; OrgInfo[ i ][ orgZSkin5 ] = s5;
  319. SPD(playerid, DIALOG_ORGCREATE5, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite kordinate enterijera organizacije.","Dalje","Izlaz");
  320. }
  321. }
  322. case DIALOG_ORGCREATE5: {
  323. if(response) {
  324. new Float:iX, Float:iY, Float:iZ, i = KreiraOrg[ playerid ];
  325. if(sscanf(inputtext, "fff", iX, iY, iZ)) return SPD(playerid, DIALOG_ORGCREATE5, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite kordinate enterijera organizacije.","Dalje","Izlaz");
  326. OrgInfo[ i ][ intPosX ] = iX;
  327. OrgInfo[ i ][ intPosY ] = iY;
  328. OrgInfo[ i ][ intPosZ ] = iZ;
  329. SPD(playerid, DIALOG_ORGCREATE7, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ID enterijera pa ID Virtual Worlda.","Dalje","Izlaz");
  330. }
  331. }
  332. case DIALOG_ORGCREATE7: {
  333. if(response) {
  334. new int, vw, i = KreiraOrg[ playerid ];
  335. if(sscanf(inputtext, "dd", int, vw)) return SPD(playerid, DIALOG_ORGCREATE7, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ID enterijera pa ID Virtual Worlda.","Dalje","Izlaz");
  336. OrgInfo[ i ][ orgInt ] = int;
  337. OrgInfo[ i ][ orgVW ] = vw;
  338.  
  339. new Float:X, Float:Y, Float:Z, str[ 256 ];
  340. GetPlayerPos(playerid, X,Y,Z);
  341. SendClientMessage(playerid, -1, "Ukoliko zelite da kreirate zonu i zauzimanje - /kreirajzonu");
  342. OrgInfo[ i ][ oID ] = CreatePickup(1314, 1, X,Y,Z, 0);
  343. format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"Niko\n"col_white"Lider 2: "col_srvboja"Niko\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ i ][ orgIme ],i,OrgInfo[ i ][ orgClanovi ]);
  344. OrgLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], X,Y,Z, 15.0, 0,0);
  345. OrgInfo[ i ][ orgPosX ] = X;
  346. OrgInfo[ i ][ orgPosY ] = Y;
  347. OrgInfo[ i ][ orgPosZ ] = Z;
  348. strmid( OrgInfo[ i ][ orgLider1 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  349. strmid( OrgInfo[ i ][ orgLider2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  350.  
  351. strmid( OrgInfo[ i ][ orgClan1 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  352. strmid( OrgInfo[ i ][ orgClan2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  353. strmid( OrgInfo[ i ][ orgClan3 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  354. strmid( OrgInfo[ i ][ orgClan4 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  355. strmid( OrgInfo[ i ][ orgClan5 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  356. strmid( OrgInfo[ i ][ orgClan6 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  357. strmid( OrgInfo[ i ][ orgClan7 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  358. strmid( OrgInfo[ i ][ orgClan8 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  359. strmid( OrgInfo[ i ][ orgClan9 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
  360. strmid( OrgInfo[ i ][ orgClan10 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  361. strmid( OrgInfo[ i ][ orgClan11 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  362. strmid( OrgInfo[ i ][ orgClan12 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  363. strmid( OrgInfo[ i ][ orgClan13 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  364. strmid( OrgInfo[ i ][ orgClan14 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  365. strmid( OrgInfo[ i ][ orgClan15 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  366. strmid( OrgInfo[ i ][ orgClan16 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  367. strmid( OrgInfo[ i ][ orgClan17 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  368. strmid( OrgInfo[ i ][ orgClan18 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  369. strmid( OrgInfo[ i ][ orgClan19 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  370. strmid( OrgInfo[ i ][ orgClan20 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  371. strmid( OrgInfo[ i ][ orgClan21 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  372. strmid( OrgInfo[ i ][ orgClan22 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  373. strmid( OrgInfo[ i ][ orgClan23 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  374. strmid( OrgInfo[ i ][ orgClan24 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  375. strmid( OrgInfo[ i ][ orgClan25 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  376. strmid( OrgInfo[ i ][ orgClan26 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  377. strmid( OrgInfo[ i ][ orgClan27 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  378. strmid( OrgInfo[ i ][ orgClan28 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  379. strmid( OrgInfo[ i ][ orgClan29 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  380. strmid( OrgInfo[ i ][ orgClan30 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
  381.  
  382. SaveOrg(i);
  383. KreiraOrg[ playerid ] = 0;
  384. }
  385. }
  386. case DIALOG_ZONACREATE: {
  387. if(response) {
  388. new hex;
  389. if(sscanf(inputtext, "h", hex)) return SPD(playerid, DIALOG_ZONACREATE, DIALOG_STYLE_INPUT, "Zona Kreiranje","Upisite HEX Boju zone.","U redu","Izlaz");
  390. GangZoneShowForAll(OrgInfo[ KreiraZonu[ playerid ] ][ zID ], hex);
  391. KreiraPickup[ playerid ] = true;
  392. OrgInfo[ KreiraZonu[ playerid ] ][ zBoja ] = hex;
  393. SCM(playerid, -1, "Sada sacuvajte poziciju pickupa za zauzimanje dugmetom Y.");
  394. }
  395. }
  396. case DIALOG_ORGINV: {
  397. if(response) {
  398. new i = oPozvan[ playerid ], pname[ MAX_PLAYER_NAME ];
  399. GetPlayerName(playerid, pname, sizeof(pname));
  400. OrgInfo[ i ][ orgClanovi ]++;
  401. if(!OrgInfo[ i ][ orgDrzavna ]) { SetPlayerSkin(playerid, OrgInfo[ i ][ orgSkin1 ]); }
  402. if( !strcmp( OrgInfo[ i ][ orgClan1 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan1 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  403. else if( !strcmp( OrgInfo[ i ][ orgClan2 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan2 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  404. else if( !strcmp( OrgInfo[ i ][ orgClan3 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan3 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  405. else if( !strcmp( OrgInfo[ i ][ orgClan4 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan4 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  406. else if( !strcmp( OrgInfo[ i ][ orgClan5 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan5 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  407. else if( !strcmp( OrgInfo[ i ][ orgClan6 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan6 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  408. else if( !strcmp( OrgInfo[ i ][ orgClan7 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan7 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  409. else if( !strcmp( OrgInfo[ i ][ orgClan8 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan8 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  410. else if( !strcmp( OrgInfo[ i ][ orgClan9 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan9 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  411. else if( !strcmp( OrgInfo[ i ][ orgClan10 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan10 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  412. else if( !strcmp( OrgInfo[ i ][ orgClan11 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan11 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  413. else if( !strcmp( OrgInfo[ i ][ orgClan12 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan12 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  414. else if( !strcmp( OrgInfo[ i ][ orgClan13 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan13 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  415. else if( !strcmp( OrgInfo[ i ][ orgClan14 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan14 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  416. else if( !strcmp( OrgInfo[ i ][ orgClan15 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan15 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  417. else if( !strcmp( OrgInfo[ i ][ orgClan16 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan16 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  418. else if( !strcmp( OrgInfo[ i ][ orgClan17 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan17 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  419. else if( !strcmp( OrgInfo[ i ][ orgClan18 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan18 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  420. else if( !strcmp( OrgInfo[ i ][ orgClan19 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan19 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  421. else if( !strcmp( OrgInfo[ i ][ orgClan20 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan20 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  422. else if( !strcmp( OrgInfo[ i ][ orgClan21 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan21 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  423. else if( !strcmp( OrgInfo[ i ][ orgClan22 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan22 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  424. else if( !strcmp( OrgInfo[ i ][ orgClan23 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan23 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  425. else if( !strcmp( OrgInfo[ i ][ orgClan24 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan24 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  426. else if( !strcmp( OrgInfo[ i ][ orgClan25 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan25 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  427. else if( !strcmp( OrgInfo[ i ][ orgClan26 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan26 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  428. else if( !strcmp( OrgInfo[ i ][ orgClan27 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan27 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  429. else if( !strcmp( OrgInfo[ i ][ orgClan28 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan28 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  430. else if( !strcmp( OrgInfo[ i ][ orgClan29 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan29 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  431. else if( !strcmp( OrgInfo[ i ][ orgClan30 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan30 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
  432. pClan[ playerid ] = i;
  433. SaveOrg(i);
  434. for(new p; p < MAX_PLAYERS; p++) {
  435. if(pClan[ p ] == i) { new str[ 60 ]; format(str, sizeof(str), "Igrac %s je prihvatio poziv i pridruzio se organizaciji.", pname); SCM(p, -1, str); }
  436. }
  437. oPozvan[ playerid ] = 0;
  438. }
  439. else {
  440. new i = oPozvan[ playerid ], pname[ MAX_PLAYER_NAME ];
  441. GetPlayerName(playerid, pname, sizeof(pname));
  442. for(new p; p < MAX_PLAYERS; p++) {
  443. if(pClan[ p ] == i) { new str[ 60 ]; format(str, sizeof(str), "Igrac %s je odbio poziv za organizaciju.", pname); SCM(p, -1, str); }
  444. }
  445. oPozvan[ playerid ] = 0;
  446. }
  447. }
  448. case DIALOG_ORGCMD: {
  449. if(!response) return 0;
  450. switch(listitem) {
  451. case 0: {
  452. SetPlayerCheckpoint(playerid, OrgInfo[ pClan[ playerid ] ][ orgPosX ], OrgInfo[ pClan[ playerid ] ][ orgPosY ], OrgInfo[ pClan[ playerid ] ][ orgPosZ ], 3.0);
  453. SendClientMessage(playerid, -1, "Organizacija oznacena crveno na mapi.");
  454. LociraOrgHangar[ playerid ] = true;
  455. }
  456. case 1: {
  457. // HANGAR KOORDINATE TRAXX GEJ SetPlayerCheckpoint(playerid, OrgInfo[ pClan[ playerid ] ][ orgPosX ], OrgInfo[ pClan[ playerid ] ][ orgPosY ], OrgInfo[ pClan[ playerid ] ][ orgPosZ ], 3.0);
  458. SendClientMessage(playerid, -1, "Hangar oznacen crveno na mapi.");
  459. LociraOrgHangar[ playerid ] = true;
  460. }
  461. case 2: {
  462. new DialogStrgEx[ 2048 ];
  463. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  464. format( DialogStrgEx, sizeof( DialogStrgEx ), "Lider 1: %s\nLider 2: %s\nClan 1: %s\nClan 2: %s\nClan 3: %s\nClan 4: %s\nClan 5: %s\nClan 6: %s\nClan 7: %s\nClan 8: %s\nClan 9: %s\nClan 10: %s\nClan 11: %s\nClan 12: %s\nClan 13: %s\nClan 14: %s\nClan 15: %s\nClan 16: %s\nClan 17: %s\nClan 18: %s\nClan 19: %s\nClan 20: %s\nClan 21: %s\nClan 22: %s\nClan 23: %s\nClan 24: %s\nClan 25: %s\nClan 26: %s\nClan 27: %s\nClan 28: %s\nClan 29: %s\nClan 30: %s" ,
  465. OrgInfo[ pClan[ playerid ] ][ orgLider1 ],
  466. OrgInfo[ pClan[ playerid ] ][ orgLider2 ],
  467. OrgInfo[ pClan[ playerid ] ][ orgClan1 ],
  468. OrgInfo[ pClan[ playerid ] ][ orgClan2 ],
  469. OrgInfo[ pClan[ playerid ] ][ orgClan3 ],
  470. OrgInfo[ pClan[ playerid ] ][ orgClan4 ],
  471. OrgInfo[ pClan[ playerid ] ][ orgClan5 ],
  472. OrgInfo[ pClan[ playerid ] ][ orgClan6 ],
  473. OrgInfo[ pClan[ playerid ] ][ orgClan7 ],
  474. OrgInfo[ pClan[ playerid ] ][ orgClan8 ],
  475. OrgInfo[ pClan[ playerid ] ][ orgClan9 ],
  476. OrgInfo[ pClan[ playerid ] ][ orgClan10 ],
  477. OrgInfo[ pClan[ playerid ] ][ orgClan11 ],
  478. OrgInfo[ pClan[ playerid ] ][ orgClan12 ],
  479. OrgInfo[ pClan[ playerid ] ][ orgClan13 ],
  480. OrgInfo[ pClan[ playerid ] ][ orgClan14 ],
  481. OrgInfo[ pClan[ playerid ] ][ orgClan15 ],
  482. OrgInfo[ pClan[ playerid ] ][ orgClan16 ],
  483. OrgInfo[ pClan[ playerid ] ][ orgClan17 ],
  484. OrgInfo[ pClan[ playerid ] ][ orgClan18 ],
  485. OrgInfo[ pClan[ playerid ] ][ orgClan19 ],
  486. OrgInfo[ pClan[ playerid ] ][ orgClan20 ],
  487. OrgInfo[ pClan[ playerid ] ][ orgClan21 ],
  488. OrgInfo[ pClan[ playerid ] ][ orgClan22 ],
  489. OrgInfo[ pClan[ playerid ] ][ orgClan23 ],
  490. OrgInfo[ pClan[ playerid ] ][ orgClan24 ],
  491. OrgInfo[ pClan[ playerid ] ][ orgClan25 ],
  492. OrgInfo[ pClan[ playerid ] ][ orgClan26 ],
  493. OrgInfo[ pClan[ playerid ] ][ orgClan27 ],
  494. OrgInfo[ pClan[ playerid ] ][ orgClan28 ],
  495. OrgInfo[ pClan[ playerid ] ][ orgClan29 ],
  496. OrgInfo[ pClan[ playerid ] ][ orgClan30 ] );
  497. ShowPlayerDialog( playerid, DIALOG_CLANOVI, DIALOG_STYLE_MSGBOX, "CLANOVI", DialogStrgEx, "U redu", "" );
  498. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  499. }
  500. case 3: {
  501. new i = pClan[ playerid ];
  502. if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ orgSefX ], OrgInfo[ i ][ orgSefY ], OrgInfo[ i ][ orgSefZ ])) return SCM(playerid, -1, "Niste u blizini sefa.");
  503. ShowPlayerDialog(playerid, DIALOG_ORGSEF, DIALOG_STYLE_LIST, "Ostavi u sef:","Novac\nMaterijal\nDroga","U redu","Izlaz");
  504. }
  505. }
  506. }
  507. case DIALOG_ORGSEF: {
  508. if(!response) return 0;
  509. switch(listitem) {
  510. case 0: return ShowPlayerDialog(playerid, DIALOG_OSTAVINOVAC, DIALOG_STYLE_INPUT, "OSTAVI NOVAC","Upisite kolicinu novca.","U redu","Izlaz");
  511. case 1: return ShowPlayerDialog(playerid, DIALOG_OSTAVIMATS, DIALOG_STYLE_INPUT, "OSTAVI MATERIJAL","Upisite kolicinu materijala.","U redu","Izlaz");
  512. case 2: return ShowPlayerDialog(playerid, DIALOG_OSTAVIDROGU, DIALOG_STYLE_INPUT, "OSTAVI DROGU","Upisite kolicinu droge (grami).","U redu","Izlaz");
  513. }
  514. }
  515. case DIALOG_OSTAVINOVAC: {
  516. if(!response) return 0;
  517. new kol;
  518. if(sscanf(inputtext, "d", kol)) return ShowPlayerDialog(playerid, DIALOG_OSTAVINOVAC, DIALOG_STYLE_INPUT, "OSTAVI NOVAC","Upisite kolicinu novca.","U redu","Izlaz");
  519. if(kol > GetPlayerMoney(playerid)) return SCM(playerid, -1, "Nemate toliko novca.");
  520. OrgInfo[ pClan[ playerid ] ][ orgSefNovac ] += kol;
  521. GivePlayerMoney(playerid, -kol);
  522. SaveOrg(pClan[ playerid ]);
  523. }
  524. case DIALOG_OSTAVIMATS: {
  525. if(!response) return 0;
  526. // OSTAVI MATERIJALE
  527. }
  528. case DIALOG_OSTAVIDROGU: {
  529. if(!response) return 0;
  530. // OSTAVI DROGU
  531. }
  532. case DIALOG_LIDERCMD: {
  533. if(!response) return 0;
  534. switch(listitem) {
  535. case 0: return ShowPlayerDialog(playerid, DIALOG_UBACICLANA, DIALOG_STYLE_INPUT, "UBACI CLANA","Unesite ID clana.","U redu","Izlaz");
  536. case 1: return ShowPlayerDialog(playerid, DIALOG_IZBACICLANA, DIALOG_STYLE_INPUT, "IZBACI CLANA","Unesite ID clana.","U redu","Izlaz");
  537. case 2: return ShowPlayerDialog(playerid, DIALOG_IZBACICLANAOFF, DIALOG_STYLE_INPUT, "IZBACI OFFLINE CLANA","Unesite ime clana.","U redu","Izlaz");
  538. case 3: return ShowPlayerDialog(playerid, DIALOG_DODELIRANK, DIALOG_STYLE_INPUT, "DODELI RANK CLANU","Unesite id clana, pa ID ranka.\nPrimer: 4 3\nRank 0 - Suspendovan","U redu","Izlaz");
  539. case 4: {
  540. new str[ 120 ];
  541. format(str, sizeof(str), "Informacije o sefu:\n\nNovac: %d$\nMaterijali: %d\nDroga: %dg", OrgInfo[ pLider[ playerid ] ][ orgSefNovac ], OrgInfo[ pLider[ playerid ] ][ orgSefMats ], OrgInfo[ pLider[ playerid ] ][ orgSefDroga ]);
  542. ShowPlayerDialog(playerid, DIALOG_SEFINF, DIALOG_STYLE_MSGBOX, "SEF", str, "U redu","");
  543. }
  544. case 5: return ShowPlayerDialog(playerid, DIALOG_LIDERSEF, DIALOG_STYLE_LIST, "UZMI IZ SEFA","Novac\nMaterijal\nDrogu","U redu","Izlaz");
  545. case 6: {
  546. // POKRENI WAR
  547. }
  548. }
  549. }
  550. case DIALOG_UZMIOPREMU: {
  551. if(!response) return 0;
  552. UzeoOpremu[ playerid ] = true;
  553. switch(listitem) {
  554. case 0: return GivePlayerWeapon(playerid, 3, 500);
  555. case 1: {
  556. GivePlayerWeapon(playerid, 41, 500);
  557. GivePlayerWeapon(playerid, 24, 100);
  558. GivePlayerWeapon(playerid, 3, 500);
  559. GivePlayerWeapon(playerid, 30, 200);
  560. }
  561. case 2: {
  562. GivePlayerWeapon(playerid, 41, 500);
  563. GivePlayerWeapon(playerid, 24, 100);
  564. GivePlayerWeapon(playerid, 3, 500);
  565. GivePlayerWeapon(playerid, 30, 200);
  566. GivePlayerWeapon(playerid, 29, 200);
  567. GivePlayerWeapon(playerid, 25, 30);
  568. }
  569. case 3: {
  570. GivePlayerWeapon(playerid, 41, 500);
  571. GivePlayerWeapon(playerid, 24, 100);
  572. GivePlayerWeapon(playerid, 3, 500);
  573. GivePlayerWeapon(playerid, 30, 200);
  574. GivePlayerWeapon(playerid, 29, 200);
  575. GivePlayerWeapon(playerid, 25, 30);
  576. GivePlayerWeapon(playerid, 31, 200);
  577. GivePlayerWeapon(playerid, 17, 10);
  578. }
  579. case 4: {
  580. GivePlayerWeapon(playerid, 41, 500);
  581. GivePlayerWeapon(playerid, 24, 100);
  582. GivePlayerWeapon(playerid, 3, 500);
  583. GivePlayerWeapon(playerid, 30, 200);
  584. GivePlayerWeapon(playerid, 29, 200);
  585. GivePlayerWeapon(playerid, 27, 30);
  586. GivePlayerWeapon(playerid, 31, 200);
  587. GivePlayerWeapon(playerid, 17, 10);
  588. GivePlayerWeapon(playerid, 34, 50);
  589. }
  590. case 5: {
  591. GivePlayerWeapon(playerid, 41, 500);
  592. GivePlayerWeapon(playerid, 24, 100);
  593. GivePlayerWeapon(playerid, 3, 500);
  594. GivePlayerWeapon(playerid, 30, 200);
  595. GivePlayerWeapon(playerid, 29, 200);
  596. GivePlayerWeapon(playerid, 27, 30);
  597. GivePlayerWeapon(playerid, 31, 200);
  598. GivePlayerWeapon(playerid, 17, 10);
  599. GivePlayerWeapon(playerid, 34, 50);
  600. GivePlayerWeapon(playerid, 33, 50);
  601. }
  602. }
  603. }
  604. case DIALOG_LIDERSEF: {
  605. if(!response) return 0;
  606. if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ pLider[ playerid ] ][ orgSefX ], OrgInfo[ pLider[ playerid ] ][ orgSefY ], OrgInfo[ pLider[ playerid ] ][ orgSefZ ])) return SCM(playerid, -1, "Niste kod sefa organizacije.");
  607. switch(listitem) {
  608. case 0: {
  609. new str[ 60 ];
  610. format(str, sizeof(str), "Upisite kolicinu novca.\nStanje: %d$", OrgInfo[ pClan[ playerid ] ][ orgSefNovac ]);
  611. ShowPlayerDialog(playerid, DIALOG_UZMINOVAC, DIALOG_STYLE_INPUT, "UZIMANJE NOVCA", str, "U redu","Izlaz");
  612. }
  613. case 1: {
  614. new str[ 60 ];
  615. format(str, sizeof(str), "Upisite kolicinu materijala.\nStanje: %d", OrgInfo[ pClan[ playerid ] ][ orgSefMats ]);
  616. ShowPlayerDialog(playerid, DIALOG_UZMIMATS, DIALOG_STYLE_INPUT, "UZIMANJE MATERIJALA", str, "U redu","Izlaz");
  617. }
  618. case 2: {
  619. new str[ 60 ];
  620. format(str, sizeof(str), "Upisite kolicinu droge.\nStanje: %dg", OrgInfo[ pClan[ playerid ] ][ orgSefDroga ]);
  621. ShowPlayerDialog(playerid, DIALOG_UZMIDROGU, DIALOG_STYLE_INPUT, "UZIMANJE DROGE", str, "U redu","Izlaz");
  622. }
  623. }
  624. }
  625. case DIALOG_UZMINOVAC: {
  626. if(!response) return 0;
  627. new kol;
  628. if(sscanf(inputtext, "d", kol)) {
  629. new str[ 60 ];
  630. format(str, sizeof(str), "Upisite kolicinu novca.\nStanje: %d$", OrgInfo[ pClan[ playerid ] ][ orgSefNovac ]);
  631. ShowPlayerDialog(playerid, DIALOG_UZMINOVAC, DIALOG_STYLE_INPUT, "UZIMANJE NOVCA", str, "U redu","Izlaz");
  632. return 1;
  633. }
  634. if(kol > OrgInfo[ pClan[ playerid ] ][ orgSefNovac ]) return SCM(playerid, -1, "Nemate toliko novca u sefu.");
  635. GivePlayerMoney(playerid, kol);
  636. OrgInfo[ pClan[ playerid ] ][ orgSefNovac ] -= kol;
  637. }
  638. case DIALOG_UZMIMATS: {
  639. if(!response) return 0;
  640. new kol;
  641. if(sscanf(inputtext, "d", kol)) {
  642. new str[ 60 ];
  643. format(str, sizeof(str), "Upisite kolicinu materijala.\nStanje: %d", OrgInfo[ pClan[ playerid ] ][ orgSefMats ]);
  644. ShowPlayerDialog(playerid, DIALOG_UZMIMATS, DIALOG_STYLE_INPUT, "UZIMANJE MATERIJALA", str, "U redu","Izlaz");
  645. return 1;
  646. }
  647. if(kol > OrgInfo[ pClan[ playerid ] ][ orgSefMats ]) return SCM(playerid, -1, "Nemate toliko materijala u sefu.");
  648. // Nesto sto daje materijale :D
  649. OrgInfo[ pClan[ playerid ] ][ orgSefMats ] -= kol;
  650. }
  651. case DIALOG_UZMIDROGU: {
  652. if(!response) return 0;
  653. new kol;
  654. if(sscanf(inputtext, "d", kol)) {
  655. new str[ 60 ];
  656. format(str, sizeof(str), "Upisite kolicinu droge.\nStanje: %dg", OrgInfo[ pClan[ playerid ] ][ orgSefDroga ]);
  657. ShowPlayerDialog(playerid, DIALOG_UZMIDROGU, DIALOG_STYLE_INPUT, "UZIMANJE DROGE", str, "U redu","Izlaz");
  658. return 1;
  659. }
  660. if(kol > OrgInfo[ pClan[ playerid ] ][ orgSefDroga ]) return SCM(playerid, -1, "Nemate toliko droge u sefu.");
  661. // Nesto sto daje drogu :D
  662. OrgInfo[ pClan[ playerid ] ][ orgSefDroga ] -= kol;
  663. }
  664. case DIALOG_DODELIRANK: {
  665. if(!response) return 0;
  666. new id, rid, str[ 35 ];
  667. if(sscanf(inputtext, "ud", id, rid)) return ShowPlayerDialog(playerid, DIALOG_DODELIRANK, DIALOG_STYLE_INPUT, "DODELI RANK CLANU","Unesite id clana, pa ID ranka.\nPrimer: 4 3\nRank 0 - Suspendovan","U redu","Izlaz");
  668. if(rid > 4) return SCM(playerid, -1, "Rank ID : 0 - 4");
  669. if(pClan[ id ] != pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac nije clan Vase organizacije.");
  670. if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
  671. if(rid == 0 && !OrgInfo[ pLider[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Ne mozete dati rank 0 igracu, niste drzavna organizacija.");
  672. if(rid == 0 && OrgInfo[ pLider[ playerid ] ][ orgDrzavna ]) {
  673. SCM(id, -1, "Lider Vas je suspendovao.");
  674. SCM(playerid, -1, "Suspendovali ste igraca.");
  675. pRank[ id ] = rid;
  676. ResetPlayerWeapons(playerid);
  677. PoliceDuty[ id ] = false;
  678. SetPlayerArmour(id, 0);
  679. SetPlayerHealth(id, 99);
  680. SetPlayerColor(id, 0xFFFFFF00);
  681. SetPlayerSkin(id, 1);
  682. }
  683. else {
  684. format(str, sizeof(str), "Lider Vas je unapredio u rank %d.", rid);
  685. SCM(id, -1, str);
  686. SCM(playerid, -1, "Dodelili ste igracu rank.");
  687. pRank[ id ] = rid;
  688. if(rid == 1) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin1 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin1 ]); } }
  689. else if(rid == 2) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin2 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin2 ]); } }
  690. else if(rid == 3) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin3 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin3 ]); } }
  691. else if(rid == 4) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin4 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin4 ]); } }
  692. }
  693. }
  694. case DIALOG_UBACICLANA: {
  695. if(!response) return 0;
  696. new id, pname[ MAX_PLAYER_NAME ], str[ 115 ];
  697. if(sscanf(inputtext, "u", id)) return ShowPlayerDialog(playerid, DIALOG_UBACICLANA, DIALOG_STYLE_INPUT, "UBACI CLANA","Unesite ID clana.","U redu","Izlaz");
  698. if(pClan[ id ] > 0) return SCM(playerid, -1, "Taj igrac je vec clan neke organizacije.");
  699. if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
  700. if(OrgInfo[ pLider[ playerid ] ][ orgClanovi ] == MAX_CLANOVI) return SCM(playerid, -1, "Dostigli ste maximalan broj clanova.");
  701. GetPlayerName(playerid, pname, sizeof(pname));
  702. SCM(playerid, -1, "Poslali ste poziv za organizaciju.");
  703. format(str, sizeof(str), "Lider %s Vam je poslao poziv da se pridruzite\nOrganizaciji %s.", pname, OrgInfo[ pLider[ playerid ] ][ orgIme ]);
  704. SPD(id, DIALOG_ORGINV, DIALOG_STYLE_MSGBOX, "POZIV", str, "Prihvati","Odbij");
  705. oPozvan[ id ] = pLider[ playerid ];
  706. }
  707. case DIALOG_IZBACICLANA: {
  708. if(!response) return 0;
  709. new id, OrgID = pLider[ playerid ];
  710. if(sscanf(inputtext, "u", id)) return ShowPlayerDialog(playerid, DIALOG_IZBACICLANA, DIALOG_STYLE_INPUT, "IZBACI CLANA","Unesite ID clana.","U redu","Izlaz");
  711. if(pClan[ id ] != pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac nije clan Vase organizacije.");
  712. if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
  713. SCM(id, -1, "Izbaceni ste iz organizacije.");
  714. SetPlayerSkin(id, 1);
  715. pClan[ id ] = 0;
  716. SCM(playerid, -1, "Izbacili ste igraca iz organizacije.");
  717. OrgInfo[ pLider[ playerid ] ][ orgClanovi ]--;
  718. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan1 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan1], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME); }
  719. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan2 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  720. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan3 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan3 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  721. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan4 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan4 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  722. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan5 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan5 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  723. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan6 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan6 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  724. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan7 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan7 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  725. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan8 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan8 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  726. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan9 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan9 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  727. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan10 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan10 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  728. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan11 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan11 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  729. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan12 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan12 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  730. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan13 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan13 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  731. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan18 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan18 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  732. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan19 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan19 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  733. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan20 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan20 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  734. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan21 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan21 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  735. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan22 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan22 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  736. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan23 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan23 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  737. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan24 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan24 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  738. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan25 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan25 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  739. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan26 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan26 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  740. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan27 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan27 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  741. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan28 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan28 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  742. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan29 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan29 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  743. if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan30 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan30 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  744.  
  745. SaveOrg(pLider[ playerid ]);
  746. }
  747. case DIALOG_IZBACICLANAOFF: {
  748. if(!response) return 0;
  749. new imeigraca[ 24 ], OrgID = pLider[ playerid ];
  750. if( sscanf( inputtext, "s[24]", imeigraca ) ) return SendClientMessage(playerid, -1, "Nepravilno uneto ime i prezime( Ime_Prezime )!" );
  751. if( IsPlayerConnected( GetPlayerIdFromName( imeigraca ) ) ) {
  752. SendClientMessage( playerid, -1, "Taj igrac je online tako da izbaci ga online.");
  753. return 1;
  754. }
  755. if(pClan[ GetPlayerIdFromName( imeigraca ) ] != pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac nije clan Vase organizacije.");
  756. if(pLider[ GetPlayerIdFromName( imeigraca ) ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
  757.  
  758. if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan1 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan1], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME); }
  759. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan2 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  760. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan3 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan3 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  761. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan4 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan4 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  762. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan5 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan5 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  763. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan6 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan6 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  764. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan7 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan7 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  765. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan8 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan8 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  766. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan9 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan9 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  767. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan10 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan10 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  768. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan11 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan11 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  769. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan12 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan12 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  770. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan13 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan13 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  771. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan14 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan14 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  772. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan15 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan15 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  773. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan16 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan16 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  774. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan17 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan17 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  775. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan18 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan18 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  776. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan19 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan19 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  777. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan20 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan20 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  778. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan21 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan21 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  779. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan22 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan22 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  780. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan23 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan23 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  781. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan24 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan24 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  782. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan25 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan25 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  783. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan26 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan26 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  784. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan27 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan27 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  785. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan28 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan28 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  786. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan29 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan29 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  787. else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan30 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan30 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
  788.  
  789. OrgInfo[ OrgID ][ orgClanovi ]--;
  790. SaveOrg( OrgID );
  791. }
  792. case DIALOG_SAVEZ: {
  793. new id = PoslaoSavez[ playerid ];
  794. if(!response) {
  795. SCM(playerid, -1, "Odbili ste zahtev za savez.");
  796. SCM(id, -1, "Zahtev za savez odbijen.");
  797. PoslaoSavez[ playerid ] = -1;
  798. CekaSavez[ id ] = false;
  799. }
  800. else {
  801. OrgInfo[ pLider[ playerid ] ][ orgUSavezu ] = pLider[ id ];
  802. OrgInfo[ pLider[ id ] ][ orgUSavezu ] = pLider[ playerid ];
  803. SCM(id, -1, "Zahtev za savez prihvacen.");
  804. SCM(playerid, -1, "Prihvatili ste zahtev za savez.");
  805. SaveOrg(pLider[ id ]);
  806. SaveOrg(pLider[ playerid ]);
  807. PoslaoSavez[ playerid ] = -1;
  808. CekaSavez[ id ] = false;
  809. }
  810. }
  811. }
  812. return 1;
  813. }
  814. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
  815.  
  816. if(newkeys == KEY_YES) {
  817. if(KreiraZonu[ playerid ] != 0 && !KreiraPickup[ playerid ]) {
  818. new i = KreiraZonu[ playerid ], Float:X, Float:Y, Float:Z;
  819. GetPlayerPos(playerid, X,Y,Z);
  820. OrgInfo[ i ][ zMaxX ] = X;
  821. OrgInfo[ i ][ zMaxY ] = Y;
  822. OrgInfo[ i ][ zID ] = GangZoneCreate(OrgInfo[ i ][ zMinX ], OrgInfo[ i ][ zMinY ], X, Y);
  823. SPD(playerid, DIALOG_ZONACREATE, DIALOG_STYLE_INPUT, "Zona Kreiranje","Upisite HEX Boju zone.","U redu","Izlaz");
  824. }
  825. else if(KreiraPickup[ playerid ]) {
  826. new i = KreiraZonu[ playerid ], Float:X, Float:Y, Float:Z;
  827. GetPlayerPos(playerid, X,Y,Z);
  828. OrgInfo[ i ][ pPosX ] = X;
  829. OrgInfo[ i ][ pPosY ] = Y;
  830. OrgInfo[ i ][ pPosZ ] = Z;
  831. OrgInfo[ i ][ pID ] = CreatePickup(1254, 1, X,Y,Z, 0);
  832. new str[ 70 ];
  833. format(str, sizeof(str), "[ %s ]\n{FFFFFF}Da zauzmete, kucajte /zauzmi", OrgInfo[ i ][ orgIme ]);
  834. ZauzimanjeLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], X,Y,Z, 15.0, 0, 0);
  835. SCM(playerid, -1, "Zavrsili ste kreiranje organizacije.");
  836. OrgInfo[ i ][ orgZauzeta ] = i;
  837. SaveOrg(i);
  838. KreiraZonu[ playerid ] = 0;
  839. KreiraPickup[ playerid ] = false;
  840. }
  841. }
  842. if(newkeys == KEY_SECONDARY_ATTACK) {
  843. for(new i; i < MAX_ORGS; i++) {
  844. if(IsPlayerInRangeOfPoint(playerid, 2.0, OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ])) {
  845. SetPlayerPos(playerid, OrgInfo[ i ][ intPosX ], OrgInfo[ i ][ intPosY ], OrgInfo[ i ][ intPosZ ]);
  846. SetPlayerInterior(playerid, OrgInfo[ i ][ orgInt ]);
  847. SetPlayerVirtualWorld(playerid, OrgInfo[ i ][ orgVW ]);
  848. }
  849. else if(IsPlayerInRangeOfPoint(playerid, 2.0, OrgInfo[ i ][ intPosX ], OrgInfo[ i ][ intPosY ], OrgInfo[ i ][ intPosZ ])) {
  850. SetPlayerPos(playerid, OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ]);
  851. SetPlayerInterior(playerid, 0);
  852. SetPlayerVirtualWorld(playerid, 0);
  853. }
  854. }
  855. }
  856. if(newkeys == KEY_CROUCH) {
  857. for(new i; i < MAX_ORGGATES; i++) {
  858. if(IsPlayerInRangeOfPoint(playerid, 7.0, OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ])) {
  859. if(pClan[ playerid ] != OrgGateInfo[ i ][ ogOrgID ]) return 0;
  860. if(!OrgGateInfo[ i ][ ogOtvorena ]) {
  861. new str[ 60 ];
  862. MoveObject(OrgGateInfo[ i ][ ogID ], OrgGateInfo[ i ][ oogPosX ], OrgGateInfo[ i ][ oogPosY ], OrgGateInfo[ i ][ oogPosZ ], OrgGateInfo[ i ][ ogBrzinaZ ], OrgGateInfo[ i ][ oogRotX ], OrgGateInfo[ i ][ oogRotY ], OrgGateInfo[ i ][ oogRotZ ]);
  863. KapijaTimer[ i ] = SetTimerEx("CloseGate", OrgGateInfo[ i ][ ogVremeZ ]*1000, false, "i", i);
  864. OrgGateInfo[ i ][ ogOtvorena ] = true;
  865. format(str, sizeof(str), "Otvorili ste kapiju, zatvorice se automatski za %d sekundi.", OrgGateInfo[ i ][ ogVremeZ ]);
  866. SCM(playerid, -1, str);
  867. }
  868. else {
  869. MoveObject(OrgGateInfo[ i ][ ogID ], OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ], OrgGateInfo[ i ][ ogBrzinaZ ], OrgGateInfo[ i ][ ogRotX ], OrgGateInfo[ i ][ ogRotY ], OrgGateInfo[ i ][ ogRotZ ]);
  870. KillTimer(KapijaTimer[ i ]);
  871. OrgGateInfo[ i ][ ogOtvorena ] = false;
  872. SCM(playerid, -1, "Zatvorili ste kapiju.");
  873. }
  874. }
  875. }
  876. }
  877. return 1;
  878. }
  879. forward CloseGate(id); public CloseGate(id) {
  880.  
  881. MoveObject(OrgGateInfo[ id ][ ogID ], OrgGateInfo[ id ][ ogPosX ], OrgGateInfo[ id ][ ogPosY ], OrgGateInfo[ id ][ ogPosZ ], OrgGateInfo[ id ][ ogBrzinaZ ], OrgGateInfo[ id ][ ogRotX ], OrgGateInfo[ id ][ ogRotY ], OrgGateInfo[ id ][ ogRotZ ]);
  882. OrgGateInfo[ id ][ ogOtvorena ] = false;
  883. return 1;
  884. }
  885. forward ZauzimanjeVreme(playerid);
  886. public ZauzimanjeVreme(playerid) {
  887.  
  888. new i = Zauzima[ playerid ], str[ 70 ];
  889. GangZoneHideForAll(OrgInfo[ i ][ zID ]);
  890. GangZoneShowForAll(OrgInfo[ i ][ zID ], OrgInfo[ i ][ zBoja ]);
  891. format(str, sizeof(str), "[ %s ]\n{FFFFFF}Da zauzmete, kucajte /zauzmi", OrgInfo[ pClan[ playerid ] ][ orgIme ]);
  892. Update3DTextLabelText(ZauzimanjeLabel[ i ], OrgInfo[ i ][ orgBoja ], str);
  893. GivePlayerMoney(playerid, 50000);
  894. ClearAnimations(playerid);
  895. TogglePlayerControllable(playerid, true);
  896. SCM(playerid, -1, "Uspesno ste zauzeli zonu.");
  897. return 1;
  898. }
  899. public OnPlayerDeath(playerid) {
  900.  
  901. if(Zauzima[ playerid ] != 0) { KillTimer(ZauzimanjeTimer[ playerid ]); }
  902. if(PoliceDuty[ playerid ]) {
  903. ResetPlayerWeapons(playerid);
  904. PoliceDuty[ playerid ] = false;
  905. SetPlayerArmour(playerid, 0);
  906. SetPlayerHealth(playerid, 99);
  907. UzeoOpremu[ playerid ] = false;
  908. SetPlayerColor(playerid, 0xFFFFFF00);
  909. SetPlayerSkin(playerid, StariSkin[ playerid ]);
  910. }
  911. return 1;
  912. }
  913. forward LoadOrgGate(id, name[], value[]);
  914. public LoadOrgGate(id, name[], value[]) {
  915.  
  916. INI_Int("ORG_ID", OrgGateInfo[ id ][ ogOrgID ]);
  917. INI_Int("Object_ID", OrgGateInfo[ id ][ ogObjID ]);
  918. INI_Float("Lokacija_X", OrgGateInfo[ id ][ ogPosX ]);
  919. INI_Float("Lokacija_Y", OrgGateInfo[ id ][ ogPosY ]);
  920. INI_Float("Lokacija_Z", OrgGateInfo[ id ][ ogPosZ ]);
  921. INI_Float("Rotacija_X", OrgGateInfo[ id ][ ogRotX ]);
  922. INI_Float("Rotacija_Y", OrgGateInfo[ id ][ ogRotY ]);
  923. INI_Float("Rotacija_Z", OrgGateInfo[ id ][ ogRotZ ]);
  924. INI_Float("Otvorena_X", OrgGateInfo[ id ][ oogPosX ]);
  925. INI_Float("Orvorena_Y", OrgGateInfo[ id ][ oogPosY ]);
  926. INI_Float("Otvorena_Z", OrgGateInfo[ id ][ oogPosZ ]);
  927. INI_Float("Otvorena_RX", OrgGateInfo[ id ][ oogRotX ]);
  928. INI_Float("Otvorena_RY", OrgGateInfo[ id ][ oogRotY ]);
  929. INI_Float("Otvorena_RZ", OrgGateInfo[ id ][ oogRotZ ]);
  930. INI_Int("Vreme_Zatvaranja", OrgGateInfo[ id ][ ogVremeZ ]);
  931. INI_Int("Brzina_Zatvaranja", OrgGateInfo[ id ][ ogBrzinaZ ]);
  932. return 1;
  933. }
  934. forward LoadOrg(id, name[], value[]);
  935. public LoadOrg(id, name[], value[]) {
  936.  
  937. INI_String("Ime", OrgInfo[ id ][ orgIme ], 30);
  938. INI_String("Skracenica", OrgInfo[ id ][ orgSkracenica ], 5);
  939. INI_Bool("Banda",OrgInfo[ id ][ orgBanda ]);
  940. INI_Bool("Mafija",OrgInfo[ id ][ orgMafija ]);
  941. INI_Bool("Drzavna",OrgInfo[ id ][ orgDrzavna ]);
  942. INI_Int("Interior_ID", OrgInfo[ id ][ orgInt ]);
  943. INI_Int("Virtual_World", OrgInfo[ id ][ orgVW ]);
  944. INI_Int("Savezna_Org_ID", OrgInfo[ id ][ orgUSavezu ]);
  945. INI_Hex("Boja", OrgInfo[ id ][ orgBoja ]);
  946. INI_Hex("Boja_Zone", OrgInfo[ id ][ zBoja ]);
  947. INI_Int("Clanovi", OrgInfo[ id ][ orgClanovi ]);
  948. INI_Bool("Lider_Slot_1", OrgInfo[ id ][ orgLiderSlot1 ]);
  949. INI_Bool("Lider_Slot_2", OrgInfo[ id ][ orgLiderSlot2 ]);
  950. INI_String("Rank_1", OrgInfo[ id ][ orgRank1 ], 24);
  951. INI_String("Rank_2", OrgInfo[ id ][ orgRank2 ], 24);
  952. INI_String("Rank_3", OrgInfo[ id ][ orgRank3 ], 24);
  953. INI_String("Rank_4", OrgInfo[ id ][ orgRank4 ], 24);
  954. INI_String("Rank_5", OrgInfo[ id ][ orgRank5 ], 24);
  955. INI_Int("Skin_Rank_1", OrgInfo[ id ][ orgSkin1 ]);
  956. INI_Int("Skin_Rank_2", OrgInfo[ id ][ orgSkin2 ]);
  957. INI_Int("Skin_Rank_3", OrgInfo[ id ][ orgSkin3 ]);
  958. INI_Int("Skin_Rank_4", OrgInfo[ id ][ orgSkin4 ]);
  959. INI_Int("Skin_Rank_5", OrgInfo[ id ][ orgSkin5 ]);
  960. INI_Int("Zenski_Skin_1", OrgInfo[ id ][ orgZSkin1 ]);
  961. INI_Int("Zenski_Skin_2", OrgInfo[ id ][ orgZSkin2 ]);
  962. INI_Int("Zenski_Skin_3", OrgInfo[ id ][ orgZSkin3 ]);
  963. INI_Int("Zenski_Skin_4", OrgInfo[ id ][ orgZSkin4 ]);
  964. INI_Int("Zenski_Skin_5", OrgInfo[ id ][ orgZSkin5 ]);
  965. INI_Float("Lokacija_X", OrgInfo[ id ][ orgPosX ]);
  966. INI_Float("Lokacija_Y", OrgInfo[ id ][ orgPosY ]);
  967. INI_Float("Lokacija_Z", OrgInfo[ id ][ orgPosZ ]);
  968. INI_Float("Interior_X", OrgInfo[ id ][ intPosX ]);
  969. INI_Float("Interior_Y", OrgInfo[ id ][ intPosY ]);
  970. INI_Float("Interior_Z", OrgInfo[ id ][ intPosZ ]);
  971. INI_Float("Zona_Min_X", OrgInfo[ id ][ zMinX ]);
  972. INI_Float("Zona_Min_Y", OrgInfo[ id ][ zMinY ]);
  973. INI_Float("Zona_Max_X", OrgInfo[ id ][ zMaxX ]);
  974. INI_Float("Zona_Max_Y", OrgInfo[ id ][ zMaxY ]);
  975. INI_Float("Zauzimanje_X", OrgInfo[ id ][ pPosX ]);
  976. INI_Float("Zauzimanje_Y", OrgInfo[ id ][ pPosY ]);
  977. INI_Float("Zauzimanje_Z", OrgInfo[ id ][ pPosZ ]);
  978. INI_Int("ORG_Zauzeta", OrgInfo[ id ][ orgZauzeta ]);
  979. INI_Float("Sef_X", OrgInfo[ id ][ orgSefX ]);
  980. INI_Float("Sef_Y", OrgInfo[ id ][ orgSefY ]);
  981. INI_Float("Sef_Z", OrgInfo[ id ][ orgSefZ ]);
  982. INI_Float("Sef_RX", OrgInfo[ id ][ orgSefRX ]);
  983. INI_Float("Sef_RY", OrgInfo[ id ][ orgSefRY ]);
  984. INI_Float("Sef_RZ", OrgInfo[ id ][ orgSefRZ ]);
  985. INI_Int("Sef_ObjID", OrgInfo[ id ][ orgSefObjID ]);
  986. INI_Int("Kolicina_Novca", OrgInfo[ id ][ orgSefNovac ]);
  987. INI_Int("Kolicina_Materijala", OrgInfo[ id ][ orgSefMats ]);
  988. INI_Int("Kolicina_Droge", OrgInfo[ id ][ orgSefDroga ]);
  989. INI_Float("PDDuty_X", OrgInfo[ id ][ orgPDDutyX ]);
  990. INI_Float("PDDuty_Y", OrgInfo[ id ][ orgPDDutyY ]);
  991. INI_Float("PDDuty_Z", OrgInfo[ id ][ orgPDDutyZ ]);
  992. INI_Float("Gun_X", OrgInfo[ id ][ orgGunX ]);
  993. INI_Float("Gun_Y", OrgInfo[ id ][ orgGunY ]);
  994. INI_Float("Gun_Z", OrgInfo[ id ][ orgGunZ ]);
  995. INI_Float("Hapsenje_X", OrgInfo[ id ][ orgHapsenjeX ]);
  996. INI_Float("Hapsenje_Y", OrgInfo[ id ][ orgHapsenjeY ]);
  997. INI_Float("Hapsenje_Z", OrgInfo[ id ][ orgHapsenjeZ ]);
  998. INI_String("Lider_1", OrgInfo[ id ][ orgLider1 ], 24);
  999. INI_String("Lider_2", OrgInfo[ id ][ orgLider2 ], 24);
  1000. INI_String("Clan_1", OrgInfo[ id ][ orgClan1 ], 24);
  1001. INI_String("Clan_2", OrgInfo[ id ][ orgClan2 ], 24);
  1002. INI_String("Clan_3", OrgInfo[ id ][ orgClan3 ], 24);
  1003. INI_String("Clan_4", OrgInfo[ id ][ orgClan4 ], 24);
  1004. INI_String("Clan_5", OrgInfo[ id ][ orgClan5 ], 24);
  1005. INI_String("Clan_6", OrgInfo[ id ][ orgClan6 ], 24);
  1006. INI_String("Clan_7", OrgInfo[ id ][ orgClan7 ], 24);
  1007. INI_String("Clan_8", OrgInfo[ id ][ orgClan8 ], 24);
  1008. INI_String("Clan_9", OrgInfo[ id ][ orgClan9 ], 24);
  1009. INI_String("Clan_10", OrgInfo[ id ][ orgClan10 ], 24);
  1010. INI_String("Clan_11", OrgInfo[ id ][ orgClan11 ], 24);
  1011. INI_String("Clan_12", OrgInfo[ id ][ orgClan12 ], 24);
  1012. INI_String("Clan_13", OrgInfo[ id ][ orgClan13 ], 24);
  1013. INI_String("Clan_14", OrgInfo[ id ][ orgClan14 ], 24);
  1014. INI_String("Clan_15", OrgInfo[ id ][ orgClan15 ], 24);
  1015. INI_String("Clan_16", OrgInfo[ id ][ orgClan16 ], 24);
  1016. INI_String("Clan_17", OrgInfo[ id ][ orgClan17 ], 24);
  1017. INI_String("Clan_18", OrgInfo[ id ][ orgClan18 ], 24);
  1018. INI_String("Clan_19", OrgInfo[ id ][ orgClan19 ], 24);
  1019. INI_String("Clan_20", OrgInfo[ id ][ orgClan20 ], 24);
  1020. INI_String("Clan_21", OrgInfo[ id ][ orgClan21 ], 24);
  1021. INI_String("Clan_22", OrgInfo[ id ][ orgClan22 ], 24);
  1022. INI_String("Clan_23", OrgInfo[ id ][ orgClan23 ], 24);
  1023. INI_String("Clan_24", OrgInfo[ id ][ orgClan24 ], 24);
  1024. INI_String("Clan_25", OrgInfo[ id ][ orgClan25 ], 24);
  1025. INI_String("Clan_26", OrgInfo[ id ][ orgClan26 ], 24);
  1026. INI_String("Clan_27", OrgInfo[ id ][ orgClan27 ], 24);
  1027. INI_String("Clan_28", OrgInfo[ id ][ orgClan28 ], 24);
  1028. INI_String("Clan_29", OrgInfo[ id ][ orgClan29 ], 24);
  1029. INI_String("Clan_30", OrgInfo[ id ][ orgClan30 ], 24);
  1030. return 1;
  1031. }
  1032. forward LoadOrgVeh(id, name[], value[]);
  1033. public LoadOrgVeh(id, name[], value[]) {
  1034.  
  1035. INI_Int("Organizacija_ID", OrgVehInfo[ id ][ ovOrgID ]);
  1036. INI_Int("Model", OrgVehInfo[ id ][ ovModel ]);
  1037. INI_Float("Lokacija_X", OrgVehInfo[ id ][ ovPosX ]);
  1038. INI_Float("Lokacija_Y", OrgVehInfo[ id ][ ovPosY ]);
  1039. INI_Float("Lokacija_Z", OrgVehInfo[ id ][ ovPosZ ]);
  1040. INI_Float("Rotacija_A", OrgVehInfo[ id ][ ovRotA ]);
  1041. INI_Int("Boja_1", OrgVehInfo[ id ][ ovBoja1 ]);
  1042. INI_Int("Boja_2", OrgVehInfo[ id ][ ovBoja2 ]);
  1043. return 1;
  1044. }
  1045. public OnFilterScriptInit() {
  1046.  
  1047. for(new i; i < MAX_ORGS; i++) {
  1048. new jFile[ 50 ], str[ 256 ];
  1049. format(jFile, sizeof(jFile), ORG_FILE, i);
  1050. if(fexist(jFile)) {
  1051. INI_ParseFile(jFile, "LoadOrg", .bExtra = true, .extra = i);
  1052. OrgInfo[ i ][ oID ] = CreatePickup(1314, 1, OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ], 0);
  1053. format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"%s\n"col_white"Lider 2: "col_srvboja"%s\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ i ][ orgIme ],i,OrgInfo[ i ][ orgClanovi ],OrgInfo[ i ][ orgLider1 ],OrgInfo[ i ][ orgLider2 ] );
  1054. OrgLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ], 15.0, 0,0);
  1055. OrgInfo[ i ][ pID ] = CreatePickup(1254, 1, OrgInfo[ i ][ pPosX ], OrgInfo[ i ][ pPosY ], OrgInfo[ i ][ pPosZ ], 0);
  1056. format(str, sizeof(str), "[ %s ]\n{FFFFFF}Da zauzmete, kucajte /zauzmi", OrgInfo[ i ][ orgIme ]);
  1057. ZauzimanjeLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], OrgInfo[ i ][ pPosX ], OrgInfo[ i ][ pPosY ], OrgInfo[ i ][ pPosZ ], 15.0, 0, 0);
  1058. OrgInfo[ i ][ zID ] = GangZoneCreate(OrgInfo[ i ][ zMinX ], OrgInfo[ i ][ zMinY ], OrgInfo[ i ][ zMaxX ], OrgInfo[ i ][ zMaxY ]);
  1059. OrgInfo[ i ][ orgSefID ] = CreateObject(OrgInfo[ i ][ orgSefObjID ], OrgInfo[ i ][ orgSefX ], OrgInfo[ i ][ orgSefY ], OrgInfo[ i ][ orgSefZ ], OrgInfo[ i ][ orgSefRX ], OrgInfo[ i ][ orgSefRY ], OrgInfo[ i ][ orgSefRZ ]);
  1060. OrgInfo[ i ][ orgSefLabel ] = Create3DTextLabel("~ {FFFFFF}/org {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgSefX ], OrgInfo[ i ][ orgSefY ], OrgInfo[ i ][ orgSefZ ], 10.0, 0, 0);
  1061. if(OrgInfo[ i ][ orgDrzavna ]) {
  1062. OrgInfo[ i ][ orgPDDutyPickup ] = CreatePickup(1247, 1, OrgInfo[ i ][ orgPDDutyX ], OrgInfo[ i ][ orgPDDutyY ], OrgInfo[ i ][ orgPDDutyZ ], 0);
  1063. OrgInfo[ i ][ orgPDDutyLabel ] = Create3DTextLabel("~ {FFFFFF}/duty {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgPDDutyX ], OrgInfo[ i ][ orgPDDutyY ], OrgInfo[ i ][ orgPDDutyZ ], 10.0, 0, 0);
  1064. OrgInfo[ i ][ orgGunPickup ] = CreatePickup(1239, 1, OrgInfo[ i ][ orgGunX ], OrgInfo[ i ][ orgGunY ], OrgInfo[ i ][ orgGunZ ], 0);
  1065. OrgInfo[ i ][ orgGunLabel ] = Create3DTextLabel("~ {FFFFFF}/gun {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgGunX ], OrgInfo[ i ][ orgGunY ], OrgInfo[ i ][ orgGunZ ], 10.0, 0, 0);
  1066. OrgInfo[ i ][ orgHapsenjePickup ] = CreatePickup(1239, 1, OrgInfo[ i ][ orgHapsenjeX ], OrgInfo[ i ][ orgHapsenjeY ], OrgInfo[ i ][ orgHapsenjeZ ], 0);
  1067. OrgInfo[ i ][ orgHapsenjeLabel ] = Create3DTextLabel("~ {FFFFFF}/arrest {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgHapsenjeX ], OrgInfo[ i ][ orgHapsenjeY ], OrgInfo[ i ][ orgHapsenjeZ ], 10.0, 0, 0);
  1068. }
  1069. }
  1070. }
  1071. for(new i; i < MAX_ORGVEHS; i++) {
  1072. new jFile[ 50 ], str[ 35 ];
  1073. format(jFile, sizeof(jFile), ORGVEH_FILE, i);
  1074. if(fexist(jFile)) {
  1075. INI_ParseFile(jFile, "LoadOrgVeh", .bExtra = true, .extra = i);
  1076. OrgVehInfo[ i ][ ovID ] = CreateVehicle(OrgVehInfo[ i ][ ovModel ], OrgVehInfo[ i ][ ovPosX ], OrgVehInfo[ i ][ ovPosY ], OrgVehInfo[ i ][ ovPosZ ], OrgVehInfo[ i ][ ovRotA ], OrgVehInfo[ i ][ ovBoja1 ], OrgVehInfo[ i ][ ovBoja2 ], -1);
  1077. format(str, sizeof(str), "[ %s ]", OrgInfo[ OrgVehInfo[ i ][ ovOrgID ] ][ orgIme ]);
  1078. OrgVehLabel[ i ] = Create3DTextLabel(str, OrgInfo[ OrgVehInfo[ i ][ ovOrgID ] ][ orgBoja ], OrgVehInfo[ i ][ ovPosX ], OrgVehInfo[ i ][ ovPosY ], OrgVehInfo[ i ][ ovPosZ ], 15.0, 0, 0);
  1079. Attach3DTextLabelToVehicle(OrgVehLabel[ i ], OrgVehInfo[ i ][ ovID ], 0.0, 0.0, 0.0);
  1080. TipVozila[ i ] = 1;
  1081. }
  1082. }
  1083. for(new i; i < MAX_ORGGATES; i++) {
  1084. new ogFile[ 60 ];
  1085. format(ogFile, sizeof(ogFile), ORGGATES_FILE, i);
  1086. if(fexist(ogFile)) {
  1087. INI_ParseFile(ogFile, "LoadOrgGate", .bExtra = true, .extra = i);
  1088. OrgGateInfo[ i ][ ogID ] = CreateObject(OrgGateInfo[ i ][ ogObjID ], OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ], OrgGateInfo[ i ][ ogRotX ], OrgGateInfo[ i ][ ogRotY ], OrgGateInfo[ i ][ ogRotZ ]);
  1089. }
  1090. }
  1091. return 1;
  1092. }
  1093. public OnPlayerSpawn(playerid) {
  1094.  
  1095. for(new i; i < MAX_ORGS; i++) { GangZoneShowForPlayer(playerid, OrgInfo[ i ][ zID ], OrgInfo[ i ][ zBoja ]); }
  1096. pUlogovan[ playerid ] = true;
  1097. PoslaoSavez[ playerid ] = -1;
  1098. return 1;
  1099. }
  1100. forward TimerZatvor(playerid);
  1101. public TimerZatvor(playerid) {
  1102.  
  1103. pZatvorVreme[ playerid ] -= 1000;
  1104. new str[ 50 ];
  1105. format(str, sizeof(str), "~w~Preostalo ~b~%d ~w~sekundi.", pZatvorVreme[ playerid ]/1000);
  1106. GameTextForPlayer(playerid, str, 1000, 3);
  1107. if(pZatvorVreme[ playerid ] == 0) {
  1108. GameTextForPlayer(playerid, "~g~Pusteni ste iz zatvora.", 5000, 3);
  1109. KillTimer(ZatvorTimer[ playerid ]);
  1110. // SetPlayerPos(playerid, X,Y,Z); // MESTO GDE DA SE SPAWNA
  1111. }
  1112. return 1;
  1113. }
  1114. public OnPlayerStateChange(playerid, newstate, oldstate) {
  1115.  
  1116. if(newstate == PLAYER_STATE_DRIVER) { if(TipVozila[ GetPlayerVehicleID(playerid) ] == 1) { if(pClan[ playerid ] != OrgVehInfo[ GetPlayerVehicleID(playerid) ][ ovOrgID ] && pLider[ playerid ] != OrgVehInfo[ GetPlayerVehicleID(playerid) ][ ovOrgID ]) { RemovePlayerFromVehicle(playerid); SCM(playerid, -1, "Ne mozete voziti to vozilo."); } } }
  1117. return 1;
  1118. }
  1119. public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ) {
  1120.  
  1121. if(response == EDIT_RESPONSE_FINAL && KreiraKapiju[ playerid ] != 0) {
  1122. new i = KreiraKapiju[ playerid ];
  1123. if(!KreiraZatvorenu[ playerid ]) {
  1124. OrgGateInfo[ i ][ ogPosX ] = fX;
  1125. OrgGateInfo[ i ][ ogPosY ] = fY;
  1126. OrgGateInfo[ i ][ ogPosZ ] = fZ;
  1127. OrgGateInfo[ i ][ ogRotX ] = fRotX;
  1128. OrgGateInfo[ i ][ ogRotY ] = fRotY;
  1129. OrgGateInfo[ i ][ ogRotZ ] = fRotZ;
  1130. DestroyObject(OrgGateInfo[ i ][ ogID ]);
  1131. OrgGateInfo[ i ][ ogID ] = CreateObject(OrgGateInfo[ i ][ ogObjID ], fX, fY, fZ, fRotX, fRotY, fRotZ);
  1132. EditObject(playerid, OrgGateInfo[ i ][ ogID ]);
  1133. SCM(playerid, -1, "Sada sacuvajte pozicije otvorene kapije.");
  1134. KreiraZatvorenu[ playerid ] = true;
  1135. }
  1136. else {
  1137. OrgGateInfo[ i ][ oogPosX ] = fX;
  1138. OrgGateInfo[ i ][ oogPosY ] = fY;
  1139. OrgGateInfo[ i ][ oogPosZ ] = fZ;
  1140. OrgGateInfo[ i ][ oogRotX ] = fRotX;
  1141. OrgGateInfo[ i ][ oogRotY ] = fRotY;
  1142. OrgGateInfo[ i ][ oogRotZ ] = fRotZ;
  1143. DestroyObject(OrgGateInfo[ i ][ ogID ]);
  1144. OrgGateInfo[ i ][ ogID ] = CreateObject(OrgGateInfo[ i ][ ogObjID ], OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ], OrgGateInfo[ i ][ ogRotX ], OrgGateInfo[ i ][ ogRotY ], OrgGateInfo[ i ][ ogRotZ ]);
  1145. SaveOrgGate(i);
  1146. KreiraZatvorenu[ playerid ] = false;
  1147. KreiraKapiju[ playerid ] = 0;
  1148. SCM(playerid, -1, "Uspesno ste zavrsili kreiranje kapije.");
  1149. }
  1150. }
  1151. if(response == EDIT_RESPONSE_FINAL && KreiraSef[ playerid ] != 0) {
  1152. new i = KreiraSef[ playerid ];
  1153. OrgInfo[ i ][ orgSefX ] = fX;
  1154. OrgInfo[ i ][ orgSefY ] = fY;
  1155. OrgInfo[ i ][ orgSefZ ] = fZ;
  1156. OrgInfo[ i ][ orgSefRX ] = fRotX;
  1157. OrgInfo[ i ][ orgSefRY ] = fRotY;
  1158. OrgInfo[ i ][ orgSefRZ ] = fRotZ;
  1159. DestroyObject(OrgInfo[ i ][ orgSefID ]);
  1160. OrgInfo[ i ][ orgSefID ] = CreateObject(OrgInfo[ i ][ orgSefObjID ], fX, fY, fZ, fRotX, fRotY, fRotZ);
  1161. OrgInfo[ i ][ orgSefLabel ] = Create3DTextLabel("~ {FFFFFF}/org {0057AE}~", 0x0057AEFF, fX, fY, fZ, 10.0, 0, 0);
  1162. SaveOrg(i);
  1163. KreiraSef[ playerid ] = 0;
  1164. }
  1165. return 1;
  1166. }
  1167.  
  1168. // Komande //
  1169.  
  1170. YCMD:kreirajkapiju(playerid, params[], help) {
  1171.  
  1172. new oid, objid, otime, ospeed, Float:X, Float:Y, Float:Z, i = NextKapijaID(MAX_ORGGATES);
  1173. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
  1174. if(sscanf(params, "dddd", oid, objid, otime, ospeed)) return SCM(playerid, -1, "/kreirajkapiju [ORG ID] [Object ID] [Vreme zatvaranja] [Brzina zatvaranja]");
  1175. new oFile[ 60 ];
  1176. format(oFile, sizeof(oFile), ORG_FILE, oid);
  1177. if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1178. if(otime < 1 || otime > 20) return SCM(playerid, -1, "Vreme zatvaranja kapije ne moze biti manje od 1 ili vece od 20.");
  1179. if(ospeed < 1 || ospeed > 10) return SCM(playerid, -1, "Brzina zatvaranja kapije ne moze biti manje od 1 ili vece od 10.");
  1180. GetPlayerPos(playerid, X,Y,Z);
  1181. OrgGateInfo[ i ][ ogID ] = CreateObject(objid, X, Y, Z, 0.0, 0.0, 0.0);
  1182. EditObject(playerid, OrgGateInfo[ i ][ ogID ]);
  1183. OrgGateInfo[ i ][ ogObjID ] = objid;
  1184. OrgGateInfo[ i ][ ogOrgID ] = oid;
  1185. OrgGateInfo[ i ][ ogVremeZ ] = otime;
  1186. OrgGateInfo[ i ][ ogBrzinaZ ] = ospeed;
  1187. KreiraKapiju[ playerid ] = i;
  1188. return 1;
  1189. }
  1190. YCMD:izbrisikapiju(playerid, params[], help) {
  1191.  
  1192. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON admin.");
  1193. new i = GetNearestOrgGate(playerid), gateFile[ 60 ];
  1194. if(i == -1) return SendClientMessage(playerid, -1, "Niste u blizini kapije.");
  1195. DestroyObject(OrgGateInfo[ i ][ ogID ]);
  1196. OrgGateInfo[ i ][ ogPosX ] = 0.0;
  1197. OrgGateInfo[ i ][ ogPosY ] = 0.0;
  1198. OrgGateInfo[ i ][ ogPosZ ] = 0.0;
  1199. OrgGateInfo[ i ][ ogRotX ] = 0.0;
  1200. OrgGateInfo[ i ][ ogRotY ] = 0.0;
  1201. OrgGateInfo[ i ][ ogRotZ ] = 0.0;
  1202. format(gateFile, sizeof(gateFile), ORGGATES_FILE, i);
  1203. if(fexist(gateFile)) { fremove(gateFile); }
  1204. return 1;
  1205. }
  1206. YCMD:kreirajzonu(playerid, params[], help) {
  1207.  
  1208. #pragma unused help
  1209.  
  1210. new i, Float:X, Float:Y, Float:Z;
  1211. if(sscanf(params, "d", i)) return SendClientMessage(playerid, -1, "/kreirajzonu [Org ID]");
  1212. new oFile[ 60 ];
  1213. format(oFile, sizeof(oFile), ORG_FILE, i);
  1214. if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1215. GetPlayerPos(playerid, X,Y,Z);
  1216. OrgInfo[ i ][ zMinX ] = X;
  1217. OrgInfo[ i ][ zMinY ] = Y;
  1218. KreiraZonu[ playerid ] = i;
  1219. SCM(playerid, -1, "Idite do drugog kraja zone i pritisnite dugme Y.");
  1220. return 1;
  1221. }
  1222. YCMD:makeleader(playerid, params[], help) {
  1223.  
  1224. #pragma unused help
  1225.  
  1226. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
  1227. new id, oid, str[ 256 ], pname[ MAX_PLAYER_NAME ], pname1[ MAX_PLAYER_NAME ], oFile[ 60 ];
  1228. if(sscanf(params, "ud", id, oid)) return SCM(playerid, -1, "/makeleader [ID] [ORG ID]");
  1229. format(oFile, sizeof(oFile), ORG_FILE, oid);
  1230. if(!fexist(oFile) && oid != 0) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1231. GetPlayerName(playerid, pname, sizeof(pname));
  1232. GetPlayerName(id, pname1, sizeof(pname1));
  1233. if(oid == 0) {
  1234. format(str, sizeof(str), "Admin %s Vam je skinuo lidera.", pname);
  1235. SCM(id, -1, str);
  1236. format(str, sizeof(str), "Skinuli ste igracu %s lidera.", pname1);
  1237. SCM(playerid, -1, str);
  1238. SetPlayerSkin(id, 1);
  1239. if( strcmp( ImeIgraca(id), OrgInfo[ pLider[ playerid ] ][ orgLider1 ], true ) == 0) { strmid( OrgInfo[ pLider[ playerid ] ][ orgLider1 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME); OrgInfo[ pLider[ playerid ] ][ orgLiderSlot1 ] = false; }
  1240. if( strcmp( ImeIgraca(id), OrgInfo[ pLider[ playerid ] ][ orgLider2 ], true ) == 0) { strmid( OrgInfo[ pLider[ playerid ] ][ orgLider2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); OrgInfo[ pLider[ playerid ] ][ orgLiderSlot2 ] = false; }
  1241. format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"%s\n"col_white"Lider 2: "col_srvboja"%s\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ pLider[ playerid ] ][ orgIme ],pLider[ playerid ],OrgInfo[ pLider[ playerid ] ][ orgClanovi ],OrgInfo[ pLider[ playerid ] ][ orgLider1 ],OrgInfo[ pLider[ playerid ] ][ orgLider2 ] );
  1242. Update3DTextLabelText(OrgLabel[ pLider[ playerid ] ], OrgInfo[ pLider[ playerid ] ][ orgBoja ], str);
  1243. SaveOrg(pLider[ id ]);
  1244. pClan[ id ] = 0;
  1245. pLider[ id ] = 0;
  1246. }
  1247. else {
  1248. if( !strcmp( OrgInfo[ oid ][ orgLider1 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider1 ], ImeIgraca( id ), 0, strlen( ImeIgraca( id ) ), MAX_PLAYER_NAME ); }
  1249. else if( !strcmp( OrgInfo[ oid ][ orgLider2 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider2 ], ImeIgraca( id ), 0, strlen( ImeIgraca( id ) ), MAX_PLAYER_NAME ); }
  1250. else return SendClientMessage( playerid, -1, "Ova organizacija vec ima 2 lidera." );
  1251. if(pLider[ id ] != 0) return SCM(playerid, -1, "Taj igrac je vec lider.");
  1252. format(str, sizeof(str), "Admin %s Vam dao lidera organizacije %s.", pname, OrgInfo[ oid ][ orgIme ]);
  1253. SCM(id, -1, str);
  1254. format(str, sizeof(str), "Dali ste lidera igracu %s.", pname1);
  1255. SCM(playerid, -1, str);
  1256. pLider[ id ] = oid;
  1257. if(!OrgInfo[ oid ][ orgLiderSlot1 ]) { if( !strcmp( OrgInfo[ oid ][ orgLider1 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider1 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); OrgInfo[ oid ][ orgLiderSlot1 ] = true; } }
  1258. else if(OrgInfo[ oid ][ orgLiderSlot1 ] && !OrgInfo[ oid ][ orgLiderSlot2 ]) { if( !strcmp( OrgInfo[ oid ][ orgLider2 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider2 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); OrgInfo[ oid ][ orgLiderSlot2 ] = true; } }
  1259. format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"%s\n"col_white"Lider 2: "col_srvboja"%s\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ oid ][ orgIme ],oid,OrgInfo[ oid ][ orgClanovi ],OrgInfo[ oid ][ orgLider1 ],OrgInfo[ oid ][ orgLider2 ] );
  1260. Update3DTextLabelText(OrgLabel[ oid ], OrgInfo[ oid ][ orgBoja ], str);
  1261. if(!OrgInfo[ oid ][ orgDrzavna ]) { if(!pZensko[ playerid ]) { SetPlayerSkin(playerid, OrgInfo[ oid ][ orgSkin5 ]); } else { SetPlayerSkin(playerid, OrgInfo[ oid ][ orgZSkin5 ]); } }
  1262. SaveOrg(oid);
  1263. pRank[ id ] = 5;
  1264. pClan[ id ] = oid;
  1265. }
  1266. return 1;
  1267. }
  1268. YCMD:lider(playerid, params[], help) {
  1269.  
  1270. #pragma unused help
  1271. #pragma unused params
  1272.  
  1273. if(pLider[ playerid ] == 0) return SendClientMessage(playerid, -1, "Niste lider.");
  1274. ShowPlayerDialog(playerid, DIALOG_LIDERCMD, DIALOG_STYLE_LIST, "LIDER","Ubaci\nIzbaci\nIzbaci offline clana\nDodeli rank clanu\nInformacije o sefu\nUzmi iz sefa\nPokreni war","Izaberi","Odustani");
  1275. return 1;
  1276. }
  1277. YCMD:f(playerid, params[], help) {
  1278.  
  1279. #pragma unused help
  1280.  
  1281. if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
  1282. new text[ 80 ], str[ 130 ], pname[ MAX_PLAYER_NAME ];
  1283. GetPlayerName(playerid, pname, sizeof(pname));
  1284. if(sscanf(params, "s[80]", text)) return SCM(playerid, -1, "/f [Text]");
  1285. for(new i; i < MAX_PLAYERS; i++) {
  1286. if(pRank[ playerid ] == 1) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank1 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
  1287. else if(pRank[ playerid ] == 2) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank2 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
  1288. else if(pRank[ playerid ] == 3) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank3 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
  1289. else if(pRank[ playerid ] == 4) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank4 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
  1290. else if(pRank[ playerid ] == 5) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank5 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
  1291. }
  1292. return 1;
  1293. }
  1294. YCMD:sf(playerid, params[], help) {
  1295.  
  1296. new oid = pClan[ playerid ], si = OrgInfo[ pClan[ playerid ] ][ orgUSavezu ];
  1297. if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
  1298. if(OrgInfo[ oid ][ orgUSavezu ] == 0) return SCM(playerid, -1, "Vasa organizacija nema saveznika.");
  1299. new text[ 80 ], str[ 130 ], pname[ MAX_PLAYER_NAME ];
  1300. GetPlayerName(playerid, pname, sizeof(pname));
  1301. if(sscanf(params, "s[80]", text)) return SCM(playerid, -1, "/sf [Text]");
  1302. for(new i; i < MAX_PLAYERS; i++) {
  1303. if(pRank[ playerid ] == 1) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank1 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
  1304. else if(pRank[ playerid ] == 2) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank2 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
  1305. else if(pRank[ playerid ] == 3) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank3 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
  1306. else if(pRank[ playerid ] == 4) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank4 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
  1307. else if(pRank[ playerid ] == 5) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank5 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
  1308. }
  1309. return 1;
  1310. }
  1311. YCMD:org(playerid, params[], help) {
  1312.  
  1313. #pragma unused help
  1314. #pragma unused params
  1315.  
  1316. if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
  1317. ShowPlayerDialog(playerid, DIALOG_ORGCMD, DIALOG_STYLE_LIST, "ORGANIZACIJA","Lociraj organizaciju\nLociraj hangar\nClanovi organizacije\nOstavi u sef","Izaberi","Odustani");
  1318. return 1;
  1319. }
  1320. YCMD:duty(playerid, params[], help) {
  1321.  
  1322. if(pClan[ playerid ] == 0 || !OrgInfo[ pClan[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Niste policajac.");
  1323. if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ pClan[ playerid ] ][ orgPDDutyX ], OrgInfo[ pClan[ playerid ] ][ orgPDDutyY ], OrgInfo[ pClan[ playerid ] ][ orgPDDutyZ ])) return SCM(playerid, -1, "Niste kod ormarica za uzimanje duznosti.");
  1324. if(!PoliceDuty[ playerid ]) {
  1325. if(pRank[ playerid ] == 0) return SCM(playerid, -1, "Suspendovani ste.");
  1326. StariSkin[ playerid ] = GetPlayerSkin(playerid);
  1327. SetPlayerColor(playerid, 0x2641FE00);
  1328. PoliceDuty[ playerid ] = true;
  1329. GivePlayerWeapon(playerid, 3, 500);
  1330. GivePlayerWeapon(playerid, 24, 100);
  1331. SetPlayerArmour(playerid, 100);
  1332. SetPlayerHealth(playerid, 99);
  1333. if(pRank[ playerid ] == 1) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin1 ]); }
  1334. else if(pRank[ playerid ] == 2) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin2 ]); }
  1335. else if(pRank[ playerid ] == 3) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin3 ]); }
  1336. else if(pRank[ playerid ] == 4) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin4 ]); }
  1337. else if(pRank[ playerid ] == 5) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin5 ]); }
  1338. for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(pClan[ i ] == pClan[ playerid ]) { new str[ 60 ]; format(str, sizeof(str), "%s se prijavljuje na duznost.", ImeIgraca(playerid)); } } }
  1339. // Stavi onu radius poruku da je uzeo duznost i to
  1340. }
  1341. else {
  1342. ResetPlayerWeapons(playerid);
  1343. PoliceDuty[ playerid ] = false;
  1344. SetPlayerArmour(playerid, 0);
  1345. SetPlayerHealth(playerid, 99);
  1346. for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(pClan[ i ] == pClan[ playerid ] || pClan[ i ] == pLider[ playerid ] || pLider[ i ] == pClan[ playerid ] || pLider[ i ] == pLider[ playerid ]) { new str[ 60 ]; format(str, sizeof(str), "%s se odjavljuje sa duznosti.", ImeIgraca(playerid)); } } }
  1347. SetPlayerColor(playerid, 0xFFFFFF00);
  1348. SetPlayerSkin(playerid, StariSkin[ playerid ]);
  1349. }
  1350. return 1;
  1351. }
  1352. YCMD:kreirajorg(playerid, params[], help) {
  1353.  
  1354. #pragma unused help
  1355. #pragma unused params
  1356.  
  1357. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
  1358. SPD(playerid, DIALOG_ORGCREATE, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime organizacije.\nMax 30 slova.","Dalje","Izlaz");
  1359. return 1;
  1360. }
  1361. YCMD:kreirajsef(playerid, params[], help) {
  1362.  
  1363. new oid, objid, Float:X, Float:Y, Float:Z;
  1364. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
  1365. if(sscanf(params, "dd", oid, objid)) return SCM(playerid, -1, "/kreirajsef [ORG ID] [Object ID]");
  1366. new oFile[ 60 ];
  1367. format(oFile, sizeof(oFile), ORG_FILE, oid);
  1368. if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1369. GetPlayerPos(playerid, X,Y,Z);
  1370. OrgInfo[ oid ][ orgSefID ] = CreateObject(objid, X,Y,Z, 0.0, 0.0, 0.0);
  1371. EditObject(playerid, OrgInfo[ oid ][ orgSefID ]);
  1372. OrgInfo[ oid ][ orgSefObjID ] = objid;
  1373. KreiraSef[ playerid ] = oid;
  1374. SCM(playerid, -1, "Sacuvajte pozicije sefa.");
  1375. return 1;
  1376. }
  1377. YCMD:kreirajpdduty(playerid, params[], help) {
  1378.  
  1379. new oid, Float:X, Float:Y, Float:Z;
  1380. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
  1381. if(sscanf(params, "d", oid)) return SCM(playerid, -1, "/kreirajpdduty [ORG ID]");
  1382. new oFile[ 60 ];
  1383. format(oFile, sizeof(oFile), ORG_FILE, oid);
  1384. if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1385. GetPlayerPos(playerid, X,Y,Z);
  1386. OrgInfo[ oid ][ orgPDDutyPickup ] = CreatePickup(1247, 1, X, Y, Z, 0);
  1387. OrgInfo[ oid ][ orgPDDutyLabel ] = Create3DTextLabel("~ {FFFFFF}/duty {0057AE}~", 0x0057AEFF, X, Y, Z, 10.0, 0, 0);
  1388. OrgInfo[ oid ][ orgPDDutyX ] = X;
  1389. OrgInfo[ oid ][ orgPDDutyY ] = Y;
  1390. OrgInfo[ oid ][ orgPDDutyZ ] = Z;
  1391. SaveOrg(oid);
  1392. return 1;
  1393. }
  1394. YCMD:kreirajpdopremu(playerid, params[], help) {
  1395.  
  1396. new oid, Float:X, Float:Y, Float:Z;
  1397. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
  1398. if(sscanf(params, "d", oid)) return SCM(playerid, -1, "/kreirajpdopremu [ORG ID]");
  1399. new oFile[ 60 ];
  1400. format(oFile, sizeof(oFile), ORG_FILE, oid);
  1401. if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1402. GetPlayerPos(playerid, X,Y,Z);
  1403. OrgInfo[ oid ][ orgGunPickup ] = CreatePickup(1239, 1, X, Y, Z, 0);
  1404. OrgInfo[ oid ][ orgGunLabel ] = Create3DTextLabel("~ {FFFFFF}/uzmiopremu {0057AE}~", 0x0057AEFF, X, Y, Z, 10.0, 0, 0);
  1405. OrgInfo[ oid ][ orgGunX ] = X;
  1406. OrgInfo[ oid ][ orgGunY ] = Y;
  1407. OrgInfo[ oid ][ orgGunZ ] = Z;
  1408. SaveOrg(oid);
  1409. return 1;
  1410. }
  1411. YCMD:uzmiopremu(playerid, params[], help) {
  1412.  
  1413. new i = pClan[ playerid ];
  1414. if(i == 0 || !OrgInfo[ i ][ orgDrzavna ]) return SCM(playerid, -1, "Niste policajac.");
  1415. if(!PoliceDuty[ playerid ] && pRank[ playerid ] != 0) return SCM(playerid, -1, "Niste na duznosti.");
  1416. if(UzeoOpremu[ playerid ]) return SCM(playerid, -1, "Vec ste uzeli opremu.");
  1417. if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ orgGunX ], OrgInfo[ i ][ orgGunY ], OrgInfo[ i ][ orgGunZ ])) return SCM(playerid, -1, "Niste kod ormarica za uzimanje opreme.");
  1418. if(pRank[ playerid ] == 0) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Suspend (Pendrek)","U redu","Izlaz"); }
  1419. if(pRank[ playerid ] == 1) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet","U redu","Izlaz"); }
  1420. if(pRank[ playerid ] == 2) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac","U redu","Izlaz"); }
  1421. if(pRank[ playerid ] == 3) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac\nInspektor","U redu","Izlaz"); }
  1422. if(pRank[ playerid ] == 4) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac\nInspektor\nDirektor","U redu","Izlaz"); }
  1423. if(pRank[ playerid ] == 5) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac\nInspektor\nDirektor\nNacelnik","U redu","Izlaz"); }
  1424. return 1;
  1425. }
  1426. YCMD:kreirajhapsenje(playerid, params[], help) {
  1427.  
  1428. new oid, Float:X, Float:Y, Float:Z;
  1429. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
  1430. if(sscanf(params, "d", oid)) return SCM(playerid, -1, "/kreirajhapsenje [ORG ID]");
  1431. new oFile[ 60 ];
  1432. format(oFile, sizeof(oFile), ORG_FILE, oid);
  1433. if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1434. GetPlayerPos(playerid, X,Y,Z);
  1435. OrgInfo[ oid ][ orgHapsenjePickup ] = CreatePickup(1239, 1, X, Y, Z, 0);
  1436. OrgInfo[ oid ][ orgHapsenjeLabel ] = Create3DTextLabel("~ {FFFFFF}/arrest {0057AE}~", 0x0057AEFF, X, Y, Z, 10.0, 0, 0);
  1437. OrgInfo[ oid ][ orgHapsenjeX ] = X;
  1438. OrgInfo[ oid ][ orgHapsenjeY ] = Y;
  1439. OrgInfo[ oid ][ orgHapsenjeZ ] = Z;
  1440. SaveOrg(oid);
  1441. return 1;
  1442. }
  1443. YCMD:arrest(playerid, params[], help) {
  1444.  
  1445. new i = pClan[ playerid ], id, str[ 200 ], Float:X, Float:Y, Float:Z;
  1446. if(i == 0 || !OrgInfo[ i ][ orgDrzavna ]) return SCM(playerid, -1, "Niste policajac.");
  1447. if(sscanf(params, "u", id)) return SCM(playerid, -1, "/arrest [ID]");
  1448. if(!IsPlayerConnected(id)) return SCM(playerid, -1, "Taj igrac nije na serveru.");
  1449. //if(id == playerid) return SCM(playerid, -1, "Ne mozete uhapsiti sami sebe.");
  1450. if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ orgHapsenjeX ], OrgInfo[ i ][ orgHapsenjeY ], OrgInfo[ i ][ orgHapsenjeZ ])) return SCM(playerid, -1, "Niste kod mesta za hapsenje.");
  1451. GetPlayerPos(id, X,Y,Z);
  1452. if(!IsPlayerInRangeOfPoint(playerid, 5.0, X,Y,Z)) return SCM(playerid, -1, "Taj igrac nije blizu Vas.");
  1453. if(pWanted[ id ] < 1) return SCM(playerid, -1, "Taj igrac nema Wanted Level.");
  1454. pZatvorVreme[ id ] = pWanted[ id ]*300000;
  1455. ZatvorTimer[ id ] = SetTimerEx("TimerZatvor", 1000, true, "i", id);
  1456. // SetPlayerPos(id, X,Y,Z); // ZATVOR
  1457. format(str, sizeof(str), "Vreme zatvora: %d sekundi.", pZatvorVreme[ id ]/1000);
  1458. SCM(id, -1, str);
  1459. format(str, sizeof(str), "[VESTI] {FFFFFF}%s je uhapsen od strane policajca %s.", ImeIgraca(id), ImeIgraca(playerid));
  1460. SendClientMessageToAll(0x0057AEFF, str);
  1461. return 1;
  1462. }
  1463. YCMD:test(playerid, params[], help) return pWanted[ playerid ] = 1;
  1464. YCMD:zauzmi(playerid, params[], help) {
  1465.  
  1466. #pragma unused help
  1467. #pragma unused params
  1468.  
  1469. if(Zauzima[ playerid ] != 0) return SCM(playerid, -1, "Vec zauzimate.");
  1470. for(new i; i < MAX_ORGS; i++) {
  1471. if(IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ pPosX ], OrgInfo[ i ][ pPosY ], OrgInfo[ i ][ pPosZ ])) {
  1472. if(pClan[ playerid ] == OrgInfo[ i ][ orgZauzeta ]) return SCM(playerid, -1, "Hoces da zauzmes svoju zonu?");
  1473. if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
  1474. if(OrgInfo[ pClan[ playerid ] ][ orgMafija ] || OrgInfo[ pClan[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Mafije i drzavne organizacije ne mogu zauzimati.");
  1475. ZauzimanjeTimer[ playerid ] = SetTimerEx("ZauzimanjeVreme", 600000, false, "i", playerid);
  1476. SCM(playerid, -1, "Krenuli ste da zauzimate, sacekajte 10 minuta.");
  1477. ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
  1478. TogglePlayerControllable(playerid, false);
  1479. Zauzima[ playerid ] = i;
  1480. for(new o; o < MAX_PLAYERS; o++) {
  1481. if(pClan[ o ] == OrgInfo[ i ][ orgZauzeta ] || pLider[ o ] == OrgInfo[ i ][ orgZauzeta ]) { SCM(playerid, -1, "Neko pokusava da vam zauzme zonu !"); }
  1482. }
  1483. }
  1484. }
  1485. return 1;
  1486. }
  1487. YCMD:savez(playerid, params[], help) {
  1488.  
  1489. #pragma unused help
  1490.  
  1491. new id, str[ 100 ];
  1492. if(pLider[ playerid ] == 0) return SCM(playerid, -1, "Niste lider.");
  1493. if(sscanf(params, "u", id)) return SCM(playerid, -1, "/savez [ID/Ime igraca]");
  1494. if(CekaSavez[ playerid ]) return SCM(playerid, -1, "Vec imate zahtev za savez na cekanju.");
  1495. if(pLider[ id ] == 0) return SCM(playerid, -1, "Taj igrac nije lider.");
  1496. if(OrgInfo[ pLider[ playerid ] ][ orgUSavezu ] != 0) return SCM(playerid, -1, "Vec imate saveznika.");
  1497. if(OrgInfo[ pLider[ id ] ][ orgUSavezu ] != 0) return SCM(playerid, -1, "Taj lider vec ima saveznika.");
  1498. if(id == playerid) return SCM(playerid, -1, "Kako da posaljete sebi zahtev za savez?");
  1499. if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider Vase organizacije.");
  1500. if(OrgInfo[ pLider[ playerid ] ][ orgBanda ] && OrgInfo[ pLider[ id ] ][ orgBanda ]) return SCM(playerid, -1, "Bande mogu sklopiti savez samo sa mafijom.");
  1501. if(OrgInfo[ pLider[ playerid ] ][ orgMafija ] && OrgInfo[ pLider[ id ] ][ orgMafija ]) return SCM(playerid, -1, "Mafije mogu sklopiti savez samo sa bandom.");
  1502. if(OrgInfo[ pLider[ id ] ][ orgDrzavna ] || OrgInfo[ pLider[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Drzavne organizacije ne mogu imati saveznike.");
  1503. format(str, sizeof(str), "Igrac %s, lider organizacije %s\nVam salje zahtev za savez.", ImeIgraca(playerid), OrgInfo[ pLider[ playerid ] ][ orgIme ]);
  1504. ShowPlayerDialog(id, DIALOG_SAVEZ, DIALOG_STYLE_MSGBOX, "ZAHTEV ZA SAVEZ", str, "Prihvati","Odbij");
  1505. PoslaoSavez[ id ] = playerid;
  1506. CekaSavez[ playerid ] = true;
  1507. return 1;
  1508. }
  1509. YCMD:kreirajorgveh(playerid, params[], help) {
  1510.  
  1511. #pragma unused help
  1512.  
  1513. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
  1514. new oid, vehid, b1, b2, i = NextOrgVehID(MAX_ORGVEHS), Float:X, Float:Y, Float:Z, Float:A, ovFile[ 60 ], str[ 35 ];
  1515. if(sscanf(params, "dddd", oid, vehid, b1, b2)) return SCM(playerid, -1, "/kreirajorgveh [ID ORG] [ID Vozila] [Boja 1] [Boja 2]");
  1516. format(ovFile, sizeof(ovFile), ORG_FILE, oid);
  1517. if(!fexist(ovFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
  1518. if(vehid < 400 || vehid > 611) return SCM(playerid, -1, "ID Vozila : 400 - 611");
  1519. format(str, sizeof(str), "[ %s ]", OrgInfo[ oid ][ orgIme ]);
  1520. GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid, A);
  1521. OrgVehInfo[ i ][ ovID ] = CreateVehicle(vehid, X, Y, Z, A, b1, b2, -1);
  1522. OrgVehLabel[ i ] = Create3DTextLabel(str, OrgInfo[ oid ][ orgBoja ], X,Y,Z, 15.0, 0, 0);
  1523. Attach3DTextLabelToVehicle(OrgVehLabel[ i ], OrgVehInfo[ i ][ ovID ], 0.0, 0.0, 0.0);
  1524. OrgVehInfo[ i ][ ovModel ] = vehid;
  1525. OrgVehInfo[ i ][ ovBoja1 ] = b1;
  1526. OrgVehInfo[ i ][ ovBoja2 ] = b2;
  1527. OrgVehInfo[ i ][ ovOrgID ] = oid;
  1528. OrgVehInfo[ i ][ ovPosX ] = X;
  1529. OrgVehInfo[ i ][ ovPosY ] = Y;
  1530. OrgVehInfo[ i ][ ovPosZ ] = Z;
  1531. OrgVehInfo[ i ][ ovRotA ] = A;
  1532. TipVozila[ i ] = 1;
  1533. SaveOrgVeh(i);
  1534. PutPlayerInVehicle(playerid, OrgVehInfo[ i ][ ovID ], 0);
  1535. return 1;
  1536. }
  1537.  
  1538. stock NextOrgVehID(const len) {
  1539. new id = (-1);
  1540. for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  1541. provjera = ( loop+1 );
  1542. format( Data_, ( sizeof Data_ ), ORGVEH_FILE, provjera );
  1543. if(!fexist(Data_)) {
  1544. id = ( provjera );
  1545. break; } }
  1546. return ( id );
  1547. }
  1548. stock NextORGID(const len) {
  1549. new id = (-1);
  1550. for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  1551. provjera = ( loop+1 );
  1552. format( Data_, ( sizeof Data_ ), ORG_FILE, provjera );
  1553. if(!fexist(Data_)) {
  1554. id = ( provjera );
  1555. break; } }
  1556. return ( id );
  1557. }
  1558. stock NextKapijaID(const len) {
  1559. new id = (-1);
  1560. for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  1561. provjera = ( loop+1 );
  1562. format( Data_, ( sizeof Data_ ), ORGGATES_FILE, provjera );
  1563. if(!fexist(Data_)) {
  1564. id = ( provjera );
  1565. break; } }
  1566. return ( id );
  1567. }
  1568. GetNearestOrgGate( playerid ) {
  1569. for( new i = 1; i < MAX_ORGGATES; i++) {
  1570. if( IsPlayerInRangeOfPoint( playerid, 6.0, OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ] ) ) { return i; }
  1571. }
  1572. return -1;
  1573. }
  1574. stock SaveOrgGate(id) {
  1575.  
  1576. new ogFile[ 60 ];
  1577. format(ogFile, sizeof(ogFile), ORGGATES_FILE, id);
  1578. new INI:File = INI_Open(ogFile);
  1579. INI_WriteInt(File, "ORG_ID", OrgGateInfo[ id ][ ogOrgID ]);
  1580. INI_WriteInt(File, "Object_ID", OrgGateInfo[ id ][ ogObjID ]);
  1581. INI_WriteFloat(File, "Lokacija_X", OrgGateInfo[ id ][ ogPosX ]);
  1582. INI_WriteFloat(File, "Lokacija_Y", OrgGateInfo[ id ][ ogPosY ]);
  1583. INI_WriteFloat(File, "Lokacija_Z", OrgGateInfo[ id ][ ogPosZ ]);
  1584. INI_WriteFloat(File, "Rotacija_X", OrgGateInfo[ id ][ ogRotX ]);
  1585. INI_WriteFloat(File, "Rotacija_Y", OrgGateInfo[ id ][ ogRotY ]);
  1586. INI_WriteFloat(File, "Rotacija_Z", OrgGateInfo[ id ][ ogRotZ ]);
  1587. INI_WriteFloat(File, "Otvorena_X", OrgGateInfo[ id ][ oogPosX ]);
  1588. INI_WriteFloat(File, "Orvorena_Y", OrgGateInfo[ id ][ oogPosY ]);
  1589. INI_WriteFloat(File, "Otvorena_Z", OrgGateInfo[ id ][ oogPosZ ]);
  1590. INI_WriteFloat(File, "Otvorena_RX", OrgGateInfo[ id ][ oogRotX ]);
  1591. INI_WriteFloat(File, "Otvorena_RY", OrgGateInfo[ id ][ oogRotY ]);
  1592. INI_WriteFloat(File, "Otvorena_RZ", OrgGateInfo[ id ][ oogRotZ ]);
  1593. INI_WriteInt(File, "Vreme_Zatvaranja", OrgGateInfo[ id ][ ogVremeZ ]);
  1594. INI_WriteInt(File, "Brzina_Zatvaranja", OrgGateInfo[ id ][ ogBrzinaZ ]);
  1595. INI_Close(File);
  1596. }
  1597. stock SaveOrgVeh(id) {
  1598.  
  1599. new ovFile[ 60 ];
  1600. format(ovFile, sizeof(ovFile), ORGVEH_FILE, id);
  1601. new INI:File = INI_Open(ovFile);
  1602. INI_WriteInt(File, "Organizacija_ID", OrgVehInfo[ id ][ ovOrgID ]);
  1603. INI_WriteInt(File, "Model", OrgVehInfo[ id ][ ovModel ]);
  1604. INI_WriteFloat(File, "Lokacija_X", OrgVehInfo[ id ][ ovPosX ]);
  1605. INI_WriteFloat(File, "Lokacija_Y", OrgVehInfo[ id ][ ovPosY ]);
  1606. INI_WriteFloat(File, "Lokacija_Z", OrgVehInfo[ id ][ ovPosZ ]);
  1607. INI_WriteFloat(File, "Rotacija_A", OrgVehInfo[ id ][ ovRotA ]);
  1608. INI_WriteInt(File, "Boja_1", OrgVehInfo[ id ][ ovBoja1 ]);
  1609. INI_WriteInt(File, "Boja_2", OrgVehInfo[ id ][ ovBoja2 ]);
  1610. INI_Close(File);
  1611. }
  1612. stock SaveOrg(id) {
  1613. new oFile[ 60 ];
  1614. format(oFile, sizeof(oFile), ORG_FILE, id);
  1615. new INI:File = INI_Open(oFile);
  1616. INI_WriteString(File, "Ime", OrgInfo[ id ][ orgIme ]);
  1617. INI_WriteString(File, "Skracenica", OrgInfo[ id ][ orgSkracenica ]);
  1618. INI_WriteBool(File, "Banda",OrgInfo[ id ][ orgBanda ]);
  1619. INI_WriteBool(File, "Mafija",OrgInfo[ id ][ orgMafija ]);
  1620. INI_WriteBool(File, "Drzavna",OrgInfo[ id ][ orgDrzavna ]);
  1621. INI_WriteInt(File, "Interior_ID", OrgInfo[ id ][ orgInt ]);
  1622. INI_WriteInt(File, "Virtual_World", OrgInfo[ id ][ orgVW ]);
  1623. INI_WriteInt(File, "Savezna_Org_ID", OrgInfo[ id ][ orgUSavezu ]);
  1624. INI_WriteHex(File, "Boja", OrgInfo[ id ][ orgBoja ]);
  1625. INI_WriteHex(File, "Boja_Zone", OrgInfo[ id ][ zBoja ]);
  1626. INI_WriteInt(File, "Clanovi", OrgInfo[ id ][ orgClanovi ]);
  1627. INI_WriteBool(File, "Lider_Slot_1", OrgInfo[ id ][ orgLiderSlot1 ]);
  1628. INI_WriteBool(File, "Lider_Slot_2", OrgInfo[ id ][ orgLiderSlot2 ]);
  1629. INI_WriteString(File, "Rank_1", OrgInfo[ id ][ orgRank1 ]);
  1630. INI_WriteString(File, "Rank_2", OrgInfo[ id ][ orgRank2 ]);
  1631. INI_WriteString(File, "Rank_3", OrgInfo[ id ][ orgRank3 ]);
  1632. INI_WriteString(File, "Rank_4", OrgInfo[ id ][ orgRank4 ]);
  1633. INI_WriteString(File, "Rank_5", OrgInfo[ id ][ orgRank5 ]);
  1634. INI_WriteInt(File, "Skin_Rank_1", OrgInfo[ id ][ orgSkin1 ]);
  1635. INI_WriteInt(File, "Skin_Rank_2", OrgInfo[ id ][ orgSkin2 ]);
  1636. INI_WriteInt(File, "Skin_Rank_3", OrgInfo[ id ][ orgSkin3 ]);
  1637. INI_WriteInt(File, "Skin_Rank_4", OrgInfo[ id ][ orgSkin4 ]);
  1638. INI_WriteInt(File, "Skin_Rank_5", OrgInfo[ id ][ orgSkin5 ]);
  1639. INI_WriteInt(File, "Zenski_Skin_1", OrgInfo[ id ][ orgZSkin1 ]);
  1640. INI_WriteInt(File, "Zenski_Skin_2", OrgInfo[ id ][ orgZSkin2 ]);
  1641. INI_WriteInt(File, "Zenski_Skin_3", OrgInfo[ id ][ orgZSkin3 ]);
  1642. INI_WriteInt(File, "Zenski_Skin_4", OrgInfo[ id ][ orgZSkin4 ]);
  1643. INI_WriteInt(File, "Zenski_Skin_5", OrgInfo[ id ][ orgZSkin5 ]);
  1644. INI_WriteFloat(File, "Lokacija_X", OrgInfo[ id ][ orgPosX ]);
  1645. INI_WriteFloat(File, "Lokacija_Y", OrgInfo[ id ][ orgPosY ]);
  1646. INI_WriteFloat(File, "Lokacija_Z", OrgInfo[ id ][ orgPosZ ]);
  1647. INI_WriteFloat(File, "Interior_X", OrgInfo[ id ][ intPosX ]);
  1648. INI_WriteFloat(File, "Interior_Y", OrgInfo[ id ][ intPosY ]);
  1649. INI_WriteFloat(File, "Interior_Z", OrgInfo[ id ][ intPosZ ]);
  1650. INI_WriteFloat(File, "Zona_Min_X", OrgInfo[ id ][ zMinX ]);
  1651. INI_WriteFloat(File, "Zona_Min_Y", OrgInfo[ id ][ zMinY ]);
  1652. INI_WriteFloat(File, "Zona_Max_X", OrgInfo[ id ][ zMaxX ]);
  1653. INI_WriteFloat(File, "Zona_Max_Y", OrgInfo[ id ][ zMaxY ]);
  1654. INI_WriteFloat(File, "Zauzimanje_X", OrgInfo[ id ][ pPosX ]);
  1655. INI_WriteFloat(File, "Zauzimanje_Y", OrgInfo[ id ][ pPosY ]);
  1656. INI_WriteFloat(File, "Zauzimanje_Z", OrgInfo[ id ][ pPosZ ]);
  1657. INI_WriteInt(File, "ORG_Zauzeta", OrgInfo[ id ][ orgZauzeta ]);
  1658. INI_WriteFloat(File, "Sef_X", OrgInfo[ id ][ orgSefX ]);
  1659. INI_WriteFloat(File, "Sef_Y", OrgInfo[ id ][ orgSefY ]);
  1660. INI_WriteFloat(File, "Sef_Z", OrgInfo[ id ][ orgSefZ ]);
  1661. INI_WriteFloat(File, "Sef_RX", OrgInfo[ id ][ orgSefRX ]);
  1662. INI_WriteFloat(File, "Sef_RY", OrgInfo[ id ][ orgSefRY ]);
  1663. INI_WriteFloat(File, "Sef_RZ", OrgInfo[ id ][ orgSefRZ ]);
  1664. INI_WriteInt(File, "Sef_ObjID", OrgInfo[ id ][ orgSefObjID ]);
  1665. INI_WriteInt(File, "Kolicina_Novca", OrgInfo[ id ][ orgSefNovac ]);
  1666. INI_WriteInt(File, "Kolicina_Materijala", OrgInfo[ id ][ orgSefMats ]);
  1667. INI_WriteInt(File, "Kolicina_Droge", OrgInfo[ id ][ orgSefDroga ]);
  1668. INI_WriteFloat(File, "PDDuty_X", OrgInfo[ id ][ orgPDDutyX ]);
  1669. INI_WriteFloat(File, "PDDuty_Y", OrgInfo[ id ][ orgPDDutyY ]);
  1670. INI_WriteFloat(File, "PDDuty_Z", OrgInfo[ id ][ orgPDDutyZ ]);
  1671. INI_WriteFloat(File, "Gun_X", OrgInfo[ id ][ orgGunX ]);
  1672. INI_WriteFloat(File, "Gun_Y", OrgInfo[ id ][ orgGunY ]);
  1673. INI_WriteFloat(File, "Gun_Z", OrgInfo[ id ][ orgGunZ ]);
  1674. INI_WriteFloat(File, "Hapsenje_X", OrgInfo[ id ][ orgHapsenjeX ]);
  1675. INI_WriteFloat(File, "Hapsenje_Y", OrgInfo[ id ][ orgHapsenjeY ]);
  1676. INI_WriteFloat(File, "Hapsenje_Z", OrgInfo[ id ][ orgHapsenjeZ ]);
  1677. INI_WriteString(File, "Lider_1", OrgInfo[ id ][ orgLider1 ]);
  1678. INI_WriteString(File, "Lider_2", OrgInfo[ id ][ orgLider2 ]);
  1679. INI_WriteString(File, "Clan_1", OrgInfo[ id ][ orgClan1 ]);
  1680. INI_WriteString(File, "Clan_2", OrgInfo[ id ][ orgClan2 ]);
  1681. INI_WriteString(File, "Clan_3", OrgInfo[ id ][ orgClan3 ]);
  1682. INI_WriteString(File, "Clan_4", OrgInfo[ id ][ orgClan4 ]);
  1683. INI_WriteString(File, "Clan_5", OrgInfo[ id ][ orgClan5 ]);
  1684. INI_WriteString(File, "Clan_6", OrgInfo[ id ][ orgClan6 ]);
  1685. INI_WriteString(File, "Clan_7", OrgInfo[ id ][ orgClan7 ]);
  1686. INI_WriteString(File, "Clan_8", OrgInfo[ id ][ orgClan8 ]);
  1687. INI_WriteString(File, "Clan_9", OrgInfo[ id ][ orgClan9 ]);
  1688. INI_WriteString(File, "Clan_10", OrgInfo[ id ][ orgClan10 ]);
  1689. INI_WriteString(File, "Clan_11", OrgInfo[ id ][ orgClan11 ]);
  1690. INI_WriteString(File, "Clan_12", OrgInfo[ id ][ orgClan12 ]);
  1691. INI_WriteString(File, "Clan_13", OrgInfo[ id ][ orgClan13 ]);
  1692. INI_WriteString(File, "Clan_14", OrgInfo[ id ][ orgClan14 ]);
  1693. INI_WriteString(File, "Clan_15", OrgInfo[ id ][ orgClan15 ]);
  1694. INI_WriteString(File, "Clan_16", OrgInfo[ id ][ orgClan16 ]);
  1695. INI_WriteString(File, "Clan_17", OrgInfo[ id ][ orgClan17 ]);
  1696. INI_WriteString(File, "Clan_18", OrgInfo[ id ][ orgClan18 ]);
  1697. INI_WriteString(File, "Clan_19", OrgInfo[ id ][ orgClan19 ]);
  1698. INI_WriteString(File, "Clan_20", OrgInfo[ id ][ orgClan20 ]);
  1699. INI_WriteString(File, "Clan_21", OrgInfo[ id ][ orgClan21 ]);
  1700. INI_WriteString(File, "Clan_22", OrgInfo[ id ][ orgClan22 ]);
  1701. INI_WriteString(File, "Clan_23", OrgInfo[ id ][ orgClan23 ]);
  1702. INI_WriteString(File, "Clan_24", OrgInfo[ id ][ orgClan24 ]);
  1703. INI_WriteString(File, "Clan_25", OrgInfo[ id ][ orgClan25 ]);
  1704. INI_WriteString(File, "Clan_26", OrgInfo[ id ][ orgClan26 ]);
  1705. INI_WriteString(File, "Clan_27", OrgInfo[ id ][ orgClan27 ]);
  1706. INI_WriteString(File, "Clan_28", OrgInfo[ id ][ orgClan28 ]);
  1707. INI_WriteString(File, "Clan_29", OrgInfo[ id ][ orgClan29 ]);
  1708. INI_WriteString(File, "Clan_30", OrgInfo[ id ][ orgClan30 ]);
  1709. INI_Close(File);
  1710. }
  1711. stock ImeIgraca( id ) {
  1712. new ime[ MAX_PLAYER_NAME ];
  1713. GetPlayerName( id, ime, sizeof ime);
  1714. return ime;
  1715. }
  1716. stock GetPlayerIdFromName(playername[]) {
  1717.  
  1718. for(new i = 0; i <= MAX_PLAYERS; i++) {
  1719. if(IsPlayerConnected(i)) {
  1720. new playername2[ MAX_PLAYER_NAME ];
  1721. GetPlayerName(i, playername2, sizeof(playername2));
  1722. if(strcmp(playername2, playername, true, strlen(playername)) ==0) {
  1723. return i;
  1724. }
  1725. }
  1726. }
  1727. return INVALID_PLAYER_ID;
  1728. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement