Zmajk0

Untitled

Jun 4th, 2019
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. UBACITI
  3.  
  4. DINAMICNO KREIRANJE KONTENJERA i rovarenje - https://pastebin.com/KJHf590E
  5. DINAMICNO KREIRANJE TELEPORTA - https://pastebin.com/DBhneQLi
  6.  
  7. */
  8. #include < a_samp >
  9. #include < YSI\y_ini >
  10. #include < zcmd >
  11. #include < sscanf2 >
  12. #include < foreach >
  13. #include < streamer >
  14.  
  15. #include "mape.pwn"
  16. //===================dialogs************************
  17. #define DIALOG_REGISTER 1
  18. #define DIALOG_LOGIN 2
  19. #define dialog_DILER 3
  20. #define dialog_KREIRAJDILERA 4
  21. #define DIALOG_KUCA 5
  22. #define DIALOG_OKNOVAC 6
  23. #define DIALOG_UKNOVAC 8
  24. #define DIALOG_IKUCA 10
  25. #define DIALOG_KRENT 12
  26. #define D_ADMINI 14
  27. #define D_AHELP 16
  28. #define DIALOG_RENT 18
  29. #define DIALOG_RENTVREME 20
  30. #define DIALOG_AKTORPANEL 22
  31. #define DIALOG_KREIRAJAKTORA1 24
  32. #define DIALOG_KREIRAJAKTORA2 26
  33. #define DIALOG_AKTORANIMACIJA 28
  34. #define DIALOG_IZMENIAKTORA 30
  35. #define DIALOG_IZMENIPOZICIJU 32
  36. #define DIALOG_IZMENIANIMACIJU 34
  37. #define DIALOG_IZMENISKIN 36
  38. #define DIALOG_IZMENIIME 38
  39. #define DIALOG_IZBRISIAKTORA 40
  40. #define DIALOG_BRISANJEAKTORA 42
  41. #define dialog_TRAFIKA 44
  42. #define DIALOG_GATECREATE 46
  43. #define DIALOG_GATECREATE2 48
  44. #define DIALOG_NARGILARENT 50
  45. //-----------------------------------------------
  46.  
  47. #define SPLAVA "{00C0FF}"
  48. #define SIVA "{C0C0C0}"
  49. #define HGREEN "{04CC29}"
  50. #define WHITE "{FFFFFF}"
  51. #define CRVENA "{F81414}"
  52. #define BELA "{FFFFFF}"
  53. #define PPLAVA "{0084e3}"
  54. #define ZUTA "{F3FF02}"
  55. #define SCRVENA 0xFF6347AA
  56. #define BELA "{FFFFFF}"
  57. #define ZELENA "{0ed400}"
  58. #define CRVENA "{F81414}"
  59. #define ZUTA "{F3FF02}"
  60. #define SPLAVA "{00C0FF}"
  61. #define SIVA "{C0C0C0}"
  62. #define SVJETLOPLAVA 0x33CCFFAA
  63. #define AZUTA 0xFFFF00FF
  64. #define LJUBICASTA 0xC2A2DAAA
  65. #define PLAVA 0x1275EDFF
  66. #define PURPLE 0xC2A2DAFF
  67. #define SVIJETLOZELENA 0x00FFFFFF
  68. #define ORANGE 0xF69521AA
  69. #define BIJELA 0xFFFFFFFF
  70. #define COLOR_GREEN 0xADFF2FAA
  71. #define SERVER {4B0000}
  72.  
  73. //0x4B0000FF
  74.  
  75. #define PATH "/Korisnici/%s.ini"
  76. #define IPI INVALID_PLAYER_ID
  77.  
  78.  
  79. #define SCM SendClientMessage
  80. #define SPD ShowPlayerDialog
  81. #define SCMTA SendClientMessageToAll
  82. //===================================newovi*********
  83. //------------------------------------------------------
  84. enum nargilaInfo {
  85.  
  86. Float:nargilaPosX,
  87. Float:nargilaPosY,
  88. Float:nargilaPosZ,
  89. Float:nargilaRotX,
  90. Float:nargilaRotY,
  91. Float:nargilaRotZ,
  92. bool:IznamljenaNargila,
  93. IznajmioNargilu,
  94. nargilaID
  95. }
  96.  
  97. new NargilaInfo[ 20 ][ nargilaInfo ], Text3D:NargilaLabel[ sizeof(NargilaInfo) ], KreiraNargilu[ MAX_PLAYERS ], NargiluIznajmio[ MAX_PLAYERS ], NargilaDim[ sizeof(NargilaInfo) ], UvukoDim[ MAX_PLAYERS ],
  98. NargilaTimer[ MAX_PLAYERS ];
  99. //---------------------------------------------------
  100. #define MAX_PRIVKAPIJE 50
  101. #define PRIVKAPIJE_FILE "/PrivatneKapije/%d.ini"
  102. enum PRIVKAPIJE_INFO {
  103.  
  104. Float:pkX,
  105. Float:pkY,
  106. Float:pkZ,
  107. Float:pkRX,
  108. Float:pkRY,
  109. Float:pkRZ,
  110. Float:pkoX,
  111. Float:pkoY,
  112. Float:pkoZ,
  113. Float:pkoRX,
  114. Float:pkoRY,
  115. Float:pkoRZ,
  116. pkObjID,
  117. pkCloseTime,
  118. Float:pkCloseSpeed,
  119. pkForPlayer[ MAX_PLAYER_NAME ],
  120. bool:pkForVips,
  121. bool:pkForAll,
  122. bool:pkOtvorena,
  123. pkID
  124. }
  125.  
  126. new PkInfo[ MAX_PRIVKAPIJE ][ PRIVKAPIJE_INFO ], Text3D:PkLabel[ sizeof(PkInfo) ], ClosePKTimer[ MAX_PRIVKAPIJE ], KreiraPK[ MAX_PLAYERS ], bool:KreiraOtvorenuPK[ MAX_PLAYERS ];
  127. //--------------------------------------------------
  128. #define MAX_TRAFIKA 50
  129. #define TRAFIKE_FILE "/Trafike/Trafika_%d.ini"
  130. enum trafikaInfo {
  131.  
  132. Float:PosX,
  133. Float:PosY,
  134. Float:PosZ,
  135. Float:RotX,
  136. Float:RotY,
  137. Float:RotZ
  138. }
  139. new TrafikaInfo[ MAX_TRAFIKA ][ trafikaInfo ], trafika_object[ sizeof(TrafikaInfo) ],
  140. Text3D:TrafikaLabel[ sizeof(TrafikaInfo) ], KreiraTrafiku[ MAX_PLAYERS ];
  141. //----------------------------------------------//
  142. #define AKTOR_FILE "/Aktori/%d.ini"
  143. #define MAX_AKTORI 30
  144. enum AKTOR_INFO {
  145.  
  146. Float:aktorX,
  147. Float:aktorY,
  148. Float:aktorZ,
  149. Float:aktorA,
  150. aktorskin,
  151. aktorime[ 40 ],
  152. aktoranimacija,
  153. aktorid
  154. }
  155.  
  156. new AktorInfo[ MAX_AKTORI ][ AKTOR_INFO ], KreiraAktora[ MAX_PLAYERS ], Text3D:AktorLabel[ sizeof(AktorInfo) ];
  157.  
  158. //---------------------------------------------
  159. #define MAX_RENTS 30
  160. #define RENT_FILE "/Rent/%d.ini"
  161. enum RENT_INFO {
  162.  
  163. Float:rentX,
  164. Float:rentY,
  165. Float:rentZ,
  166. Text3D:RentLabel,
  167. rentID
  168. }
  169.  
  170. new RentInfo[ MAX_RENTS ][ RENT_INFO ], IznajmioVozilo[ MAX_PLAYERS ], RentVeh[ MAX_PLAYERS ], RentOdabir[ MAX_PLAYERS ],
  171. RentVreme[ MAX_PLAYERS ], RentTimer[ MAX_PLAYERS ], Text3D:RentVehLabel[ MAX_VEHICLES ], TipVozila[ MAX_VEHICLES ];
  172. //-------------------------------------//
  173. #define KUCE_FILE "Kuce/%d.ini"
  174. #define MAX_KUCA 50
  175. enum Kuce
  176. {
  177. kProveraVlasnika,
  178. kVlasnik[45],
  179. kVrsta[35],
  180. kIme[60],
  181. Float:kUlazX,
  182. Float:kUlazY,
  183. Float:kUlazZ,
  184. Float:kIzlazX,
  185. Float:kIzlazY,
  186. Float:kIzlazZ,
  187. kLevel,
  188. kCena,
  189. kNovac,
  190. kInt,
  191. kZatvoreno,
  192. kVW,
  193. kOruzije,
  194. kMunicija,
  195. kRent,
  196. kCenaRenta,
  197. kZvono
  198. };
  199. new KucaInfo[MAX_KUCA][Kuce];
  200. new KucaPickup[sizeof(KucaInfo)];
  201. new Text3D:KucaLabel[sizeof(KucaInfo)];
  202. //------------------------------------------//
  203. #define MAX_DILERA 50
  204. #define DILERI_FILE "/Dileri/lerDi_%d.ini"
  205.  
  206.  
  207. enum lerDiInfo {
  208. Float:dX,
  209. Float:dY,
  210. Float:dZ,
  211. Float:dA,
  212. DilerIme[30]
  213. };
  214. new DilerInfo[ MAX_DILERA ][ lerDiInfo ], Text3D:DilerLabel[ MAX_DILERA ],
  215. DilerActor;
  216.  
  217. enum pInfo
  218. {
  219. pLozinka,
  220. pZatvoren,
  221. pClan,
  222. pLider,
  223. pRank,
  224. pSkin,
  225. pMeta,
  226. pImaMetu,
  227. pCijenaGlave,
  228. pImaZrtvu,
  229. pImeZrtve[24],
  230. pImeMete[24],
  231. pWantedLevel,
  232. pNovac,
  233. pLevel,
  234. pPosedovanjeKuce,
  235. pProveraSpawna,
  236. pRent,
  237. pAdmin,
  238. pDroga,
  239. pDzoint,
  240. pUbistva,
  241. pSmrti
  242. };
  243. new PlayerInfo[MAX_PLAYERS][pInfo];
  244. //--------------------
  245.  
  246. //--------------------
  247.  
  248.  
  249. new Specanje[MAX_PLAYERS];
  250. new SpecanjeVar[MAX_PLAYERS];
  251.  
  252. new PlayerText:Textdraw2[ MAX_PLAYERS ],
  253. PlayerText:Textdraw3[ MAX_PLAYERS ],
  254. PlayerText:Textdraw4[ MAX_PLAYERS ],
  255. //PlayerText:Textdraw5[ MAX_PLAYERS], // ovo je za gorivo kada dodas sistem
  256. PlayerText:Textdraw6[ MAX_PLAYERS ];
  257.  
  258. /////////////
  259. //****************************boje**********************************************
  260. #define COLOR_GREY 0xAFAFAFAA
  261. #define COLOR_RED 0xAA3333AA
  262. #define COLOR_YELLOW 0xFFFF00AA
  263. #define COLOR_WHITE 0xFFFFFFAA
  264. #define COLOR_BLUE 0x0000BBAA
  265. #define COLOR_LIGHTBLUE 0x33CCFFAA
  266. #define COLOR_ORANGE 0xFF9900AA
  267. #define COLOR_RED 0xAA3333AA
  268. #define COLOR_LIME 0x10F441AA
  269. #define COLOR_MAGENTA 0xFF00FFFF
  270. #define COLOR_NAVY 0x000080AA
  271. #define COLOR_AQUA 0xF0F8FFAA
  272. #define COLOR_CRIMSON 0xDC143CAA
  273. #define COLOR_FLBLUE 0x6495EDAA
  274. #define COLOR_BISQUE 0xFFE4C4AA
  275. #define COLOR_BLACK 0x000000AA
  276. #define COLOR_CHARTREUSE 0x7FFF00AA
  277. #define COLOR_BROWN 0XA52A2AAA
  278. #define COLOR_CORAL 0xFF7F50AA
  279. #define COLOR_GOLD 0xB8860BAA
  280. #define COLOR_GREENYELLOW 0xADFF2FAA
  281. #define COLOR_INDIGO 0x4B00B0AA
  282. #define COLOR_IVORY 0xFFFF82AA
  283. #define COLOR_LAWNGREEN 0x7CFC00AA
  284. #define COLOR_SEAGREEN 0x20B2AAAA
  285. #define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
  286. #define COLOR_MIDNIGHTBLUE 0X191970AA
  287. #define COLOR_MAROON 0x800000AA
  288. #define COLOR_OLIVE 0x808000AA
  289. #define COLOR_ORANGERED 0xFF4500AA
  290. #define COLOR_PINK 0xFFC0CBAA // - Light light pink
  291. #define COLOR_SPRINGGREEN 0x00FF7FAA
  292. #define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
  293. #define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
  294. #define COLOR_MEDIUMAQUA 0x83BFBFAA
  295. #define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
  296.  
  297. //==============================================================================
  298. main()
  299. {
  300. print("\n----------------------------------");
  301. print(" Samp server by MINKICA");
  302. print("----------------------------------\n");
  303. }
  304.  
  305. public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ) {
  306.  
  307. if(response == EDIT_RESPONSE_FINAL) {
  308. if(KreiraTrafiku[ playerid ] != 0) {
  309. TrafikaInfo[ KreiraTrafiku[ playerid ] ][ PosX ] = fX;
  310. TrafikaInfo[ KreiraTrafiku[ playerid ] ][ PosY ] = fY;
  311. TrafikaInfo[ KreiraTrafiku[ playerid ] ][ PosZ ] = fZ;
  312. TrafikaInfo[ KreiraTrafiku[ playerid ] ][ RotX ] = fRotX;
  313. TrafikaInfo[ KreiraTrafiku[ playerid ] ][ RotY ] = fRotY;
  314. TrafikaInfo[ KreiraTrafiku[ playerid ] ][ RotZ ] = fRotZ;
  315. DestroyObject(trafika_object[ KreiraTrafiku[ playerid ] ]);
  316. trafika_object[ KreiraTrafiku[ playerid ] ] = CreateObject(1571, fX,fY,fZ, fRotX,fRotY,fRotZ, 300.0);
  317. TrafikaLabel[ KreiraTrafiku[ playerid ] ] = Create3DTextLabel("{008467}[ TRAFIKA ]\n{FFFFFF}- {008467}/trafika {FFFFFF}-", 0x008080FF, fX,fY,fZ, 10.0, 0, 0);
  318. sacuvaj_trafiku(KreiraTrafiku[ playerid ]);
  319. SCM(playerid, -1, "{008467}[ TRAFIKA ]: {FFFFFF}Zavrsili ste kreiranje trafike.");
  320. }
  321. }
  322. //------------------------------
  323. else if(response == EDIT_RESPONSE_FINAL) {
  324. if(KreiraPK[ playerid ] != 0) {
  325. if(!KreiraOtvorenuPK[ playerid ]) {
  326. new i = KreiraPK[ playerid ];
  327. PkInfo[ i ][ pkX ] = fX;
  328. PkInfo[ i ][ pkY ] = fY;
  329. PkInfo[ i ][ pkZ ] = fZ;
  330. PkInfo[ i ][ pkRX ] = fRotX;
  331. PkInfo[ i ][ pkRY ] = fRotY;
  332. PkInfo[ i ][ pkRZ ] = fRotZ;
  333. DestroyObject(PkInfo[ i ][ pkID ]);
  334. PkInfo[ i ][ pkID ] = CreateObject(PkInfo[ i ][ pkObjID ], fX, fY, fZ, fRotX, fRotY, fRotZ);
  335. EditObject(playerid, PkInfo[ i ][ pkID ]);
  336. KreiraOtvorenuPK[ playerid ] = true;
  337. SendClientMessage(playerid, -1, "Sada sacuvajte poziciju otvorene kapije.");
  338. }
  339. else {
  340. new i = KreiraPK[ playerid ], str[ 50 ];
  341. PkInfo[ i ][ pkoX ] = fX;
  342. PkInfo[ i ][ pkoY ] = fY;
  343. PkInfo[ i ][ pkoZ ] = fZ;
  344. PkInfo[ i ][ pkoRX ] = fRotX;
  345. PkInfo[ i ][ pkoRY ] = fRotY;
  346. PkInfo[ i ][ pkoRZ ] = fRotZ;
  347. DestroyObject(PkInfo[ i ][ pkID ]);
  348. PkInfo[ i ][ pkID ] = CreateObject(PkInfo[ i ][ pkObjID ], PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], PkInfo[ i ][ pkRX ], PkInfo[ i ][ pkRY ], PkInfo[ i ][ pkRZ ]);
  349. if(!PkInfo[ i ][ pkForVips ] && !PkInfo[ i ][ pkForAll ]) { format(str, sizeof(str), "Privatna kapija\n{0057AE}%s", PkInfo[ i ][ pkForPlayer ]); PkLabel[ i ] = Create3DTextLabel(str, 0xFFFFFFFF, PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], 10.0, 0, 0); }
  350. SendClientMessage(playerid, -1, "Svrsili ste kreiranje :)");
  351. SavePK(i);
  352. KreiraPK[ playerid ] = 0;
  353. KreiraOtvorenuPK[ playerid ] = false;
  354. }
  355. }
  356. }
  357. //---------------------------//
  358. else if(response == EDIT_RESPONSE_FINAL) {
  359. if(KreiraNargilu[ playerid ] != 0) {
  360. new i = KreiraNargilu[ playerid ];
  361. DestroyObject(NargilaInfo[ i ][ nargilaID ]);
  362. NargilaInfo[ i ][ nargilaID ] = CreateObject(2726, fX, fY, fZ, fRotX, fRotY, fRotZ);
  363. NargilaLabel[ i ] = Create3DTextLabel("/nargila\nNije iznamljena.", 0xFFFFFFFF, fX, fY, fZ, 10.0, 0, 0);
  364. NargilaInfo[ i ][ nargilaPosX ] = fX;
  365. NargilaInfo[ i ][ nargilaPosY ] = fY;
  366. NargilaInfo[ i ][ nargilaPosZ ] = fZ;
  367. NargilaInfo[ i ][ nargilaRotX ] = fRotX;
  368. NargilaInfo[ i ][ nargilaRotY ] = fRotY;
  369. NargilaInfo[ i ][ nargilaRotZ ] = fRotZ;
  370. SaveNargila(i);
  371. SendClientMessage(playerid, -1, "Zavrsili ste kreiranje nargile.");
  372. }
  373. }
  374. return true;
  375. }
  376.  
  377. public OnGameModeInit()
  378. {
  379. for(new nargila; nargila < sizeof(NargilaInfo); nargila++) {
  380. new nargilaFile[ 50 ];
  381. format(nargilaFile, sizeof( nargilaFile ), "/Nargile/%d.ini", nargila);
  382. if(fexist(nargilaFile)) {
  383. INI_ParseFile(nargilaFile, "OcitajNargilu", .bExtra = true, .extra = nargila);
  384. NargilaInfo[ nargila ][ nargilaID ] = CreateObject(2726, NargilaInfo[ nargila ][ nargilaPosX ], NargilaInfo[ nargila ][ nargilaPosY ], NargilaInfo[ nargila ][ nargilaPosZ ], NargilaInfo[ nargila ][ nargilaRotX ], NargilaInfo[ nargila ][ nargilaRotY ], NargilaInfo[ nargila ][ nargilaRotZ ]);
  385. NargilaLabel[ nargila ] = Create3DTextLabel("/nargila\nNije iznamljena.", 0xFFFFFFFF, NargilaInfo[ nargila ][ nargilaPosX ], NargilaInfo[ nargila ][ nargilaPosY ], NargilaInfo[ nargila ][ nargilaPosZ ], 10.0, 0, 0);
  386. NargilaInfo[ nargila ][ IznajmioNargilu ] = -1;
  387. }
  388. }
  389. //------------------------------------------------------------------------------
  390. for(new i; i < MAX_PRIVKAPIJE; i++) {
  391. new pkFile[ 50 ], str[ 50 ];
  392. format(pkFile, sizeof(pkFile), PRIVKAPIJE_FILE, i);
  393. if(fexist(pkFile)) {
  394. INI_ParseFile(pkFile, "LoadPK", .bExtra = true, .extra = i);
  395. PkInfo[ i ][ pkID ] = CreateObject(PkInfo[ i ][ pkObjID ], PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], PkInfo[ i ][ pkRX ], PkInfo[ i ][ pkRY ], PkInfo[ i ][ pkRZ ]);
  396. format(str, sizeof(str), "Privatna kapija\n{0057AE}%s", PkInfo[ i ][ pkForPlayer ]);
  397. PkLabel[ i ] = Create3DTextLabel(str, 0xFFFFFFFF, PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], 10.0, 0, 0);
  398. }
  399. }
  400. //------------------------------------------------------------------------------
  401. for(new i; i < MAX_TRAFIKA; i++) {
  402. new trafike_File[ 50 ];
  403. format(trafike_File, sizeof(trafike_File), TRAFIKE_FILE, i);
  404. if(fexist(trafike_File)) {
  405. INI_ParseFile(trafike_File, "ucitaj_trafiku", .bExtra = true, .extra = i);
  406. trafika_object[ i ] = CreateObject(1571, TrafikaInfo[ i ][ PosX ], TrafikaInfo[ i ][ PosY ], TrafikaInfo[ i ][ PosZ ], TrafikaInfo[ i ][ RotX ], TrafikaInfo[ i ][ RotY ], TrafikaInfo[ i ][ RotZ ], 300.0);
  407. TrafikaLabel[ i ] = Create3DTextLabel("{008467}[ TRAFIKA ]\n{FFFFFF}- {008467}/trafika {FFFFFF}-", 0xFFFFFFFF, TrafikaInfo[ i ][ PosX ], TrafikaInfo[ i ][ PosY ], TrafikaInfo[ i ][ PosZ ], 10.0, 0, 0);
  408. }
  409. }
  410. //------------------------------------------------------------------------------
  411. for(new i; i < MAX_RENTS; i++) {
  412. new jFile[ 50 ];
  413. format(jFile, sizeof(jFile), RENT_FILE, i);
  414. if(fexist(jFile)) {
  415. INI_ParseFile(jFile, "LoadRent", .bExtra = true, .extra = i);
  416. RentInfo[ i ][ rentID ] = CreatePickup(19132, 1, RentInfo[ i ][ rentX ], RentInfo[ i ][ rentY ], RentInfo[ i ][ rentZ ], 0);
  417. RentInfo[ i ][ RentLabel ] = Create3DTextLabel("[ RENT ]\n{FFFFFF}Da iznajmite vozilo, kucajte\n{0077C7}/rent", 0x0077C7FF, RentInfo[ i ][ rentX ], RentInfo[ i ][ rentY ], RentInfo[ i ][ rentZ ], 10.0, 0, 0);
  418. }
  419. }
  420. //--------------HOUSE SYS-------------------------------------------------------
  421. for(new idkuce = 0; idkuce < sizeof(KucaInfo); idkuce++)
  422. {
  423. new kFile[50], string[400];
  424. format(kFile, sizeof(kFile), KUCE_FILE, idkuce);
  425. if(fexist(kFile))
  426. {
  427. INI_ParseFile(kFile, "UcitajKuce", .bExtra = true, .extra = idkuce);
  428. if(KucaInfo[idkuce][kProveraVlasnika] == 0)
  429. {
  430. format(string,sizeof(string),""ZELENA"Kuca na Prodaju!\nVrsta: "BELA"%s\n"ZELENA"Cena: "BELA"%d\n"ZELENA"Level: "BELA"%d\n"ZELENA"ID Kuce: "BELA"%d\n"ZELENA"Za kupovinu /kupikucu",KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kLevel],idkuce);
  431. KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,KucaInfo[idkuce][kUlazX],KucaInfo[idkuce][kUlazY],KucaInfo[idkuce][kUlazZ],25,0,1);
  432. KucaPickup[idkuce] = CreatePickup(1273, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]);
  433. }
  434. else if(KucaInfo[idkuce][kProveraVlasnika] == 1)
  435. {
  436. format(string,sizeof(string),""ZELENA"[ "BELA"%s "ZELENA"]\n"ZELENA"Vlasnik: "BELA"%s\n"ZELENA"Vrsta: "BELA"%s\n"ZELENA"Level: "BELA"%d\n"ZELENA"Cena: "BELA"%d\n"ZELENA"Cena Renta: "BELA"%d\n"ZELENA"ID Kuce: "BELA"%d\n"ZELENA"'F' za ulaz u kucu",KucaInfo[idkuce][kIme],KucaInfo[idkuce][kVlasnik],KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kLevel],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kCenaRenta],idkuce);
  437. KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,KucaInfo[idkuce][kUlazX],KucaInfo[idkuce][kUlazY],KucaInfo[idkuce][kUlazZ],25,0,1);
  438. KucaPickup[idkuce] = CreatePickup(1239, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]);
  439. }
  440. }
  441. }
  442. DisableInteriorEnterExits();
  443. //------------------------------------------------------------------------------
  444. for(new id = 0; id < MAX_DILERA; id++) {
  445. new lerDi_File[50];
  446. format(lerDi_File, sizeof(lerDi_File), DILERI_FILE, id);
  447. if(fexist(lerDi_File)) {
  448. INI_ParseFile(lerDi_File, "LoadujSamperskeNarkomane", .bExtra = true, .extra = id);
  449. DilerActor = CreateActor(29, DilerInfo[id][dX], DilerInfo[id][dY], DilerInfo[id][dZ], DilerInfo[id][dA]);
  450. ApplyActorAnimation(DilerActor, "PED", "IDLE_CHAT", 4.1, 1, 0, 0, 0, 0);
  451. SetActorInvulnerable(id, true);
  452. DileriLabel();
  453. }
  454. }
  455. //-----------------------SPAWN VOZILA-------------------------------------------
  456. AddStaticVehicleEx(462,1248.5000000,-1703.3000000,13.2000000,182.0000000,2,2,40000); //Faggio
  457. AddStaticVehicleEx(462,1246.2000000,-1703.3000000,13.2000000,182.0000000,2,2,40000); //Faggio
  458. AddStaticVehicleEx(462,1238.0996000,-1703.2998000,13.2000000,182.0000000,2,2,40000); //Faggio
  459. AddStaticVehicleEx(462,1240.4004000,-1703.2998000,13.2000000,182.0000000,2,2,40000); //Faggio
  460. AddStaticVehicleEx(468,1221.0000000,-1696.6000000,13.3000000,182.0000000,2,2,40000); //Sanchez
  461. AddStaticVehicleEx(468,1218.9004000,-1696.5996000,13.3000000,182.0000000,2,2,40000); //Sanchez
  462. AddStaticVehicleEx(468,1227.2000000,-1696.8000000,13.3000000,182.0000000,2,2,40000); //Sanchez
  463. AddStaticVehicleEx(468,1225.0000000,-1696.7998000,13.3000000,182.0000000,2,2,40000); //Sanchez
  464. AddStaticVehicleEx(468,1260.7002000,-1696.7998000,13.3000000,182.0000000,2,2,40000); //Sanchez
  465. AddStaticVehicleEx(468,1262.4004000,-1696.7998000,13.3000000,182.0000000,2,2,40000); //Sanchez
  466. AddStaticVehicleEx(468,1267.4000000,-1696.8000000,13.3000000,182.0000000,2,2,40000); //Sanchez
  467. AddStaticVehicleEx(468,1265.5996000,-1696.7998000,13.3000000,182.0000000,2,2,40000); //Sanchez
  468. AddStaticVehicleEx(481,1214.9000000,-1696.4000000,13.2000000,178.0000000,2,2,40000); //BMX
  469. AddStaticVehicleEx(565,1277.7000000,-1698.8000000,13.2000000,180.0000000,2,2,40000); //Flash
  470. AddStaticVehicleEx(565,1208.0000000,-1698.5996000,13.2000000,180.0000000,2,2,40000); //Flash
  471. AddStaticVehicleEx(481,1271.6000000,-1696.6000000,13.2000000,177.9950000,2,2,40000); //BMX
  472.  
  473. Objekti();
  474. ///IG TDOVI
  475. //++++++++
  476. UsePlayerPedAnims();
  477. AddStaticVehicle(522,1224.1686,-1826.1521,12.9747,79.5252,3,8); // V1
  478. SetGameModeText("v1.0.0");
  479. SetTimer("Brzinomer",100,true);
  480. return 1;
  481. }
  482.  
  483. public OnGameModeExit()
  484. {
  485. for(new k = 0; k <= MAX_KUCA; k++) { SacuvajKucu(k); }
  486. return 1;
  487. }
  488.  
  489. public OnPlayerRequestClass(playerid, classid)
  490. {
  491. SetSpawnInfo(playerid, 15, 15, 1242.8806, -1692.4796, 16.1967, 0, 0, 0, 0, 0, 0, 0);// Ovde stavite koordinate svog spawna
  492. SpawnPlayer(playerid);
  493. return 1;
  494. }
  495.  
  496. public OnPlayerConnect(playerid)
  497. {
  498.  
  499. PlayerInfo[playerid][pProveraSpawna] = 0; PlayerInfo[playerid][pPosedovanjeKuce] = -1; PlayerInfo[playerid][pRent] = -1;
  500.  
  501. //// Player textdraws
  502.  
  503. Textdraw2[playerid] = CreatePlayerTextDraw(playerid, 493.250000, 378.916687, "usebox");
  504. PlayerTextDrawLetterSize(playerid, Textdraw2[playerid], 0.000000, 6.164812);
  505. PlayerTextDrawTextSize(playerid, Textdraw2[playerid], 611.750000, 0.000000);
  506. PlayerTextDrawAlignment(playerid, Textdraw2[playerid], 1);
  507. PlayerTextDrawColor(playerid, Textdraw2[playerid], 0);
  508. PlayerTextDrawUseBox(playerid, Textdraw2[playerid], true);
  509. PlayerTextDrawBoxColor(playerid, Textdraw2[playerid], 102);
  510. PlayerTextDrawSetShadow(playerid, Textdraw2[playerid], 0);
  511. PlayerTextDrawSetOutline(playerid, Textdraw2[playerid], 0);
  512. PlayerTextDrawFont(playerid, Textdraw2[playerid], 0);
  513.  
  514. Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 513.750000, 376.833404, "SPEEDOMETAR");
  515. PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.324999, 1.255831);
  516. PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1);
  517. PlayerTextDrawColor(playerid, Textdraw3[playerid], 1258291455);
  518. PlayerTextDrawSetShadow(playerid, Textdraw3[playerid], 0);
  519. PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1);
  520. PlayerTextDrawBackgroundColor(playerid, Textdraw3[playerid], 51);
  521. PlayerTextDrawFont(playerid, Textdraw3[playerid], 1);
  522. PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1);
  523.  
  524. Textdraw4[playerid] = CreatePlayerTextDraw(playerid, 493.750000, 396.083312, "BRZINA : 250kmh");
  525. PlayerTextDrawLetterSize(playerid, Textdraw4[playerid], 0.289373, 0.899999);
  526. PlayerTextDrawAlignment(playerid, Textdraw4[playerid], 1);
  527. PlayerTextDrawColor(playerid, Textdraw4[playerid], -1);
  528. PlayerTextDrawSetShadow(playerid, Textdraw4[playerid], 0);
  529. PlayerTextDrawSetOutline(playerid, Textdraw4[playerid], 1);
  530. PlayerTextDrawBackgroundColor(playerid, Textdraw4[playerid], 51);
  531. PlayerTextDrawFont(playerid, Textdraw4[playerid], 2);
  532. PlayerTextDrawSetProportional(playerid, Textdraw4[playerid], 1);
  533.  
  534. /*Textdraw5[playerid] = CreatePlayerTextDraw(playerid, 493.125000, 406.583251, "GORIVO : 120L");
  535. PlayerTextDrawLetterSize(playerid, Textdraw5[playerid], 0.286249, 0.970000);
  536. PlayerTextDrawAlignment(playerid, Textdraw5[playerid], 1);
  537. PlayerTextDrawColor(playerid, Textdraw5[playerid], -1);
  538. PlayerTextDrawSetShadow(playerid, Textdraw5[playerid], 0);
  539. PlayerTextDrawSetOutline(playerid, Textdraw5[playerid], 1);
  540. PlayerTextDrawBackgroundColor(playerid, Textdraw5[playerid], 51);
  541. PlayerTextDrawFont(playerid, Textdraw5[playerid], 2);
  542. PlayerTextDrawSetProportional(playerid, Textdraw5[playerid], 1);*/
  543.  
  544. Textdraw6[playerid] = CreatePlayerTextDraw(playerid, 493.750000, 415.916564, "OSTECENJE : 1000");
  545. PlayerTextDrawLetterSize(playerid, Textdraw6[playerid], 0.192498, 1.436666);
  546. PlayerTextDrawAlignment(playerid, Textdraw6[playerid], 1);
  547. PlayerTextDrawColor(playerid, Textdraw6[playerid], -1);
  548. PlayerTextDrawSetShadow(playerid, Textdraw6[playerid], 0);
  549. PlayerTextDrawSetOutline(playerid, Textdraw6[playerid], 1);
  550. PlayerTextDrawBackgroundColor(playerid, Textdraw6[playerid], 51);
  551. PlayerTextDrawFont(playerid, Textdraw6[playerid], 2);
  552. PlayerTextDrawSetProportional(playerid, Textdraw6[playerid], 1);
  553. //-------------------------------------------------//
  554. Obrisani(playerid);
  555.  
  556. if(fexist(UserPath(playerid)))
  557. {
  558. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  559. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Prijavljivanje","Ukucajte lozinku da bi se ulogovali","Prijavi se","Izadji");
  560. }
  561. else if( !fexist(UserPath(playerid)))
  562. {
  563. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Registracija","Ukucajte lozinku da bi se registrovali.","Registruj se","Izadji");
  564. }
  565.  
  566. return 1;
  567. }
  568.  
  569. public OnPlayerDisconnect(playerid, reason)
  570. {
  571. if(IznajmioVozilo[ playerid ] != 0) {
  572. KillTimer(RentTimer[ playerid ]);
  573. DestroyVehicle(RentVeh[ playerid ]);
  574. Delete3DTextLabel(RentVehLabel[ RentVeh[ playerid ] ]);
  575. IznajmioVozilo[ playerid ] = 0;
  576. RentOdabir[ playerid ] = 0;
  577. RentVreme[ playerid ] = 0;
  578. RentVeh[ playerid ] = 0;
  579. }
  580. PlayerTextDrawDestroy( playerid, Textdraw2[ playerid ] );
  581. PlayerTextDrawDestroy( playerid, Textdraw3[ playerid ] );
  582. PlayerTextDrawDestroy( playerid, Textdraw4[ playerid ] );
  583. //PlayerTextDrawDestroy( playerid, Textdraw5[ playerid ] ); // za gorivo
  584. PlayerTextDrawDestroy( playerid, Textdraw6[ playerid ] );
  585. ////////
  586. new INI:File = INI_Open(UserPath(playerid));
  587. INI_SetTag(File,"data");
  588. INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
  589. INI_WriteInt(File,"Level",GetPlayerScore(playerid));
  590. INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  591. INI_WriteInt(File,"Zatvoren",PlayerInfo[playerid][pZatvoren]);
  592. INI_WriteInt(File,"Ubistva",PlayerInfo[playerid][pUbistva]);
  593. INI_WriteInt(File,"Smrti",PlayerInfo[playerid][pSmrti]);
  594. INI_Close(File);
  595. return 1;
  596. }
  597.  
  598. public OnPlayerSpawn(playerid)
  599. {
  600. //----------------VISA GLAVE-----------------//
  601. if(PlayerInfo[playerid][pAdmin] < 1)
  602. {
  603. SetPlayerChatBubble( playerid , "[ ADMIN 1 ]", 0x33CCFFAA, 25.0, 10000);
  604. }
  605. else if(PlayerInfo[playerid][pAdmin] < 2)
  606. {
  607. SetPlayerChatBubble( playerid , "[ ADMIN 2 ]", 0x33CCFFAA, 25.0, 10000);
  608. }
  609. else if(PlayerInfo[playerid][pAdmin] < 3)
  610. {
  611. SetPlayerChatBubble( playerid , "[ ADMIN 3 ]", 0x33CCFFAA, 25.0, 10000);
  612. }
  613. else if(PlayerInfo[playerid][pAdmin] < 4)
  614. {
  615. SetPlayerChatBubble( playerid , "[ ELITE ADMIN]", 0x33CCFFAA, 25.0, 10000);
  616. }
  617. else if(PlayerInfo[playerid][pAdmin] < 5)
  618. {
  619. SetPlayerChatBubble( playerid , "[ DIREKTOR ]", 0x33CCFFAA, 25.0, 10000);
  620. }
  621. else if(PlayerInfo[playerid][pAdmin] < 6)
  622. {
  623. SetPlayerChatBubble( playerid , "[ VLASNIK ]", 0x33CCFFAA, 25.0, 10000);
  624. }
  625. //------------------------------------------------------------------------------
  626.  
  627. if(PlayerInfo[playerid][pProveraSpawna] == 1 && PlayerInfo[playerid][pPosedovanjeKuce] != -1)
  628. {
  629. new i = PlayerInfo[playerid][pPosedovanjeKuce];
  630. SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0);
  631. SetPlayerPos(playerid, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]);
  632. }
  633. if(PlayerInfo[playerid][pProveraSpawna] == 2)
  634. {
  635. new i = PlayerInfo[playerid][pRent];
  636. SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0);
  637. SetPlayerPos(playerid, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]);
  638. }
  639. //-----------------------------------------------------
  640. return 1;
  641. }
  642.  
  643. public OnPlayerDeath(playerid, killerid, reason)
  644. {
  645. for(new i = 0; i < 1; i++)
  646. {
  647. if(PlayerInfo[i][pAdmin] < 1)
  648. {
  649. SendDeathMessage(killerid, playerid, reason);
  650. }
  651. }
  652. PlayerInfo[killerid][pUbistva]++;
  653. PlayerInfo[playerid][pSmrti]++;
  654.  
  655. return 1;
  656. }
  657.  
  658. public OnVehicleSpawn(vehicleid)
  659. {
  660. return 1;
  661. }
  662.  
  663. public OnVehicleDeath(vehicleid, killerid)
  664. {
  665. return 1;
  666. }
  667.  
  668. public OnPlayerText(playerid, text[])
  669. {
  670. SetPlayerColor(playerid, 0x33AA33AA);
  671. return 1;
  672. }
  673.  
  674. public OnPlayerCommandText(playerid, cmdtext[])
  675. {
  676. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  677. {
  678. // Do something here
  679. return 1;
  680. }
  681. return 0;
  682. }
  683.  
  684. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  685. {
  686.  
  687. return 1;
  688. }
  689.  
  690. public OnPlayerExitVehicle(playerid, vehicleid)
  691. {
  692. PlayerTextDrawHide( playerid, Textdraw2[ playerid ] );
  693. PlayerTextDrawHide( playerid, Textdraw3[ playerid ] );
  694. PlayerTextDrawHide( playerid, Textdraw4[ playerid ] );
  695. //PlayerTextDrawHide( playerid, Textdraw5[ playerid ] ); // za gorivo
  696. PlayerTextDrawHide( playerid, Textdraw6[ playerid ] );
  697. return 1;
  698. }
  699.  
  700. public OnPlayerStateChange(playerid, newstate, oldstate)
  701. {
  702. if(newstate == PLAYER_STATE_DRIVER) {
  703. if(TipVozila[ playerid ] == 1 && RentVeh[ playerid ] != GetPlayerVehicleID(playerid)) {
  704. RemovePlayerFromVehicle(playerid);
  705. SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Rentano vozilo.");
  706. }
  707. }
  708. if(newstate == PLAYER_STATE_DRIVER)
  709. {
  710. PlayerTextDrawShow( playerid, Textdraw2[ playerid ] );
  711. PlayerTextDrawShow( playerid, Textdraw3[ playerid ] );
  712. PlayerTextDrawShow( playerid, Textdraw4[ playerid ] );
  713. PlayerTextDrawShow( playerid, Textdraw6[ playerid ] );
  714. }
  715. return 1;
  716. }
  717.  
  718. public OnPlayerEnterCheckpoint(playerid)
  719. {
  720. return 1;
  721. }
  722.  
  723. public OnPlayerLeaveCheckpoint(playerid)
  724. {
  725. return 1;
  726. }
  727.  
  728. public OnPlayerEnterRaceCheckpoint(playerid)
  729. {
  730. return 1;
  731. }
  732.  
  733. public OnPlayerLeaveRaceCheckpoint(playerid)
  734. {
  735. return 1;
  736. }
  737.  
  738. public OnRconCommand(cmd[])
  739. {
  740. return 1;
  741. }
  742.  
  743. public OnPlayerRequestSpawn(playerid)
  744. {
  745. return 1;
  746. }
  747.  
  748. public OnObjectMoved(objectid)
  749. {
  750. return 1;
  751. }
  752.  
  753. public OnPlayerObjectMoved(playerid, objectid)
  754. {
  755. return 1;
  756. }
  757.  
  758. public OnPlayerPickUpPickup(playerid, pickupid)
  759. {
  760. return 1;
  761. }
  762.  
  763. public OnVehicleMod(playerid, vehicleid, componentid)
  764. {
  765. return 1;
  766. }
  767.  
  768. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  769. {
  770. return 1;
  771. }
  772.  
  773. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  774. {
  775. return 1;
  776. }
  777.  
  778. public OnPlayerSelectedMenuRow(playerid, row)
  779. {
  780. return 1;
  781. }
  782.  
  783. public OnPlayerExitedMenu(playerid)
  784. {
  785. return 1;
  786. }
  787.  
  788. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  789. {
  790. return 1;
  791. }
  792.  
  793. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  794. {
  795. if(newkeys == KEY_YES) {
  796. if(NargiluIznajmio[ playerid ] != 0) {
  797. for(new i; i < sizeof(NargilaInfo); i++) {
  798. if(IsPlayerInRangeOfPoint(playerid, 3.0, NargilaInfo[ i ][ nargilaPosX ], NargilaInfo[ i ][ nargilaPosY ], NargilaInfo[ i ][ nargilaPosZ ])) {
  799. new vreme = gettime();
  800. if(vreme < (UvukoDim[ playerid ] + 5)) return 0;
  801. ApplyAnimation(playerid,"SMOKING","M_smk_drag",4.1,0,0,0,0,0,1);
  802. NargilaDim[ i ] = CreateObject(18716,NargilaInfo[ i ][ nargilaPosX ], NargilaInfo[ i ][ nargilaPosY ], NargilaInfo[ i ][ nargilaPosZ ],0.0000000,0.0000000,0.0000000);
  803. SetTimerEx("DimNargile", 3000, false, "i", i);
  804. UvukoDim[ playerid ] = gettime();
  805. }
  806. }
  807. }
  808. }
  809. //--------------------------------------
  810. if(newkeys == KEY_CROUCH) {
  811. for(new i; i < MAX_PRIVKAPIJE; i++) {
  812. if(IsPlayerInRangeOfPoint(playerid, 6.0, PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ])) {
  813. if(!PkInfo[ i ][ pkForVips ] && !PkInfo[ i ][ pkForAll ]) {
  814. if(!strcmp(GetName(playerid), PkInfo[ i ][ pkForPlayer ], true)) {
  815. if(!PkInfo[ i ][ pkOtvorena ]) {
  816. ClosePKTimer[ i ] = SetTimerEx("TimerClosePK", PkInfo[ i ][ pkCloseTime ]*1000, false, "i", i);
  817. MoveObject(PkInfo[ i ][ pkID ], PkInfo[ i ][ pkoX ], PkInfo[ i ][ pkoY ], PkInfo[ i ][ pkoZ ], PkInfo[ i ][ pkCloseSpeed ], PkInfo[ i ][ pkoRX ], PkInfo[ i ][ pkoRY ], PkInfo[ i ][ pkoRZ ]);
  818. SendClientMessage(playerid, -1, "Otvorili ste kapiju, zatvorice se automatski.");
  819. PkInfo[ i ][ pkOtvorena ] = true;
  820. }
  821. else {
  822. KillTimer(ClosePKTimer[ i ]);
  823. MoveObject(PkInfo[ i ][ pkID ], PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], PkInfo[ i ][ pkCloseSpeed ], PkInfo[ i ][ pkRX ], PkInfo[ i ][ pkRY ], PkInfo[ i ][ pkRZ ]);
  824. SendClientMessage(playerid, -1, "Zatvorili ste kapiju.");
  825. PkInfo[ i ][ pkOtvorena ] = false;
  826. }
  827. }
  828. else return SendClientMessage(playerid, -1, "Nije Vasa kapija.");
  829. }
  830. else if(PkInfo[ i ][ pkForVips ]) {
  831. //if(PlayerInfo[ playerid ][ pVIP ] > 0) {
  832. if(!PkInfo[ i ][ pkOtvorena ]) {
  833. ClosePKTimer[ i ] = SetTimerEx("TimerClosePK", PkInfo[ i ][ pkCloseTime ]*1000, false, "i", i);
  834. MoveObject(PkInfo[ i ][ pkID ], PkInfo[ i ][ pkoX ], PkInfo[ i ][ pkoY ], PkInfo[ i ][ pkoZ ], PkInfo[ i ][ pkCloseSpeed ], PkInfo[ i ][ pkoRX ], PkInfo[ i ][ pkoRY ], PkInfo[ i ][ pkoRZ ]);
  835. SendClientMessage(playerid, -1, "Otvorili ste kapiju, zatvorice se automatski.");
  836. PkInfo[ i ][ pkOtvorena ] = true;
  837. }
  838. else {
  839. KillTimer(ClosePKTimer[ i ]);
  840. MoveObject(PkInfo[ i ][ pkID ], PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], PkInfo[ i ][ pkCloseSpeed ], PkInfo[ i ][ pkRX ], PkInfo[ i ][ pkRY ], PkInfo[ i ][ pkRZ ]);
  841. SendClientMessage(playerid, -1, "Zatvorili ste kapiju.");
  842. PkInfo[ i ][ pkOtvorena ] = false;
  843. }
  844. //}
  845. //else return SendClientMessage(playerid, -1, "Niste VIP.");
  846. }
  847. else if(PkInfo[ i ][ pkForAll ]) {
  848. if(!PkInfo[ i ][ pkOtvorena ]) {
  849. ClosePKTimer[ i ] = SetTimerEx("TimerClosePK", PkInfo[ i ][ pkCloseTime ]*1000, false, "i", i);
  850. MoveObject(PkInfo[ i ][ pkID ], PkInfo[ i ][ pkoX ], PkInfo[ i ][ pkoY ], PkInfo[ i ][ pkoZ ], PkInfo[ i ][ pkCloseSpeed ], PkInfo[ i ][ pkoRX ], PkInfo[ i ][ pkoRY ], PkInfo[ i ][ pkoRZ ]);
  851. SendClientMessage(playerid, -1, "Otvorili ste kapiju, zatvorice se automatski.");
  852. PkInfo[ i ][ pkOtvorena ] = true;
  853. }
  854. else {
  855. KillTimer(ClosePKTimer[ i ]);
  856. MoveObject(PkInfo[ i ][ pkID ], PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], PkInfo[ i ][ pkCloseSpeed ], PkInfo[ i ][ pkRX ], PkInfo[ i ][ pkRY ], PkInfo[ i ][ pkRZ ]);
  857. SendClientMessage(playerid, -1, "Zatvorili ste kapiju.");
  858. PkInfo[ i ][ pkOtvorena ] = false;
  859. }
  860. }
  861. }
  862. }
  863. }
  864. //------------------------------------------------------------------------------
  865. if( newkeys == KEY_SECONDARY_ATTACK )
  866. {
  867. for(new i; i < MAX_KUCA; i++)
  868. {
  869. if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
  870. {
  871. if(KucaInfo[i][kZatvoreno] == 1) return SCM(playerid,-1,""SPLAVA"[Kuca] "SIVA"Zakljucana!");
  872. SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
  873. SetPlayerInterior(playerid, KucaInfo[i][kInt]);
  874. SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
  875. return 1;
  876. }
  877. if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]) && GetPlayerVirtualWorld(playerid) == KucaInfo[i][kVW])
  878. {
  879. SetPlayerInterior(playerid, 0);
  880. SetPlayerVirtualWorld(playerid, 0);
  881. SetPlayerPos(playerid, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]);
  882. return 1;
  883. }
  884. }
  885. }
  886. return 1;
  887. }
  888.  
  889. public OnRconLoginAttempt(ip[], password[], success)
  890. {
  891. return 1;
  892. }
  893.  
  894. public OnPlayerUpdate(playerid)
  895. {
  896. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  897. {
  898. new vstring3[24];
  899. format(vstring3,sizeof(vstring3),"BRZINA : %d KM/H",GetVehicleSpeed(GetPlayerVehicleID(playerid)));
  900. PlayerTextDrawSetString(playerid,Textdraw4[playerid],vstring3);
  901. new vstring2[24];
  902. new Float:HP;
  903. GetVehicleHealth(GetPlayerVehicleID(playerid),HP);
  904. format(vstring2,sizeof(vstring2),"OSTECENJE : %d",HP);
  905. PlayerTextDrawSetString(playerid,Textdraw6[playerid],vstring2);
  906. }
  907. return 1;
  908. }
  909.  
  910. public OnPlayerStreamIn(playerid, forplayerid)
  911. {
  912. return 1;
  913. }
  914.  
  915. public OnPlayerStreamOut(playerid, forplayerid)
  916. {
  917. return 1;
  918. }
  919.  
  920. public OnVehicleStreamIn(vehicleid, forplayerid)
  921. {
  922. return 1;
  923. }
  924.  
  925. public OnVehicleStreamOut(vehicleid, forplayerid)
  926. {
  927. return 1;
  928. }
  929. forward DimNargile(id); public DimNargile(id) { DestroyObject(NargilaDim[ id ]); return 1; }
  930. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  931. {
  932. //--------------------SYS NARGILA-----------------------------------------------
  933. switch(dialogid) {
  934. case DIALOG_NARGILARENT: {
  935. if(response) {
  936. for(new i; i < sizeof(NargilaInfo); i++) {
  937. if(IsPlayerInRangeOfPoint(playerid, 3.0, NargilaInfo[ i ][ nargilaPosX ], NargilaInfo[ i ][ nargilaPosY ], NargilaInfo[ i ][ nargilaPosZ ])) {
  938. if(strval(inputtext) < 1 || strval(inputtext) > 5) return ShowPlayerDialog(playerid, DIALOG_NARGILARENT, DIALOG_STYLE_INPUT, "NARGILA","Upisite vreme iznamljivanja nargile.\nNajmanje - 1 minut, najvise - 5 minuta.","U redu","Odustani");
  939. if(NargiluIznajmio[ playerid ] != 0) return SendClientMessage(playerid, -1, "Vec ste iznajmili nargilu ( /nargilaoff )");
  940. if(NargilaInfo[ i ][ IznajmioNargilu ] != playerid && NargilaInfo[ i ][ IznamljenaNargila ] == true) return SendClientMessage(playerid, -1, "Ta nargila je vec iznamljena.");
  941. NargilaInfo[ i ][ IznajmioNargilu ] = playerid;
  942. NargilaInfo[ i ][ IznamljenaNargila ] = true;
  943. NargiluIznajmio[ playerid ] = i;
  944. new str[ 40 ], pname[ MAX_PLAYER_NAME ];
  945. GetPlayerName(playerid, pname, sizeof(pname));
  946. format(str, sizeof(str), "Nargila iznamljena od\n%s", pname);
  947. Update3DTextLabelText(NargilaLabel[ i ], 0xFFFFFFFF, str);
  948. SendClientMessage(playerid, -1, "Pritisnite Y za pusenje.");
  949. NargilaTimer[ playerid ] = SetTimerEx("UnrentNargila", 60000*strval(inputtext), false, "i", playerid);
  950. }
  951. }
  952. }
  953. }
  954. }
  955. //--------------------SYS KAPIJA------------------------------------------------
  956. if(dialogid == DIALOG_GATECREATE) {
  957. if(response) {
  958. switch(listitem) {
  959. case 0: {
  960. // ZA V.I.P
  961. }
  962. case 1: { ShowPlayerDialog(playerid, DIALOG_GATECREATE2, DIALOG_STYLE_INPUT, "KREIRANJE PRIVATNE KAPIJE","Unesite ime igraca za koga je ova kapija.","U redu","Izlaz"); }
  963. case 2: {
  964. new Float:X, Float:Y, Float:Z, i = KreiraPK[ playerid ];
  965. PkInfo[ i ][ pkForAll ] = true;
  966. GetPlayerPos(playerid, X,Y,Z);
  967. PkInfo[ i ][ pkID ] = CreateObject(PkInfo[ i ][ pkObjID ], X+3,Y+3,Z, 0.0, 0.0, 0.0);
  968. EditObject(playerid, PkInfo[ i ][ pkID ]);
  969. SendClientMessage(playerid, -1, "Sacuvajte pozicije kapije.");
  970. }
  971. }
  972. }
  973. }
  974. else if(dialogid == DIALOG_GATECREATE2) {
  975. if(!response) return 0;
  976. new ime[ MAX_PLAYER_NAME ], i = KreiraPK[ playerid ], Float:X, Float:Y, Float:Z;
  977. if(sscanf(inputtext, "s[24]", ime)) return ShowPlayerDialog(playerid, DIALOG_GATECREATE2, DIALOG_STYLE_INPUT, "KREIRANJE PRIVATNE KAPIJE","Unesite ime igraca za koga je ova kapija.","U redu","Izlaz");
  978. PkInfo[ i ][ pkForPlayer ] = ime;
  979. GetPlayerPos(playerid, X,Y,Z);
  980. PkInfo[ i ][ pkID ] = CreateObject(PkInfo[ i ][ pkObjID ], X+3,Y+3,Z, 0.0, 0.0, 0.0);
  981. EditObject(playerid, PkInfo[ i ][ pkID ]);
  982. SendClientMessage(playerid, -1, "Sacuvajte pozicije kapije.");
  983. }
  984. //------------------SYS TRAFIKA-------------------------------------------------
  985. if( dialogid == dialog_TRAFIKA ) {
  986. if( !response ) return true;
  987. switch( listitem ) {
  988. case 0: {
  989. if( GetPlayerMoney( playerid ) < 50 ) return SCM( playerid, -1, "{008467}[ {FFFFFF}TRAFIKA {008467}]: {FFFFFF}Nemas dovoljno novca." );
  990. SCM( playerid, -1, "{008467}[ {FFFFFF}TRAFIKA {008467}]: {FFFFFF}Kupili ste cokoladicu." );
  991. SetPlayerHealth( playerid, 50.0 );
  992. GivePlayerMoney( playerid, -50 );
  993. }
  994. case 1: {
  995. if( GetPlayerMoney( playerid ) < 500 ) return SCM( playerid, -1, "{008467}[ {FFFFFF}TRAFIKA {008467}]: {FFFFFF}Nemas dovoljno novca." );
  996. SCM( playerid, -1, "{008467}[ {FFFFFF}TRAFIKA {008467}]: {FFFFFF}Kupili ste pomfrit." );
  997. SetPlayerHealth( playerid, 99.0 );
  998. GivePlayerMoney( playerid, -500 );
  999. }
  1000. }
  1001. }
  1002. //------------AKTOR SYS-----------------//
  1003. if(dialogid == DIALOG_AKTORPANEL) {
  1004. if(!response) return 1;
  1005. if(response) {
  1006. switch(listitem) {
  1007. case 0: return ShowPlayerDialog(playerid, DIALOG_KREIRAJAKTORA1, DIALOG_STYLE_INPUT, "{0077C7}KREIRANJE {FFFFFF}AKTORA", "Unesite ID skina aktora.\nPrimer: 294", "U redu", "Izlaz");
  1008. case 1: return ShowPlayerDialog(playerid, DIALOG_AKTORANIMACIJA, DIALOG_STYLE_LIST, "{0077C7}ANIMACIJA {FFFFFF}AKTORA", "Animacija 1\n Animacija 2\nAnimacija 3", "Izaberi", "Izlaz");
  1009. case 2: return ShowPlayerDialog(playerid, DIALOG_IZMENIAKTORA, DIALOG_STYLE_LIST, "{0077C7}IZMENI {FFFFFF}AKTORA", "Promeni poziciju\nPromeni skin\nPromeni ime\nPromeni animaciju", "Izaberi", "Izlaz");
  1010. case 3: return ShowPlayerDialog(playerid, DIALOG_IZBRISIAKTORA, DIALOG_STYLE_LIST, "{0077C7}IZBRISI {FFFFFF}AKTORA", "Najblizeg aktora\nID aktora", "Izaberi", "Izlaz");
  1011. }
  1012. }
  1013. }
  1014. else if(dialogid == DIALOG_KREIRAJAKTORA1) {
  1015. if(!response) return 1;
  1016. if(response) {
  1017. new skinid, i = NextAktorID(MAX_AKTORI), Float:X, Float:Y, Float:Z, Float:A;
  1018. if(sscanf(inputtext, "d", skinid)) return ShowPlayerDialog(playerid, DIALOG_KREIRAJAKTORA1, DIALOG_STYLE_INPUT, "{0077C7}KREIRANJE {FFFFFF}AKTORA", "Unesite ID skina aktora.\nPrimer: 294", "U redu", "Izlaz");
  1019. if(skinid > 311) return ShowPlayerDialog(playerid, DIALOG_KREIRAJAKTORA1, DIALOG_STYLE_INPUT, "{FF1414}NEPOSTOJECI ID SKINA {FFFFFF}(0-311)", "Unesite ID skina aktora.\nPrimer: 294", "U redu", "Izlaz");
  1020. GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid, A);
  1021. AktorInfo[ i ][ aktorX ] = X; AktorInfo[ i ][ aktorY ] = Y; AktorInfo[ i ][ aktorZ ] = Z; AktorInfo[ i ][ aktorA ] = A;
  1022. AktorInfo[ i ][ aktorskin ] = skinid;
  1023. AktorInfo[ i ][ aktoranimacija ] = 0;
  1024. KreiraAktora[ playerid ] = i;
  1025. ShowPlayerDialog(playerid, DIALOG_KREIRAJAKTORA2, DIALOG_STYLE_INPUT, "{0077C7}KREIRANJE {FFFFFF}AKTORA", "Unesite ime aktora.\nPrimer: MINKICA", "U redu", "Izlaz");
  1026. }
  1027. }
  1028. else if(dialogid == DIALOG_KREIRAJAKTORA2) {
  1029. if(!response) return 1;
  1030. if(response) {
  1031. new aktornick[ 40 ], str[ 56 ], i = KreiraAktora[ playerid ];
  1032. if(sscanf(inputtext, "s[40]", aktornick)) return ShowPlayerDialog(playerid, DIALOG_KREIRAJAKTORA2, DIALOG_STYLE_INPUT, "{0077C7}KREIRANJE {FFFFFF}AKTORA", "Unesite ime aktora.\nPrimer: MINKICA", "U redu", "Izlaz");
  1033. AktorInfo[ i ][ aktorime ] = aktornick;
  1034. AktorInfo[ i ][ aktorid ] = CreateActor(AktorInfo[ i ][ aktorskin ], AktorInfo[ i ][ aktorX ], AktorInfo[ i ][ aktorY ], AktorInfo[ i ][ aktorZ ], AktorInfo[ i ][ aktorA ]);
  1035. SetPlayerPos(playerid, AktorInfo[ i ][ aktorX ]+2, AktorInfo[ i ][ aktorY ]+2, AktorInfo[ i ][ aktorZ ]);
  1036. format(str, sizeof(str), "%s {0077C7}[ID %d]", aktornick, i);
  1037. AktorLabel[ i ] = Create3DTextLabel(str, 0xFFFFFFFF, AktorInfo[ i ][ aktorX ], AktorInfo[ i ][ aktorY ], AktorInfo[ i ][ aktorZ ]+1.0, 10.0, 0);
  1038. SaveAktor(i);
  1039. SendClientMessage(playerid, 0x0077C7FF, "[AKTOR SYSTEM] {FFFFFF}Ukoliko zelite da dodate aktoru animaciju - {0077C7}/aktorpanel");
  1040. }
  1041. }
  1042. else if(dialogid == DIALOG_IZMENIAKTORA) {
  1043. if(!response) return 1;
  1044. if(response) {
  1045. switch(listitem) {
  1046. case 0: return ShowPlayerDialog(playerid, DIALOG_IZMENIPOZICIJU, DIALOG_STYLE_INPUT, "{0077C7}MENJANJE {FFFFFF}POZICIJE", "Unesite ID aktora.", "U redu", "Izlaz");
  1047. case 1: return ShowPlayerDialog(playerid, DIALOG_IZMENISKIN, DIALOG_STYLE_INPUT, "{0077C7}MENJANJE {FFFFFF}SKINA", "Unesite ID skina.\n{FF1414}NAPOMENA: {FFFFFF}Menja skin aktoru najblizem Vama.", "U redu", "Izlaz");
  1048. case 2: return ShowPlayerDialog(playerid, DIALOG_IZMENIIME, DIALOG_STYLE_INPUT, "{0077C7}MENJANJE {FFFFFF}IMENA", "Unesite novo ime.\n{FF1414}NAPOMENA: {FFFFFF}Menja ime aktoru najblizem Vama.", "U redu", "Izlaz");
  1049. case 3: return ShowPlayerDialog(playerid, DIALOG_IZMENIANIMACIJU, DIALOG_STYLE_LIST, "{0077C7}Menja animaciju aktoru najblizem Vama", "Animacija 1\n Animacija 2\nAnimacija 3", "Izaberi","Izlaz");
  1050. }
  1051. }
  1052. }
  1053. else if(dialogid == DIALOG_IZMENIPOZICIJU) {
  1054. if(!response) return 1;
  1055. if(response) {
  1056. new i, Float:X, Float:Y, Float:Z, Float:A, str[ 60 ];
  1057. if(sscanf(inputtext, "d", i)) return ShowPlayerDialog(playerid, DIALOG_IZMENIPOZICIJU, DIALOG_STYLE_INPUT, "{0077C7}MENJANJE {FFFFFF}POZICIJE", "Unesite ID aktora.", "U redu", "Izlaz");
  1058. GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid, A);
  1059. SetPlayerPos(playerid, X+2, Y+2, Z);
  1060. SetActorPos(AktorInfo[ i ][ aktorid ], X, Y, Z);
  1061. SetActorFacingAngle(AktorInfo[ i ][ aktorid ], A);
  1062. Delete3DTextLabel(AktorLabel[ i ]);
  1063. format(str, sizeof(str), "%s {0077C7}[ID %d]", AktorInfo[ i ][ aktorime ], i);
  1064. AktorLabel[ i ] = Create3DTextLabel(str, 0xFFFFFFFF, X,Y,Z+1.0, 10.0, 0);
  1065. AktorInfo[ i ][ aktorX ] = X; AktorInfo[ i ][ aktorY ] = Y; AktorInfo[ i ][ aktorZ ] = Z; AktorInfo[ i ][ aktorA ] = A;
  1066. SaveAktor(i);
  1067. SendClientMessage(playerid, 0x0077C7FF, "[AKTOR SYSTEM] {FFFFFF}Uspesno ste promenili poziciju aktoru.");
  1068. }
  1069. }
  1070. else if(dialogid == DIALOG_IZMENISKIN) {
  1071. if(!response) return 1;
  1072. if(response) {
  1073. new skinid, i = GetNearestAktor(playerid);
  1074. if(i == -1) return SendClientMessage(playerid, 0x0077C7FF, "[AKTOR SYSTEM] {FFFFFF}Niste blizu aktora.");
  1075. if(sscanf(inputtext, "d", skinid)) return ShowPlayerDialog(playerid, DIALOG_IZMENISKIN, DIALOG_STYLE_INPUT, "{0077C7}MENJANJE {FFFFFF}SKINA", "Unesite ID skina.\n{FF1414}NAPOMENA: {FFFFFF}Menja skin aktoru najblizem Vama.", "U redu", "Izlaz");
  1076. if(skinid > 311) return ShowPlayerDialog(playerid, DIALOG_KREIRAJAKTORA1, DIALOG_STYLE_INPUT, "{FF1414}NEPOSTOJECI ID SKINA {FFFFFF}(0-311)", "Unesite ID skina aktora.\nPrimer: 294", "U redu", "Izlaz");
  1077. DestroyActor(AktorInfo[ i ][ aktorid ]);
  1078. AktorInfo[ i ][ aktorid ] = CreateActor(skinid, AktorInfo[ i ][ aktorX ], AktorInfo[ i ][ aktorY ] , AktorInfo[ i ][ aktorZ ], AktorInfo[ i ][ aktorA ]);
  1079. AktorInfo[ i ][ aktorskin ] = skinid;
  1080. SaveAktor(i);
  1081. SendClientMessage(playerid, 0x0077C7FF, "[AKTOR SYSTEM] {FFFFFF}Uspesno ste promenili skin aktoru.");
  1082. }
  1083. }
  1084. else if(dialogid == DIALOG_IZMENIIME) {
  1085. if(!response) return 1;
  1086. if(response) {
  1087. new actime[ 40 ], str[ 60 ], i = GetNearestAktor(playerid);
  1088. if(i == -1) return SendClientMessage(playerid, 0x0077C7FF, "[AKTOR SYSTEM] {FFFFFF}Niste blizu aktora.");
  1089. if(sscanf(inputtext, "s[40]", actime)) return ShowPlayerDialog(playerid, DIALOG_IZMENIIME, DIALOG_STYLE_INPUT, "{0077C7}MENJANJE {FFFFFF}IMENA", "Unesite novo ime.\n{FF1414}NAPOMENA: {FFFFFF}Menja ime aktoru najblizem Vama.", "U redu", "Izlaz");
  1090. format(str, sizeof(str), "%s {0077C7}[ID %d]", actime, i);
  1091. Update3DTextLabelText(AktorLabel[ i ], 0xFFFFFFFF, str);
  1092. AktorInfo[ i ][ aktorime ] = actime;
  1093. SaveAktor(i);
  1094. SendClientMessage(playerid, 0x0077C7FF, "[AKTOR SYSTEM] {FFFFFF}Uspesno ste promenili ime aktoru.");
  1095. }
  1096. }
  1097. else if(dialogid == DIALOG_IZBRISIAKTORA) {
  1098. if(!response) return 1;
  1099. if(response) {
  1100. switch(listitem) {
  1101. case 0: {
  1102. if(GetNearestAktor(playerid) == -1) return SendClientMessage(playerid, 0x0077C7FF, "[AKTOR SYSTEM] {FFFFFF}Niste blizu aktora.");
  1103. new i = GetNearestAktor(playerid), aktorFile[ 60 ], str[ 60 ];
  1104. DestroyActor(AktorInfo[ i ][ aktorid ]);
  1105. Delete3DTextLabel(AktorLabel[ i ]);
  1106. AktorInfo[ i ][ aktorX ] = 0.0; AktorInfo[ i ][ aktorY ] = 0.0; AktorInfo[ i ][ aktorZ ] = 0.0; AktorInfo[ i ][ aktorA ] = 0.0;
  1107. format(str, sizeof(str), "[AKTOR SYSTEM] {FFFFFF}Uspesno ste obrisali aktora ID %d.", i);
  1108. SendClientMessage(playerid, 0x0077C7FF, str);
  1109. format(aktorFile, sizeof(aktorFile), AKTOR_FILE, i);
  1110. if(fexist(aktorFile)) { fremove(aktorFile); }
  1111. }
  1112. case 1: return ShowPlayerDialog(playerid, DIALOG_BRISANJEAKTORA, DIALOG_STYLE_INPUT, "{0077C7}BRISANJE {FFFFFF}AKTORA", "Unesite ID aktora.","U redu","Izlaz");
  1113. }
  1114. }
  1115. }
  1116. else if(dialogid == DIALOG_BRISANJEAKTORA) {
  1117. if(!response) return 1;
  1118. if(response) {
  1119. new i, str[ 60 ], aktorFile[ 60 ];
  1120. if(sscanf(inputtext, "%d", i)) return ShowPlayerDialog(playerid, DIALOG_BRISANJEAKTORA, DIALOG_STYLE_INPUT, "{0077C7}BRISANJE {FFFFFF}AKTORA", "Unesite ID aktora.","U redu","Izlaz");
  1121. DestroyActor(AktorInfo[ i ][ aktorid ]);
  1122. Delete3DTextLabel(AktorLabel[ i ]);
  1123. AktorInfo[ i ][ aktorX ] = 0.0; AktorInfo[ i ][ aktorY ] = 0.0; AktorInfo[ i ][ aktorZ ] = 0.0; AktorInfo[ i ][ aktorA ] = 0.0;
  1124. format(str, sizeof(str), "[AKTOR SYSTEM] {FFFFFF}Uspesno ste obrisali aktora ID %d.", i);
  1125. SendClientMessage(playerid, 0x0077C7FF, str);
  1126. format(aktorFile, sizeof(aktorFile), AKTOR_FILE, i);
  1127. if(fexist(aktorFile)) { fremove(aktorFile); }
  1128. }
  1129. }
  1130. else if(dialogid == DIALOG_AKTORANIMACIJA) {
  1131. // IN NEXT UPDATE
  1132. }
  1133. //--------------------------------------
  1134. switch(dialogid) {
  1135. case DIALOG_RENT: {
  1136. if(!response) return 1;
  1137. switch(listitem) {
  1138. case 0: {
  1139. RentOdabir[ playerid ] = 1;
  1140. ShowPlayerDialog(playerid, DIALOG_RENTVREME, DIALOG_STYLE_INPUT, "{0077C7}Iznamljivanje {FFFFFF}vozila","{FFFFFF}Unesite vreme na koliko ce te iznajmiti vozilo.\nMinimalno vreme - 1 minut.\nMaksimalno vreme - 30 minuta.\nCena - 1 minut = 100$","U redu","Izlaz");
  1141. }
  1142. case 1: {
  1143. RentOdabir[ playerid ] = 2;
  1144. ShowPlayerDialog(playerid, DIALOG_RENTVREME, DIALOG_STYLE_INPUT, "{0077C7}Iznamljivanje {FFFFFF}vozila","{FFFFFF}Unesite vreme na koliko ce te iznajmiti vozilo.\nMinimalno vreme - 1 minut.\nMaksimalno vreme - 30 minuta.\nCena - 1 minut = 70$","U redu","Izlaz");
  1145. }
  1146. }
  1147. }
  1148. case DIALOG_RENTVREME: {
  1149. if(!response) return 1;
  1150. new i = GetNearestRent(playerid);
  1151. if(RentOdabir[ playerid ] == 1) {
  1152. new vreme;
  1153. if(GetPlayerMoney(playerid) < RentVreme[ playerid ]*100) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Nemate dovoljno novca.");
  1154. if(sscanf(inputtext, "d", vreme)) return ShowPlayerDialog(playerid, DIALOG_RENTVREME, DIALOG_STYLE_INPUT, "{0077C7}Iznamljivanje {FFFFFF}vozila","{FFFFFF}Unesite vreme na koliko ce te iznajmiti vozilo.\nMinimalno vreme - 1 minut.\nMaksimalno vreme - 30 minuta.\nCena - 1 minut = 100$","U redu","Izlaz");
  1155. if(vreme < 1 || vreme > 30) return ShowPlayerDialog(playerid, DIALOG_RENTVREME, DIALOG_STYLE_INPUT, "{0077C7}Iznamljivanje {FFFFFF}vozila","{FFFFFF}Unesite vreme na koliko ce te iznajmiti vozilo.\nMinimalno vreme - 1 minut.\nMaksimalno vreme - 30 minuta.\nCena - 1 minut = 100$","U redu","Izlaz");
  1156. RentVreme[ playerid ] = vreme;
  1157. RentVeh[ playerid ] = CreateVehicle(405, RentInfo[ i ][ rentX ]+2, RentInfo[ i ][ rentY ]+2, RentInfo[ i ][ rentZ ], 0.0, 1, 1, -1);
  1158. PutPlayerInVehicle(playerid, RentVeh[ playerid ], 0);
  1159. IznajmioVozilo[ playerid ] = GetPlayerVehicleID(playerid);
  1160. GivePlayerMoney(playerid, -RentVreme[ playerid ]*100);
  1161. RentTimer[ playerid ] = SetTimerEx("TimerRent", 60000, true, "i", playerid);
  1162. SendClientMessage(playerid, 0x0077C7FF, "[RENT] {FFFFFF}Uspesno ste iznajmili vozilo.");
  1163. RentVehLabel[ RentVeh[ playerid ] ] = Create3DTextLabel("[RENTANO VOZILO]", 0x0077C7FF, RentInfo[ i ][ rentX ]+2, RentInfo[ i ][ rentY ]+2, RentInfo[ i ][ rentZ ], 10.0, 0, 0);
  1164. Attach3DTextLabelToVehicle(RentVehLabel[ RentVeh[ playerid ] ], RentVeh[ playerid ], 0.0, 0.0, 0.0);
  1165. TipVozila[ RentVeh[ playerid ] ] = 1; // 1 - Rent Vozilo
  1166. }
  1167. else if(RentOdabir[ playerid ] == 2) {
  1168. new vreme;
  1169. if(GetPlayerMoney(playerid) < RentVreme[ playerid ]*70) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Nemate dovoljno novca.");
  1170. if(sscanf(inputtext, "d", vreme)) return ShowPlayerDialog(playerid, DIALOG_RENTVREME, DIALOG_STYLE_INPUT, "{0077C7}Iznamljivanje {FFFFFF}vozila","{FFFFFF}Unesite vreme na koliko ce te iznajmiti vozilo.\nMinimalno vreme - 1 minut.\nMaksimalno vreme - 30 minuta.\nCena - 1 minut = 70$","U redu","Izlaz");
  1171. if(vreme < 1 || vreme > 30) return ShowPlayerDialog(playerid, DIALOG_RENTVREME, DIALOG_STYLE_INPUT, "{0077C7}Iznamljivanje {FFFFFF}vozila","{FFFFFF}Unesite vreme na koliko ce te iznajmiti vozilo.\nMinimalno vreme - 1 minut.\nMaksimalno vreme - 30 minuta.\nCena - 1 minut = 70$","U redu","Izlaz");
  1172. RentVreme[ playerid ] = vreme;
  1173. RentVeh[ playerid ] = CreateVehicle(462, RentInfo[ i ][ rentX ]+2, RentInfo[ i ][ rentY ]+2, RentInfo[ i ][ rentZ ], 0.0, 1, 1, -1);
  1174. PutPlayerInVehicle(playerid, RentVeh[ playerid ], 0);
  1175. IznajmioVozilo[ playerid ] = GetPlayerVehicleID(playerid);
  1176. GivePlayerMoney(playerid, -RentVreme[ playerid ]*70);
  1177. RentTimer[ playerid ] = SetTimerEx("TimerRent", 60000, true, "i", playerid);
  1178. SendClientMessage(playerid, 0x0077C7FF, "[RENT] {FFFFFF}Uspesno ste iznajmili vozilo.");
  1179. RentVehLabel[ RentVeh[ playerid ] ] = Create3DTextLabel("[RENTANO VOZILO]", 0x0077C7FF, RentInfo[ i ][ rentX ]+2, RentInfo[ i ][ rentY ]+2, RentInfo[ i ][ rentZ ], 10.0, 0, 0);
  1180. Attach3DTextLabelToVehicle(RentVehLabel[ RentVeh[ playerid ] ], RentVeh[ playerid ], 0.0, 0.0, 0.0);
  1181. TipVozila[ RentVeh[ playerid ] ] = 1; // 1 - Rent Vozilo
  1182. }
  1183. }
  1184. }
  1185. //---------------------AUTO SALON-------------//
  1186.  
  1187. //--------------------------HOUSE SYS-------------------------------------------
  1188. if(dialogid == DIALOG_KUCA)
  1189. {
  1190. if(!response) return 1;
  1191. if(PlayerInfo[playerid][pPosedovanjeKuce] == -1) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Nemate kucu!");
  1192. new i = PlayerInfo[playerid][pPosedovanjeKuce];
  1193. switch(listitem)
  1194. {
  1195. case 0:
  1196. {
  1197. new string[256];
  1198. SCM(playerid,-1,""ZELENA"|---------------------------------------------------------------------------------------------------|");
  1199. format(string,sizeof(string),""SIVA"Ime Kuce: %s | Vlasnik: %s | Level: %d ",KucaInfo[i][kIme],KucaInfo[i][kVlasnik],KucaInfo[i][kLevel]);
  1200. SCM(playerid,-1,string);
  1201. format(string,sizeof(string),""SIVA"Cena: %d | ID: %d | Novac: %d | Oruzije: %d | Municija: %d",KucaInfo[i][kCena],i,KucaInfo[i][kNovac],KucaInfo[i][kOruzije],KucaInfo[i][kMunicija]);
  1202. SCM(playerid,-1,string);
  1203. SCM(playerid,-1,""ZELENA"|---------------------------------------------------------------------------------------------------|");
  1204. }
  1205. case 1:
  1206. {
  1207. if(KucaInfo[i][kZatvoreno] == 0) return SCM(playerid,-1,"BU:RP | "CRVENA"Vec je otkljucana!");
  1208. KucaInfo[i][kZatvoreno] = 0; SacuvajKucu(i);
  1209. SCM(playerid,-1, ""ZELENA"[BU:RP] "BELA"Kuca otkljucana!");
  1210. }
  1211. case 2:
  1212. {
  1213. if(KucaInfo[i][kZatvoreno] == 1) return SCM(playerid,-1,"BU:RP | "CRVENA"Vec je zakljucana!");
  1214. KucaInfo[i][kZatvoreno] = 1; SacuvajKucu(i);
  1215. SCM(playerid,-1, ""ZELENA"[BU:RP] "BELA"Kuca zakljucana!");
  1216. }
  1217. case 3:
  1218. {
  1219. SPD(playerid,DIALOG_OKNOVAC,DIALOG_STYLE_INPUT, ""ZELENA"Ostavljanje Novca", ""BELA"Unesite kolicinu novca koju zelite da ostavite", "Ostavi", "Izlaz");
  1220. }
  1221. case 4:
  1222. {
  1223. SPD(playerid,DIALOG_UKNOVAC,DIALOG_STYLE_INPUT, ""ZELENA"Uzimanje Novca", ""BELA"Unesite kolicinu novca koju zelite da uzmete", "Uzmi", "Izlaz");
  1224. }
  1225. case 5:
  1226. {
  1227. if(KucaInfo[i][kOruzije] != -1) return SCM(playerid,-1,""ZUTA"Vec imas oruzije u kuci!");
  1228. if(GetPlayerWeapon(playerid) <= 0) return SCM(playerid,-1,"BU:RP | "ZUTA"Nemas oruzije u ruci!");
  1229. KucaInfo[i][kOruzije] = GetPlayerWeapon(playerid); KucaInfo[i][kMunicija] = GetPlayerAmmo(playerid);
  1230. SCM(playerid,-1,""ZUTA"Ostavili ste oruzije u kucu!"); SacuvajKucu(i); SetPlayerAmmo(playerid, GetPlayerWeapon(playerid), 0);
  1231. }
  1232. case 6:
  1233. {
  1234. if(KucaInfo[i][kOruzije] == -1) return SCM(playerid,-1,""ZUTA"Nemas oruzije u kuci!");
  1235. GivePlayerWeapon(playerid,KucaInfo[i][kOruzije],KucaInfo[i][kMunicija]); KucaInfo[i][kOruzije] = -1; KucaInfo[i][kMunicija] = -1;
  1236. SacuvajKucu(i); SCM(playerid,-1,""ZUTA"Uzeli ste oruzije iz vase kuce!");
  1237. }
  1238. case 7:
  1239. {
  1240. new string[60]; GivePlayerMoney(playerid,KucaInfo[i][kCena]);
  1241. KucaInfo[i][kProveraVlasnika] = 0; KucaInfo[i][kNovac] = 0; KucaInfo[i][kOruzije] = -1; KucaInfo[i][kMunicija] = 0;
  1242. KucaInfo[i][kZatvoreno] = 1; strmid(KucaInfo[i][kIme],"Default",0,strlen("Default"),255);
  1243. strmid(KucaInfo[i][kVlasnik], "Niko", 0, strlen("Niko"), 255); PlayerInfo[playerid][pPosedovanjeKuce] = -1;
  1244. SacuvajKucu(i); KuceLP(i);
  1245. format(string,sizeof(string),""ZUTA"Prodali ste kucu za %d!",KucaInfo[i][kCena]);
  1246. SCM(playerid,-1,string);
  1247. }
  1248. case 8:
  1249. {
  1250. SPD(playerid, DIALOG_IKUCA, DIALOG_STYLE_INPUT, ""ZELENA"Kuca Ime", ""BELA"Unesite novo ime kuce", "Promeni", "Izlaz");
  1251. }
  1252. case 9:
  1253. {
  1254. PlayerInfo[playerid][pProveraSpawna] = 1;
  1255. SCM(playerid,-1,""ZUTA"Odabrali ste spawn u kuci od sada cete se spawnovati u kuci!");
  1256. }
  1257. case 10:
  1258. {
  1259. if(KucaInfo[i][kRent] == 0)
  1260. {
  1261. KucaInfo[i][kRent] = 1;
  1262. SCM(playerid,-1,""ZUTA"Odobrili ste rent kuce!");
  1263. }
  1264. else if(KucaInfo[i][kRent] == 1)
  1265. {
  1266. KucaInfo[i][kRent] = 0;
  1267. SCM(playerid,-1,""ZUTA"Zabranili ste rent kuce!");
  1268. }
  1269. }
  1270. case 11:
  1271. {
  1272. if(KucaInfo[i][kRent] == 0) return SCM(playerid,-1,""ZUTA"Na vasoj kuci nije dozvoljen rent pa ne mozete podesavati cenu!");
  1273. SPD(playerid, DIALOG_KRENT, DIALOG_STYLE_INPUT, ""ZELENA"Cena Renta", ""BELA"Unesite novu cenu renta", "Promeni", "Izlaz");
  1274. }
  1275. case 12:
  1276. {
  1277. if(KucaInfo[i][kZvono] == 1) return SCM(playerid,-1,""ZUTA"Vec imas zvono na kuci!");
  1278. if(GetPlayerMoney(playerid) < 5000) return SCM(playerid,-1,""ZUTA"Nemate dovoljno novac!");
  1279. KucaInfo[i][kZvono] = 1; GivePlayerMoney(playerid,-5000); SCM(playerid,-1,""ZUTA"Ugradili ste zvono u vasu kucu!");
  1280. }
  1281. }
  1282. }
  1283. ///////////////////////////////////////////////////
  1284. if(dialogid == DIALOG_KRENT)
  1285. {
  1286. if(response)
  1287. {
  1288. new i = PlayerInfo[playerid][pPosedovanjeKuce],cena;
  1289. if(sscanf(inputtext, "i", cena)) return SPD(playerid, DIALOG_KRENT, DIALOG_STYLE_INPUT, ""ZELENA"Cena Renta", ""BELA"Unesite novu cenu renta", "Promeni", "Izlaz");
  1290. if(cena < 1 || cena > 1000) return SCM(playerid,-1,""ZUTA"Cena ne moze biti manja od 1 i veca od 1000!");
  1291. KucaInfo[i][kCenaRenta] = cena; SacuvajKucu(i); KuceLP(i); SCM(playerid,-1,""ZUTA"Promenili ste cenu renta!");
  1292. }
  1293. }
  1294. ///////////////////////////////////////////////////
  1295. if(dialogid == DIALOG_OKNOVAC)
  1296. {
  1297. if(PlayerInfo[playerid][pPosedovanjeKuce] == -1) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Nemate kucu!");
  1298. new i = PlayerInfo[playerid][pPosedovanjeKuce];
  1299. if(response)
  1300. {
  1301. new iznos,string[256];
  1302. if(sscanf(inputtext, "i", iznos)) return SPD(playerid,DIALOG_OKNOVAC,DIALOG_STYLE_INPUT, ""ZELENA"Ostavljanje Novca", ""BELA"Unesite kolicinu novca koju zelite da ostavite", "Ostavi", "Izlaz");
  1303. if(iznos > GetPlayerMoney(playerid)) return SCM(playerid,-1,"Nemate toliko novca!");
  1304. if(iznos < 1 || iznos > 50000) return SCM(playerid,-1,"Suma ne mozete biti manja od 1 i veca od 50000!");
  1305. KucaInfo[i][kNovac] += iznos; GivePlayerMoney(playerid, -iznos); SacuvajKucu(i);
  1306. format(string,sizeof(string),"BU:RP | "ZELENA"Ostavili ste u kucu %d$!",iznos);
  1307. SCM(playerid,-1,string);
  1308. }
  1309. }
  1310. //////////////////////////////////////////////////
  1311. if(dialogid == DIALOG_UKNOVAC)
  1312. {
  1313. if(PlayerInfo[playerid][pPosedovanjeKuce] == -1) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Nemate kucu!");
  1314. new i = PlayerInfo[playerid][pPosedovanjeKuce];
  1315. if(response)
  1316. {
  1317. new iznos,string[256];
  1318. if(sscanf(inputtext, "i", iznos)) return SPD(playerid,DIALOG_UKNOVAC,DIALOG_STYLE_INPUT, ""ZELENA"Uzimanje Novca", ""BELA"Unesite kolicinu novca koju zelite da uzmete", "Uzmi", "Izlaz");
  1319. if(iznos > KucaInfo[i][kNovac]) return SCM(playerid,-1,"Nemate toliko novca u kuci!");
  1320. if(iznos < 1 || iznos > 50000) return SCM(playerid,-1,"Suma ne mozete biti manja od 1 i veca od 50000!");
  1321. KucaInfo[i][kNovac] -= iznos; GivePlayerMoney(playerid, iznos); SacuvajKucu(i);
  1322. format(string,sizeof(string),"BU:RP | "ZELENA"Uzeli ste iz kucu %d$!",iznos);
  1323. SCM(playerid,-1,string);
  1324. }
  1325. }
  1326. //////////////////////////////////////////////////
  1327. if(dialogid == DIALOG_IKUCA)
  1328. {
  1329. if(response)
  1330. {
  1331. if(PlayerInfo[playerid][pPosedovanjeKuce] == -1) return SCM(playerid,-1, "BU:RP | "ZUTA"Nemate kucu!");
  1332. new ime[40],string[80],i = PlayerInfo[playerid][pPosedovanjeKuce];
  1333. if(sscanf(inputtext, "s[40]", ime)) return SPD(playerid, DIALOG_IKUCA, DIALOG_STYLE_INPUT, ""ZELENA"Kuca Ime", ""BELA"Unesite novo ime kuce", "Promeni", "Izlaz");
  1334. if(strlen(ime) > 40) return SCM(playerid,-1,""CRVENA"Ime kuce ne sme sadrzati vise od 40 znakova!");
  1335. strmid(KucaInfo[i][kIme],ime,0,strlen(ime),255); SacuvajKucu(i); KuceLP(i);
  1336. format(string,sizeof(string),""ZUTA"Vase ime kuce je postavljano na %s!",ime);
  1337. SCM(playerid,-1,string);
  1338. }
  1339. }
  1340. //------------------------------------------------------------------------------
  1341. if( dialogid == dialog_DILER ) {
  1342. if( !response ) return TogglePlayerControllable( playerid, 1 );
  1343. switch(listitem) {
  1344. case 0: {
  1345. GivePlayerMoney(playerid, -50000);
  1346. PlayerInfo[ playerid ][ pNovac ] -=50000;
  1347. GivePlayerWeapon(playerid, 30, 90);
  1348. SendClientMessage( playerid, -1, "{0070D0}|| INFO ||: {FFFFFF}Uzeo si od dilera ak47 90ammo za 50.000$ !");
  1349. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Buraz, nikome ni reci o ovome jel ti to jasno ??");
  1350. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Ako nekome kazes, najebao sam..");
  1351. TogglePlayerControllable( playerid, 1 );
  1352. }
  1353. case 1: {
  1354. PlayerInfo[playerid][pDroga]++;
  1355. GivePlayerMoney(playerid, -500);
  1356. PlayerInfo[ playerid ][ pNovac ] -=500;
  1357. SendClientMessage( playerid, -1, "{0070D0}|| INFO ||: {FFFFFF}Uzeo si od dilera 1g droge i platio 500$ !");
  1358.  
  1359. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Buraz, nikome ni reci o ovome jel ti to jasno ??");
  1360. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Ako nekome kazes, najebao sam..");
  1361. TogglePlayerControllable( playerid, 1 );
  1362. }
  1363. case 2: {
  1364. PlayerInfo[playerid][pDzoint]++;
  1365. GivePlayerMoney(playerid, -700);
  1366. PlayerInfo[ playerid ][ pNovac ] -=700;
  1367. SendClientMessage( playerid, -1, "{0070D0}|| INFO ||: {FFFFFF}Uzeo si od dilera dzoint i platio 700$ ! (/smotajdzoint)");
  1368.  
  1369. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Buraz, nikome ni reci o ovome jel ti to jasno ??");
  1370. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Ako nekome kazes, najebao sam..");
  1371. TogglePlayerControllable( playerid, 1 );
  1372. }
  1373. case 3: {
  1374. GivePlayerMoney(playerid, -5000);
  1375. GivePlayerWeapon(playerid, 24, 50);
  1376. PlayerInfo[ playerid ][ pNovac ] -=50;
  1377. SendClientMessage( playerid, -1, "{0070D0}|| INFO ||: {FFFFFF}Uzeo si od dilera deagle 50ammo za 5.000$ !");
  1378. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Buraz, nikome ni reci o ovome jel ti to jasno ??");
  1379. SendClientMessage(playerid, 0xC2A2DAAA, "Diler: Ako nekome kazes, najebao sam..");
  1380. TogglePlayerControllable( playerid, 1 );
  1381. }
  1382. }
  1383. return true;
  1384. }
  1385. //= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = //
  1386. if(dialogid == dialog_KREIRAJDILERA) {
  1387. if(!response) return true;
  1388. if(response) {
  1389. for(new id = 0; id < MAX_DILERA; id++) {
  1390. new dilerfajl[50];
  1391. format(dilerfajl, sizeof(dilerfajl), DILERI_FILE, id);
  1392. if(!fexist(dilerfajl)) {
  1393. new Float:x, Float:y, Float:z, Float:rot;
  1394. GetPlayerPos(playerid, x, y, z);
  1395. GetPlayerFacingAngle(playerid, rot);
  1396. DilerInfo[id][dX] = x; DilerInfo[id][dY] = y; DilerInfo[id][dZ] = z; DilerInfo[id][dA] = rot;
  1397. new dilerimelabel[30];
  1398. if(sscanf(inputtext, "s[30]", dilerimelabel)) return SCM( playerid, -1, "Greska: Upisite ime dilera !" );
  1399. strmid(DilerInfo[id][DilerIme], dilerimelabel, 0, strlen(dilerimelabel), 50);
  1400. SendClientMessage(playerid, -1, "Zavr?ili ste kreiranje Actor-a.");
  1401. DilerActor = CreateActor(29, DilerInfo[id][dX], DilerInfo[id][dY], DilerInfo[id][dZ], DilerInfo[id][dA]);
  1402. SacuvajDilere(id);
  1403. SetActorInvulnerable(id, true);
  1404. DileriLabel();
  1405. break;
  1406. }
  1407. }
  1408. }
  1409. }
  1410.  
  1411.  
  1412. //----------------
  1413. switch(dialogid)
  1414. {
  1415. case DIALOG_REGISTER:
  1416. {
  1417. if(!response) return Kick(playerid);
  1418. if(response)
  1419. {
  1420. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registracija\nVlasnik: MINKICA\nMapper: Staff Tim","Ukucali ste pogresnu lozinku.\nUkucajte ispravnu lozinku da bi se registrovali.","Registruj se","Izadji");
  1421. new INI:File = INI_Open(UserPath(playerid));
  1422. INI_SetTag(File,"data");
  1423. INI_WriteInt(File,"Lozinka",udb_hash(inputtext));
  1424. INI_WriteInt(File,"Novac",1000);
  1425. INI_WriteInt(File,"Level",5);
  1426. INI_WriteInt(File,"Zatvoren",0);
  1427. INI_WriteInt(File,"Admin",0);
  1428. INI_WriteInt(File,"Ubistva",0);
  1429. INI_WriteInt(File,"Smrti",0);
  1430. INI_Close(File);
  1431. SetSpawnInfo(playerid, 15, 15, 1242.8806,-1692.4796,16.1967,0, 0, 0, 0, 0, 0, 0);// Ovde stavite koordinate svog spawna
  1432. SpawnPlayer(playerid);
  1433. GivePlayerMoney(playerid,PlayerInfo[playerid][pNovac] +=10000);
  1434. SetPlayerScore(playerid,PlayerInfo[playerid][pLevel] +=5);
  1435. }
  1436. }
  1437. case DIALOG_LOGIN:
  1438. {
  1439. if(!response) return Kick(playerid);
  1440. if(response)
  1441. {
  1442. if(udb_hash(inputtext) == PlayerInfo[playerid][pLozinka])
  1443. {
  1444. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  1445. GivePlayerMoney(playerid, PlayerInfo[playerid][pNovac]);
  1446. SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  1447. }
  1448. else
  1449. {
  1450. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Prijavljivanje","Ukucali ste pogresnu lozinku.\nVlasnik: MINKICA\nMAPPER: Staff Team\nSkripteri: Staff Team\nUkucajte ispravnu lozinku da bi se ulogovali.\nVlasnik: MINKICA\nMAPPER: Staff Team\nSkripteri: Staff Team","Prijavi se","Izadji");
  1451. }
  1452. return 1;
  1453. }
  1454. }
  1455. }
  1456. return 1;
  1457. }
  1458.  
  1459. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1460. {
  1461. return 1;
  1462. }
  1463. forward TimerRent(playerid);
  1464. public TimerRent(playerid) {
  1465.  
  1466. RentVreme[ playerid ]--;
  1467. if(RentVreme[ playerid ] == 0) {
  1468. KillTimer(RentTimer[ playerid ]);
  1469. DestroyVehicle(RentVeh[ playerid ]);
  1470. Delete3DTextLabel(RentVehLabel[ RentVeh[ playerid ] ]);
  1471. IznajmioVozilo[ playerid ] = 0;
  1472. RentOdabir[ playerid ] = 0;
  1473. RentVreme[ playerid ] = 0;
  1474. RentVeh[ playerid ] = 0;
  1475. SendClientMessage(playerid, 0x0077C7FF, "[RENT] {FFFFFF}Isteklo vam je vreme iznamljivanja vozila.");
  1476. }
  1477. return 1;
  1478. }
  1479. ////forWARDS
  1480. forward LoadUser_data(playerid,name[],value[]);
  1481. public LoadUser_data(playerid,name[],value[])
  1482. {
  1483. INI_Int("Lozinka",PlayerInfo[playerid][pLozinka]);
  1484. INI_Int("Zatvoren",PlayerInfo[playerid][pZatvoren]);
  1485. INI_Int("Level",PlayerInfo[playerid][pLevel]);
  1486. INI_Int("Novac",PlayerInfo[playerid][pNovac]);
  1487. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  1488. INI_Int("PosedovanjeKuce",PlayerInfo[playerid][pPosedovanjeKuce]);
  1489. INI_Int("ProveraSpawna",PlayerInfo[playerid][pProveraSpawna]);
  1490. INI_Int("Rent",PlayerInfo[playerid][pRent]);
  1491. INI_Int("Ubistva",PlayerInfo[playerid][pUbistva]);
  1492. INI_Int("Smrti",PlayerInfo[playerid][pSmrti]);
  1493. return 1;
  1494. }
  1495. //-------------------HOUSE SYS-----------------//
  1496. forward UcitajKuce(idkuce, name[], value[]);
  1497. public UcitajKuce(idkuce, name[], value[])
  1498. {
  1499. INI_Int("ProveraVlasnika",KucaInfo[idkuce][kProveraVlasnika]);
  1500. INI_String("Vlasnik",KucaInfo[idkuce][kVlasnik],45);
  1501. INI_String("Vrsta",KucaInfo[idkuce][kVrsta],35);
  1502. INI_String("Ime",KucaInfo[idkuce][kIme], 60);
  1503. INI_Float("UlazX",KucaInfo[idkuce][kUlazX]);
  1504. INI_Float("UlazY",KucaInfo[idkuce][kUlazY]);
  1505. INI_Float("UlazZ",KucaInfo[idkuce][kUlazZ]);
  1506. INI_Float("IzlazX",KucaInfo[idkuce][kIzlazX]);
  1507. INI_Float("IzlazY",KucaInfo[idkuce][kIzlazY]);
  1508. INI_Float("IzlazZ",KucaInfo[idkuce][kIzlazZ]);
  1509. INI_Int("Level",KucaInfo[idkuce][kLevel]);
  1510. INI_Int("Cena",KucaInfo[idkuce][kCena]);
  1511. INI_Int("Novac",KucaInfo[idkuce][kNovac]);
  1512. INI_Int("Interior",KucaInfo[idkuce][kInt]);
  1513. INI_Int("Zatvoreno",KucaInfo[idkuce][kZatvoreno]);
  1514. INI_Int("VW",KucaInfo[idkuce][kVW]);
  1515. INI_Int("Oruzije",KucaInfo[idkuce][kOruzije]);
  1516. INI_Int("Municija",KucaInfo[idkuce][kMunicija]);
  1517. INI_Int("Rent",KucaInfo[idkuce][kRent]);
  1518. INI_Int("CenaRenta",KucaInfo[idkuce][kCenaRenta]);
  1519. INI_Int("Zvono",KucaInfo[idkuce][kZvono]);
  1520. return 1;
  1521. }
  1522. //////////////
  1523. stock GetVehicleSpeed( vehicleid )
  1524. {
  1525. new
  1526. Float:x,
  1527. Float:y,
  1528. Float:z,
  1529. vel;
  1530. GetVehicleVelocity( vehicleid, x, y, z );
  1531. vel = floatround( floatsqroot( x*x + y*y + z*z ) * 180 ); // KM/H
  1532. // vel = floatround( floatsqroot( x*x + y*y + z*z ) * 180 / MPH_KMH ); // Mph
  1533. return vel;
  1534. }
  1535. //////////////
  1536. ///////////////////////////////////////////////////
  1537. stock SacuvajKucu(idkuce)
  1538. {
  1539. new kFile[128];
  1540. format(kFile, sizeof(kFile), KUCE_FILE, idkuce);
  1541. new INI:File = INI_Open(kFile);
  1542. INI_WriteInt(File,"ProveraVlasnika",KucaInfo[idkuce][kProveraVlasnika]);
  1543. INI_WriteString(File,"Vlasnik",KucaInfo[idkuce][kVlasnik]);
  1544. INI_WriteString(File,"Vrsta",KucaInfo[idkuce][kVrsta]);
  1545. INI_WriteString(File,"Ime",KucaInfo[idkuce][kIme]);
  1546. INI_WriteFloat(File,"UlazX",KucaInfo[idkuce][kUlazX]);
  1547. INI_WriteFloat(File,"UlazY",KucaInfo[idkuce][kUlazY]);
  1548. INI_WriteFloat(File,"UlazZ",KucaInfo[idkuce][kUlazZ]);
  1549. INI_WriteFloat(File,"IzlazX",KucaInfo[idkuce][kIzlazX]);
  1550. INI_WriteFloat(File,"IzlazY",KucaInfo[idkuce][kIzlazY]);
  1551. INI_WriteFloat(File,"IzlazZ",KucaInfo[idkuce][kIzlazZ]);
  1552. INI_WriteInt(File,"Level",KucaInfo[idkuce][kLevel]);
  1553. INI_WriteInt(File,"Cena",KucaInfo[idkuce][kCena]);
  1554. INI_WriteInt(File,"Novac",KucaInfo[idkuce][kNovac]);
  1555. INI_WriteInt(File,"Interior",KucaInfo[idkuce][kInt]);
  1556. INI_WriteInt(File,"Zatvoreno",KucaInfo[idkuce][kZatvoreno]);
  1557. INI_WriteInt(File,"VW",KucaInfo[idkuce][kVW]);
  1558. INI_WriteInt(File,"Oruzije",KucaInfo[idkuce][kOruzije]);
  1559. INI_WriteInt(File,"Municija",KucaInfo[idkuce][kMunicija]);
  1560. INI_WriteInt(File,"Rent",KucaInfo[idkuce][kRent]);
  1561. INI_WriteInt(File,"CenaRenta",KucaInfo[idkuce][kCenaRenta]);
  1562. INI_WriteInt(File,"Zvono",KucaInfo[idkuce][kZvono]);
  1563. INI_Close(File);
  1564. return 1;
  1565. }
  1566. stock KuceLP(idkuce)
  1567. {
  1568. new string[400];
  1569. if(KucaInfo[idkuce][kProveraVlasnika] == 0)
  1570. {
  1571. Delete3DTextLabel(KucaLabel[idkuce]);
  1572. DestroyPickup(KucaPickup[idkuce]);
  1573. format(string,sizeof(string),""ZELENA"Kuca na Prodaju!\nVrsta: "BELA"%s\n"ZELENA"Cena: "BELA"%d\n"ZELENA"Level: "BELA"%d\n"ZELENA"ID Kuce: "BELA"%d\n"ZELENA"Za kupovinu /kupikucu",KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kLevel],idkuce);
  1574. KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,KucaInfo[idkuce][kUlazX],KucaInfo[idkuce][kUlazY],KucaInfo[idkuce][kUlazZ],25,0,1);
  1575. KucaPickup[idkuce] = CreatePickup(1273, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]);
  1576. }
  1577. else if(KucaInfo[idkuce][kProveraVlasnika] == 1)
  1578. {
  1579. Delete3DTextLabel(KucaLabel[idkuce]);
  1580. DestroyPickup(KucaPickup[idkuce]);
  1581. format(string,sizeof(string),""ZELENA"[ "BELA"%s "ZELENA"]\n"ZELENA"Vlasnik: "BELA"%s\n"ZELENA"Vrsta: "BELA"%s\n"ZELENA"Level: "BELA"%d\n"ZELENA"Cena: "BELA"%d\n"ZELENA"Cena Renta: "BELA"%d\n"ZELENA"ID Kuce: "BELA"%d\n"ZELENA"'F' za ulaz u kucu",KucaInfo[idkuce][kIme],KucaInfo[idkuce][kVlasnik],KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kLevel],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kCenaRenta],idkuce);
  1582. KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,KucaInfo[idkuce][kUlazX],KucaInfo[idkuce][kUlazY],KucaInfo[idkuce][kUlazZ],25,0,1);
  1583. KucaPickup[idkuce] = CreatePickup(1239, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]);
  1584. }
  1585. return 1;
  1586. }
  1587. //////////////
  1588. forward ucitaj_trafiku(id, name[], value[]);
  1589. public ucitaj_trafiku(id, name[], value[]) {
  1590.  
  1591. INI_Float("X", TrafikaInfo[ id ][ PosX ]);
  1592. INI_Float("Y", TrafikaInfo[ id ][ PosY ]);
  1593. INI_Float("Z", TrafikaInfo[ id ][ PosZ ]);
  1594. INI_Float("X", TrafikaInfo[ id ][ RotX ]);
  1595. INI_Float("Y", TrafikaInfo[ id ][ RotY ]);
  1596. INI_Float("Z", TrafikaInfo[ id ][ RotZ ]);
  1597. return true;
  1598. }
  1599. stock next_trafika_ID(const len) {
  1600. new trafika_ID = (-1);
  1601. for( new loop = ( 0 ), store_check = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  1602. store_check = ( loop+1 );
  1603. format( Data_, ( sizeof Data_ ), TRAFIKE_FILE, store_check );
  1604. if(!fexist(Data_)) {
  1605. trafika_ID = ( store_check );
  1606. break;
  1607. }
  1608. }
  1609. return ( trafika_ID );
  1610. }
  1611. //============================================================================//
  1612. stock sacuvaj_trafiku(id) {
  1613.  
  1614. new trafika_File[ 60 ];
  1615. format(trafika_File, sizeof(trafika_File), TRAFIKE_FILE, id);
  1616. new INI:File = INI_Open(trafika_File);
  1617. INI_WriteFloat(File, "X", TrafikaInfo[ id ][ PosX ]);
  1618. INI_WriteFloat(File, "Y", TrafikaInfo[ id ][ PosY ]);
  1619. INI_WriteFloat(File, "Z", TrafikaInfo[ id ][ PosZ ]);
  1620. INI_WriteFloat(File, "X", TrafikaInfo[ id ][ RotX ]);
  1621. INI_WriteFloat(File, "Y", TrafikaInfo[ id ][ RotY ]);
  1622. INI_WriteFloat(File, "Z", TrafikaInfo[ id ][ RotZ ]);
  1623. INI_Close(File);
  1624. }
  1625. //////////////
  1626. stock UserPath(playerid)
  1627. {
  1628. new string[128],playername[MAX_PLAYER_NAME];
  1629. GetPlayerName(playerid,playername,sizeof(playername));
  1630. format(string,sizeof(string),PATH,playername);
  1631. return string;
  1632. }
  1633. ///////////////////
  1634. stock udb_hash(buf[])
  1635. {
  1636. new length=strlen(buf);
  1637. new s1 = 1;
  1638. new s2 = 0;
  1639. new n;
  1640. for (n=0; n<length; n++)
  1641. {
  1642. s1 = (s1 + buf[n]) % 65521;
  1643. s2 = (s2 + s1) % 65521;
  1644. }
  1645. return (s2 << 16) + s1;
  1646. }
  1647. stock ImeIgraca(playerid)
  1648. {
  1649. new ime[MAX_PLAYER_NAME];
  1650. GetPlayerName(playerid, ime, sizeof(ime));
  1651. return ime;
  1652. }
  1653. stock AdminPoruka(color, const string1[])
  1654. {
  1655. foreach(Player, i)
  1656. if(IsPlayerAdmin(i) || PlayerInfo[i][pAdmin] > 0) SCM(i, color, string1);
  1657. return 1;
  1658. }
  1659.  
  1660. //*********************KOMANDE**********************
  1661. CMD:makeadmin(playerid, params[]) {
  1662.  
  1663. if(!IsPlayerAdmin(playerid)) return 1;
  1664. new id,alevel,string[128];
  1665. if(sscanf(params, "ud", id, alevel)) return SCM(playerid, -1, "BU:RP|/makeadmin [ID/Ime] [Admin Level (1-6)]");
  1666. if(id == IPI) return 1;
  1667. if(alevel < 0 || alevel > 6) return SCM(playerid, -1, "[BU:RP] Admin level ne moze biti manji od 0 i veci od 6!");
  1668. PlayerInfo[playerid][pAdmin] = alevel;
  1669. format(string,sizeof(string),"Admin %s ti je postavio admin level na %d!",ImeIgraca(playerid),alevel);
  1670. SCM(id,-1,string);
  1671. format(string,sizeof(string),"Postavili ste igracu %s admin level na %d!",ImeIgraca(id),alevel);
  1672. SCM(playerid,-1,string);
  1673. return 1;
  1674. }
  1675.  
  1676. //----------------------------------------------//
  1677. CMD:zatvori(playerid, params[]) {
  1678. if(PlayerInfo[playerid][pAdmin] < 1) return 1;
  1679. new id,string[128];
  1680. if(sscanf(params, "ud", id)) return SCM(playerid, -1, "BU:RP|/zatvori [ID/Ime]");
  1681. {
  1682. PlayerInfo[playerid][pZatvoren] = 1;
  1683. SetPlayerPos(playerid,1102.9191,-305.2807,73.9922);
  1684. format(string,sizeof(string),"Admin %s te je stavio u zatvor!",ImeIgraca(playerid));
  1685. SCM(id,-1,string);
  1686. format(string,sizeof(string),"Postavili ste igraca %s u zatvor!",ImeIgraca(id));
  1687. SCM(playerid,-1,string);
  1688. }
  1689. return 1;
  1690. }
  1691. //---------------------------------------------//
  1692. //-------------------------//
  1693. CMD:test(playerid, params[]) {
  1694. GivePlayerMoney(playerid, 1000000);
  1695. return 1;
  1696. }
  1697. forward LoadujSamperskeNarkomane( dilerid, name[], value[] );
  1698. public LoadujSamperskeNarkomane( dilerid, name[], value[] ) {
  1699. INI_Float( "X", DilerInfo[ dilerid ][ dX ] );
  1700. INI_Float( "Y", DilerInfo[ dilerid ][ dY ] );
  1701. INI_Float( "Z", DilerInfo[ dilerid ][ dZ ] );
  1702. INI_Float( "A", DilerInfo[ dilerid ][ dA ] );
  1703. INI_String( "DilerIme", DilerInfo[ dilerid ][ DilerIme ], 30 );
  1704. return true;
  1705. }
  1706.  
  1707. stock SacuvajDilere( dilerid ) {
  1708. new dFile[50];
  1709. format(dFile, sizeof(dFile), DILERI_FILE, dilerid);
  1710. new INI:File = INI_Open(dFile);
  1711. INI_WriteFloat( File, "X", DilerInfo[ dilerid ][ dX ] );
  1712. INI_WriteFloat( File, "Y", DilerInfo[ dilerid ][ dY ] );
  1713. INI_WriteFloat( File, "Z", DilerInfo[ dilerid ][ dZ ] );
  1714. INI_WriteFloat( File, "A", DilerInfo[ dilerid ][ dA ] );
  1715. INI_WriteInt( File, "DilerIme", DilerInfo[ dilerid ][ DilerIme ] );
  1716. INI_Close(File);
  1717. return true;
  1718. }
  1719. forward DileriLabel( );
  1720. public DileriLabel( ) {
  1721. for(new id = 0; id < MAX_DILERA; id++) {
  1722. new dilerfajl[50];
  1723. format(dilerfajl, sizeof(dilerfajl), DILERI_FILE, id);
  1724. if(fexist(dilerfajl)) {
  1725. new string[75];
  1726. format(string, sizeof(string), "{0070D0}|| {FFFFFF}DILER %s {0070D0}||\n{FFFFFF}- /diler -", DilerInfo[id][DilerIme]);
  1727. DilerLabel[id] = Create3DTextLabel(string, -1, DilerInfo[id][dX], DilerInfo[id][dY], DilerInfo[id][dZ]+1, 10, 0, 1);
  1728. }
  1729. }
  1730. return true;
  1731. }
  1732. forward LoadRent(id, name[], value[]);
  1733. public LoadRent(id, name[], value[]) {
  1734.  
  1735. INI_Float("Lokacija_X", RentInfo[ id ][ rentX ]);
  1736. INI_Float("Lokacija_Y", RentInfo[ id ][ rentY ]);
  1737. INI_Float("Lokacija_Z", RentInfo[ id ][ rentZ ]);
  1738. return 1;
  1739. }
  1740. stock player_close_dealer( playerid ) {
  1741. new lerDi = 0;
  1742. while(lerDi != MAX_DILERA) {
  1743. if(IsPlayerInRangeOfPoint( playerid, 4.0, DilerInfo[lerDi][dX], DilerInfo[lerDi][dY], DilerInfo[lerDi][dZ])) {
  1744. return lerDi;
  1745. }
  1746. lerDi++;
  1747. }
  1748. return -1;
  1749. }
  1750. CMD:kreirajdilera( playerid, params[] ) {
  1751. if( !IsPlayerAdmin( playerid )) return SendClientMessage( playerid, -1, "{0070D0}|| GRESKA ||: {FFFFFF}Moras biti RCON Admin !" );
  1752. SPD( playerid, dialog_KREIRAJDILERA, DIALOG_STYLE_INPUT, "{0070D0}Diler - {FFFFFF}Kreiranje Dilera", "{0070D0}- {FFFFFF}U prazno polje ispod unesite ime za dilera.", "{0070D0}Potvrdi", "Izlaz" );
  1753. return true;
  1754. }
  1755.  
  1756. CMD:diler( playerid, params[] ) {
  1757. if( player_close_dealer( playerid ) == -1 ) return SendClientMessage( playerid, -1, "{0070D0}|| GRESKA ||: {FFFFFF}Niste u blizini ni jednog dilera." );
  1758. SPD( playerid, dialog_DILER, DIALOG_STYLE_LIST, "{0070D0}Diler - {FFFFFF}Dilujte sa dilerom", "{0070D0}- {FFFFFF}Ak47 (50.000$) (90ammo)\n{0070D0}- {FFFFFF}Droga (500$) (1)\n{0070D0}- {FFFFFF}Dzoint\n{0070D0}- {FFFFFF}Desert Eagle (5.000$) (50ammo)", "{0070D0}Potvrdi", "Izlaz" );
  1759. TogglePlayerControllable( playerid, 0 );
  1760. return true;
  1761. }
  1762.  
  1763. CMD:smotajdzoint( playerid, params[] ) {
  1764. if( PlayerInfo[ playerid ][ pDzoint ] == 0 ) return SendClientMessage( playerid, -1, "{0070D0}|| GRESKA ||: {FFFFFF}Nemas dzoint." );
  1765. SendClientMessage( playerid, -1, "Uspesno motas dzoint, sacekaj par sekundi." );
  1766. return true;
  1767. }
  1768.  
  1769. CMD:skoci(playerid, params[]) {
  1770. if(IsPlayerInAnyVehicle(playerid))
  1771. SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 5.0);
  1772. return 1;
  1773. }
  1774. CMD:disarm(playerid, params[]) {
  1775. if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "You're not authorized to use this command");//2 is the admin level that can use it and SendClientMessage(playerid, COLOR_RED, "You're not authorized to use this command"); this is the message when the player is not admin or lower than 2
  1776. new string[128],targetid;
  1777. if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1, "USAGE: /disarm [playerid]");
  1778. format(string,sizeof(string),"Admin %s has disarmed %s",ImeIgraca(playerid),ImeIgraca(targetid));
  1779. SendClientMessageToAll(COLOR_RED,string);
  1780. ResetPlayerWeapons(targetid);
  1781. return 1;
  1782. }
  1783. //-------------------------HOUSE SYS--------------------------------------------
  1784. CMD:kreirajkucu(playerid, params[],help)
  1785. {
  1786. if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"[BU:RP] "CRVENA"Nemate ovlastenje za koriscenje ove komande!");
  1787. new idkuce,vrsta,level,cena,Float:X,Float:Y,Float:Z,fkuce[80],string[400]; GetPlayerPos(playerid,X,Y,Z);
  1788. if(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,""CRVENA"BU:RP | "SIVA"/kreirajkucu [ID] [Vrsta] [Level] [Cena]");
  1789. if(idkuce >= MAX_KUCA) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Maximum kuca je ogranicen ne mozes koristiti taj ID!");
  1790. format(fkuce, sizeof(fkuce), KUCE_FILE, idkuce);
  1791. if(fexist(fkuce)) return SCM(playerid,-1, "BU:RP | "SPLAVA"ID te kuce vec postoji!");
  1792. if(vrsta == 0) // MALA KUCA
  1793. {
  1794. KucaInfo[idkuce][kIzlazX] = 223.043991;
  1795. KucaInfo[idkuce][kIzlazY] = 1289.259888;
  1796. KucaInfo[idkuce][kIzlazZ] = 1082.199951;
  1797. KucaInfo[idkuce][kInt] = 1;
  1798. strmid(KucaInfo[idkuce][kVrsta],"Mala Kuca",0,strlen("Mala Kuca"),255);
  1799. }
  1800. else if(vrsta == 1) // SREDNJA KUCA
  1801. {
  1802. KucaInfo[idkuce][kIzlazX] = 225.756989;
  1803. KucaInfo[idkuce][kIzlazY] = 1240.000000;
  1804. KucaInfo[idkuce][kIzlazZ] = 1082.149902;
  1805. KucaInfo[idkuce][kInt] = 2;
  1806. strmid(KucaInfo[idkuce][kVrsta],"Srednja Kuca",0,strlen("Srednja Kuca"),255);
  1807. }
  1808. else if(vrsta == 2) // VELIKA KUCA
  1809. {
  1810. KucaInfo[idkuce][kIzlazX] = 235.508994;
  1811. KucaInfo[idkuce][kIzlazY] = 1189.169897;
  1812. KucaInfo[idkuce][kIzlazZ] = 1080.339966;
  1813. KucaInfo[idkuce][kInt] = 3;
  1814. strmid(KucaInfo[idkuce][kVrsta],"Velika Kuca",0,strlen("Velika Kuca"),255);
  1815. }
  1816. KucaInfo[idkuce][kCena] = cena; KucaInfo[idkuce][kLevel] = level; KucaInfo[idkuce][kUlazX] = X;
  1817. KucaInfo[idkuce][kUlazY] = Y; KucaInfo[idkuce][kUlazZ] = Z; KucaInfo[idkuce][kProveraVlasnika] = 0;
  1818. KucaInfo[idkuce][kNovac] = 0; KucaInfo[idkuce][kZatvoreno] = 1; KucaInfo[idkuce][kVW] = idkuce; KucaInfo[idkuce][kZvono] = 0;
  1819. KucaInfo[idkuce][kOruzije] = -1; KucaInfo[idkuce][kMunicija] = 0; KucaInfo[idkuce][kRent] = 0; KucaInfo[idkuce][kCenaRenta] = 50;
  1820. strmid(KucaInfo[idkuce][kVlasnik],"Niko",0,strlen("Niko"),255); strmid(KucaInfo[idkuce][kIme],"Default",0,strlen("Default"),255);
  1821. format(string,sizeof(string),""ZELENA"Kuca na Prodaju!\nVrsta: "BELA"%s\n"ZELENA"Cena: "BELA"%d\n"ZELENA"Level: "BELA"%d\n"ZELENA"ID Kuce: "BELA"%d\n"ZELENA"Za kupovinu /kupikucu",KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kLevel],idkuce);
  1822. KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,X,Y,Z,25,0,1);
  1823. KucaPickup[idkuce] = CreatePickup(1273, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]);
  1824. SCM(playerid,-1,""SIVA"Kuca je uspesno kreirana!"); SacuvajKucu(idkuce);
  1825. return 1;
  1826. }
  1827. ///////////////////////////////////////////////////
  1828. CMD:kupikucu(playerid, params[], help)
  1829. {
  1830. for(new i; i < sizeof(KucaInfo); i++)
  1831. {
  1832. if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
  1833. {
  1834. if(!strcmp(KucaInfo[i][kVlasnik], "Niko", true) && KucaInfo[i][kProveraVlasnika] == 0)
  1835. {
  1836. if(PlayerInfo[playerid][pPosedovanjeKuce] != -1) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Vec imas kucu!");
  1837. if(GetPlayerScore(playerid) < KucaInfo[i][kLevel]) return SCM(playerid,-1,"BU:RP | "CRVENA"Nemate dovoljan level za kupovinu kuce!");
  1838. if(GetPlayerMoney(playerid) < KucaInfo[i][kCena]) return SCM(playerid,-1, "BU:RP | "CRVENA"Nemate dovoljno novca za kupovinu kuce!");
  1839. if(PlayerInfo[playerid][pRent] != -1) return SCM(playerid,-1,"BU:RP | "CRVENA"Rentate kucu prvo unrentajte kucu da bi kupili ovu!");
  1840. strmid(KucaInfo[i][kVlasnik], ImeIgraca(playerid), 0, strlen(ImeIgraca(playerid)), 255);
  1841. KucaInfo[i][kProveraVlasnika] = 1; SetPlayerInterior(playerid, KucaInfo[i][kInt]); PlayerInfo[playerid][pPosedovanjeKuce] = i;
  1842. SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]); SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
  1843. KucaInfo[i][kZatvoreno] = 0; GivePlayerMoney(playerid, -KucaInfo[i][kCena]); KuceLP(i); SacuvajKucu(i);
  1844. SCM(playerid,-1, ""SPLAVA"BU:RP | "SIVA"Cestitamo, kupili ste kucu!");
  1845. SCM(playerid,-1, ""SPLAVA"BU:RP | "SIVA"Za komande kuce koristite /kuca!");
  1846. SCM(playerid,-1, ""SPLAVA"BU:RP | "SIVA"Za ulaz u kucu koristi tipku F!");
  1847. return 1;
  1848. }
  1849. else return SCM(playerid, -1, ""CRVENA"BU:RP | "SIVA"Ta kuca se ne prodaje!");
  1850. }
  1851. }
  1852. return 1;
  1853. }
  1854. ////////////////////////////////////////////////////
  1855. CMD:kuca(playerid, params[], help)
  1856. {
  1857. if(PlayerInfo[playerid][pPosedovanjeKuce] == -1) return SCM(playerid,-1,""CRVENA"BU:RP | "SIVA"Nemate kucu!");
  1858. if(strcmp(KucaInfo[PlayerInfo[playerid][pPosedovanjeKuce]][kVlasnik], ImeIgraca(playerid), true)) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Niste vlasnik te kuce!");
  1859. new string[256];
  1860. format(string,sizeof(string),""BELA"Informacije\nOtkljucaj\nZakljucaj\nOstavi novac\nUzmi novac\nOstavi gun\nUzmi gun\nProdaj kucu\nPromeni Ime\nKuca Spawn\nDozvoli/Zabrani Rent\nCena Renta\nZvono (5000$)");
  1861. SPD(playerid, DIALOG_KUCA, DIALOG_STYLE_LIST, ""ZELENA"Kuca Opcije", string, "Odaberi", "Izlaz");
  1862. return 1;
  1863. }
  1864. ////////////////////////////////////////////////////
  1865. CMD:rentajkucu(playerid, params[], help)
  1866. {
  1867. for(new i = 0; i < MAX_KUCA; i++)
  1868. {
  1869. if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
  1870. {
  1871. if(PlayerInfo[playerid][pPosedovanjeKuce] != -1) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Vec imas kucu pa ne mozes rentati!");
  1872. if(KucaInfo[i][kRent] == 0) return SCM(playerid,-1,"BU:RP | "ZUTA"U toj kuci rent nije dozvoljen!");
  1873. if(GetPlayerMoney(playerid) < KucaInfo[i][kCenaRenta]) return SCM(playerid,-1,"BU:RP | "ZUTA"Nemas dovoljno novca za rent!");
  1874. GivePlayerMoney(playerid, KucaInfo[i][kCenaRenta]); KucaInfo[i][kNovac] += KucaInfo[i][kCenaRenta];
  1875. PlayerInfo[playerid][pRent] = i; SetPlayerInterior(playerid, KucaInfo[i][kInt]); SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
  1876. SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]); PlayerInfo[playerid][pProveraSpawna] = 2;
  1877. SCM(playerid,-1,""ZUTA"Uspesno ste rentali kucu!"); SacuvajKucu(i);
  1878. return 1;
  1879. }
  1880. }
  1881. return 1;
  1882. }
  1883. ///////////////////////////////////////////////////
  1884. CMD:zvoni(playerid, params[], help)
  1885. {
  1886. for(new i = 0; i < sizeof(KucaInfo); i++)
  1887. {
  1888. if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
  1889. {
  1890. if(KucaInfo[i][kZvono] == 0) return SCM(playerid,-1,""SIVA"Ta kuca nema zvono!");
  1891. SCM(playerid,-1,""ZUTA"Zvonite na vrata!");
  1892. foreach(Player, k)
  1893. {
  1894. if (IsPlayerInRangeOfPoint(k,3.0,KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]))
  1895. {
  1896. SCM(k,-1, ""ZUTA"Neko zvoni na vratima.");
  1897. }
  1898. }
  1899. }
  1900. }
  1901. return 1;
  1902. }
  1903. ////////////////////////////////////////////////////
  1904. CMD:unrentaj(playerid, params[], help)
  1905. {
  1906. if(PlayerInfo[playerid][pPosedovanjeKuce] != -1) return SCM(playerid,-1, ""CRVENA"BU:RP | "SIVA"Imas kucu ne mozes to!");
  1907. if(PlayerInfo[playerid][pRent] == -1) return SCM(playerid,-1,""ZUTA"Ne rentas kucu!");
  1908. PlayerInfo[playerid][pRent] = -1; SetPlayerHealth(playerid,0); SCM(playerid,-1,""ZUTA"Unrent ste kucu!");
  1909. return 1;
  1910. }
  1911. ////////////////////////////////////////////////////
  1912. CMD:izbrisikucu(playerid, params[], help)
  1913. {
  1914. if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"BU:RP | "CRVENA"Niste ovlasnite da koristite ovu komandu!");
  1915. new kFile[50],id;
  1916. if(sscanf(params,"i",id)) return SCM(playerid,-1,"BU:RP | "ZUTA"/izbrisikucu [ID]");
  1917. format(kFile, sizeof(kFile), KUCE_FILE, id);
  1918. if(fexist(kFile)){ fremove(kFile); Delete3DTextLabel(KucaLabel[id]); DestroyPickup(KucaPickup[id]); }
  1919. else { SCM(playerid,-1,"Taj id kuce ne postoji!"); }
  1920. return 1;
  1921. }
  1922. ////////////////////////////////////////////////////
  1923. CMD:portkuca(playerid, params[], help)
  1924. {
  1925. if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"BU:RP | "CRVENA"Niste ovlasnite da koristite ovu komandu!");
  1926. new id,kFile[50];
  1927. if(sscanf(params,"i",id)) return SCM(playerid,-1,"BU:RP | "ZUTA"/portkuca [ID]");
  1928. format(kFile, sizeof(kFile), KUCE_FILE, id);
  1929. SetPlayerPos(playerid,KucaInfo[id][kUlazX], KucaInfo[id][kUlazY], KucaInfo[id][kUlazZ]);
  1930. SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0);
  1931. return 1;
  1932. }
  1933. stock NemaOvlastenje(playerid)
  1934. {
  1935. SCM(playerid,-1,""CRVENA"[BU:RP] "SPLAVA"Nemate ovlastenje da koristite tu komandu!");
  1936. return 1;
  1937. }
  1938. stock PogresanID(playerid)
  1939. {
  1940. SCM(playerid,-1,""ZUTA"[BU:AS] "SPLAVA"Pogresan ID!");
  1941. return 1;
  1942. }
  1943. //-------------------ADMIN COMMANDS---------------------------------------------
  1944. CMD:ao(playerid, params[], help)
  1945. {
  1946. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  1947. new text[128],string[128];
  1948. if(sscanf(params, "s[128]", text)) return SCM(playerid, -1, ""SPLAVA"BU:RP | "CRVENA"/ao [text]");
  1949. format(string,sizeof(string),""SPLAVA"((Admin || %s: %s))",ImeIgraca(playerid),text);
  1950. SCMTA(-1,string);
  1951. return 1;
  1952. }
  1953. CMD:kick(playerid, params[], help)
  1954. {
  1955. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  1956. new id,razlog[50],string[128];
  1957. if(sscanf(params, "us[50]", id, razlog)) return SCM(playerid, -1, "BU:RP | "CRVENA"/kick [ID/Ime] [razlog]");
  1958. if(id == IPI) return PogresanID(playerid);
  1959. format(string,sizeof(string),""ZELENA"Kikovani ste od strane admina %s | Razlog: "SIVA"%s",ImeIgraca(playerid),razlog);
  1960. SCM(id,-1,string);
  1961. format(string,sizeof(string),""ZELENA"Kikovali ste igraca %s | Razlog: "SIVA"%s",ImeIgraca(id),razlog);
  1962. SCM(playerid,-1,string);
  1963. Kick(id);
  1964. return 1;
  1965. }
  1966. ////////////////////////////////////////////////////
  1967. CMD:kill(playerid, params[], help)
  1968. {
  1969. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  1970. new id,string[128];
  1971. if(sscanf(params, "u", id)) return SCM(playerid, -1, "BU:RP | "CRVENA"/kill [ID/Ime]");
  1972. if(id == IPI) return PogresanID(playerid);
  1973. format(string,sizeof(string),""ZELENA"[BU:RP] "BELA"Admin %s je ubio igraca %s (/kill)!",ImeIgraca(playerid),ImeIgraca(id));
  1974. SCMTA(-1,string);
  1975. SetPlayerHealth(id,0);
  1976. return 1;
  1977. }
  1978. CMD:v(playerid, params[], help)
  1979. {
  1980. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  1981. new model,boja1,boja2,Float:Poz[4];
  1982. if(sscanf(params, "ddd", model,boja1,boja2)) SCM(playerid,-1, "BU:RP | "ZUTA"/veh [Model] [Boja 1] [Boja 2]");
  1983. else if(model < 400 || model > 611) return SCM(playerid,-1, ""CRVENA"(GRESKA) "SIVA"Ne mozete ici ispod 400 i iznad 611!");
  1984. else if(boja1 < 0 || boja1 > 252) return SCM(playerid,-1, ""CRVENA"(GRESKA) "SIVA"Ne mozete ici ispod 0 i iznad 252!");
  1985. else if(boja2 < 0 || boja2 > 252) return SCM(playerid,-1, ""CRVENA"(GRESKA) "SIVA"Ne mozete ici ispod 0 i iznad 252!");
  1986. else
  1987. {
  1988. GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  1989. GetPlayerFacingAngle(playerid, Poz[3]);
  1990. new v = CreateVehicle(strval(params), Poz[0]+4, Poz[1], Poz[2], Poz[3], boja1, boja2, 200);
  1991. PutPlayerInVehicle(playerid, v, 0);
  1992. SCM(playerid,-1,""ZELENA"Stvorili ste vozilo!");
  1993. }
  1994. return 1;
  1995. }
  1996. ////////////////////////////////////////////////////
  1997. CMD:rtc(playerid, params[], help)
  1998. {
  1999. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2000. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,""CRVENA"[BU:RP] "BELA"Morate biti u vozilu!");
  2001. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  2002. SCM(playerid,-1,""SPLAVA"[BU:RP] "BELA"Respawnovali ste vozilo!");
  2003. return 1;
  2004. }
  2005. ///////////////////////////////////////////////////////
  2006. CMD:setskin(playerid, params[], help)
  2007. {
  2008.  
  2009. if(PlayerInfo[playerid][pAdmin] < 2) return NemaOvlastenje(playerid);
  2010. new id,skinid,string[128];
  2011. if(sscanf(params, "ui", id, skinid)) return SCM(playerid, -1, ""SPLAVA"BU:RP | "BELA"/setskin [ID/Ime] [Skin ID]");
  2012. if(id == IPI) return PogresanID(playerid);
  2013. SetPlayerSkin(id, skinid);
  2014. format(string,sizeof(string),""SPLAVA"[BU:RP] "SIVA"Admin %s vam je setovao skin ID %d!",ImeIgraca(playerid),skinid);
  2015. SCM(id,-1,string);
  2016. format(string,sizeof(string),""SPLAVA"[BU:RP] "SIVA"Uspesno ste postavili skin igracu %s!",ImeIgraca(id));
  2017. SCM(playerid,-1,string);
  2018. return 1;
  2019. }
  2020. ///////////////////////////////////////////////////////
  2021. CMD:jetpack(playerid, params[], help)
  2022. {
  2023. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2024. SCM(playerid, -1, ""ZUTA"AS | "BELA"Uzeli ste jetpack!");
  2025. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  2026. return 1;
  2027. }
  2028. CMD:specon(playerid, params[],help)
  2029. {
  2030. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2031. new id,string[60];
  2032. if(sscanf(params, "u", id)) return SCM(playerid, -1,""SPLAVA"GR:AS | "SIVA"/specon [ID]");
  2033. if(id == IPI) return PogresanID(playerid);
  2034. TogglePlayerSpectating(playerid, 1);
  2035. PlayerSpectatePlayer(playerid, id);
  2036. SetPlayerInterior(playerid, GetPlayerInterior(id));
  2037. Specanje[playerid] = id;
  2038. SpecanjeVar[playerid] = 1;
  2039. format(string,sizeof(string),""ZUTA"SPEC | "SIVA"Admin %s je poceo specati igraca %s!",ImeIgraca(playerid),ImeIgraca(id));
  2040. AdminPoruka(-1,string);
  2041. return 1;
  2042. }
  2043. ////////////////////////////////////////////////
  2044. CMD:specoff(playerid, params[],help)
  2045. {
  2046. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2047. TogglePlayerSpectating(playerid, 0);
  2048. Specanje[playerid] = IPI;
  2049. SpecanjeVar[playerid] = 0;
  2050. SCM(playerid,-1,""SIVA"SPEC | "SIVA"Iskljucili ste spec!");
  2051. return 1;
  2052. }
  2053. CMD:freeze(playerid, params[], help)
  2054. {
  2055. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2056. new id,string[80];
  2057. if(sscanf(params, "u", id)) return SCM(playerid, -1, ""SIVA"GR:AS | "BELA"/freeze [ID]");
  2058. if(id == IPI) return PogresanID(playerid);
  2059. format(string, sizeof(string), ""CRVENA"BU:RP] "SIVA"Frezovali ste igraca %s-a!",ImeIgraca(id));
  2060. SCM(playerid, -1, string);
  2061. format(string, sizeof(string), ""CRVENA"BU:RP] "SIVA"Frezovani ste od strane Admina %s-a!",ImeIgraca(playerid));
  2062. SendClientMessage(id, -1, string);
  2063. TogglePlayerControllable(id, false);
  2064. return 1;
  2065. }
  2066. ////////////////////////////////////////////////////
  2067. CMD:unfreeze(playerid, params[], help)
  2068. {
  2069. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2070. new id,string[80];
  2071. if(sscanf(params, "u", id)) return SCM(playerid, -1, ""SIVA"GR:AS | "BELA"/unfreeze [ID]");
  2072. if(id == IPI) return PogresanID(playerid);
  2073. format(string, sizeof(string), ""CRVENA"BU:RP] "SIVA"Unfrezovali ste igraca %s-a!",ImeIgraca(id));
  2074. SCM(playerid, -1, string);
  2075. format(string, sizeof(string), ""CRVENA"BU:RP] "SIVA"Unfrezovani ste od strane Admina %s-a!",ImeIgraca(playerid));
  2076. SendClientMessage(id, -1, string);
  2077. TogglePlayerControllable(id, true);
  2078. return 1;
  2079. }
  2080. ///////////////////////////////////////////////////
  2081. CMD:sethp(playerid,params[],help)
  2082. {
  2083. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2084. new id,helti,string[128];
  2085. if(sscanf(params,"ud", id, helti)) return SCM(playerid, -1, ""SPLAVA"GR:AS | "SIVA"/sethp [ID] [HP]");
  2086. if(id == IPI) return PogresanID(playerid);
  2087. SetPlayerHealth(id, helti);
  2088. format(string,sizeof(string),""CRVENA"BU:RP] "SIVA"Admin %s ti je postavi helte na %d!",ImeIgraca(playerid),helti);
  2089. SCM(id,-1,string);
  2090. format(string,sizeof(string),""CRVENA"HELTI | "CRVENA"Admin %s | Igrac %s | Helti %d",ImeIgraca(playerid),ImeIgraca(id),helti);
  2091. AdminPoruka(-1,string);
  2092. return 1;
  2093. }
  2094. ///////////////////////////////////////////////////
  2095. CMD:setarmor(playerid,params[],help)
  2096. {
  2097. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2098. new id,pancir,string[128];
  2099. if(sscanf(params,"ud", id, pancir)) return SCM(playerid, -1, ""SPLAVA"GR:AS | "SIVA"/setarmor [ID] [ARMOR]");
  2100. if(id == IPI) return PogresanID(playerid);
  2101. SetPlayerArmour(id, pancir);
  2102. format(string,sizeof(string),""CRVENA"BU:RP] "SIVA"Admin %s ti je postavi pancir na %d!",ImeIgraca(playerid),pancir);
  2103. SCM(id,-1,string);
  2104. format(string,sizeof(string),""CRVENA"PANCIR | "ZUTA"Admin %s | Igrac %s | Pancir %d",ImeIgraca(playerid),ImeIgraca(id),pancir);
  2105. AdminPoruka(-1,string);
  2106. return 1;
  2107. }
  2108. ///////////////////////////////////////////////////
  2109. CMD:a(playerid, params[],help)
  2110. {
  2111. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2112. new text[128],string[128];
  2113. if(sscanf(params, "s[128]", text)) return SCM(playerid, -1, ""CRVENA"GR:AS | "BELA"/a [text]");
  2114. format(string, sizeof(string), ""CRVENA"A | "CRVENA"%s"BELA": %s",ImeIgraca(playerid),text);
  2115. AdminPoruka(-1,string);
  2116. return 1;
  2117. }
  2118. ///////////////////////////////////////////////////
  2119. CMD:gethere(playerid, params[], help)
  2120. {
  2121. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2122. new id,string[128],Float:X,Float:Y,Float:Z;
  2123. if(sscanf(params, "u", id)) return SCM(playerid, -1, ""CRVENA"GR:AS | "BELA"/gethere [ID/Ime]");
  2124. if(id == IPI) return PogresanID(playerid);
  2125. GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(id, X + 2.0, Y, Z);
  2126. format(string,sizeof(string),""CRVENA"BU:RP] "SIVA"Teleportovao si %s-a do sebe!",ImeIgraca(id));
  2127. SCM(playerid,-1,string);
  2128. format(string,sizeof(string),""CRVENA"BU:RP] "SIVA"Admin %s te teleportovao do sebe!",ImeIgraca(playerid));
  2129. SCM(id,-1,string);
  2130. return 1;
  2131. }
  2132. ///////////////////////////////////////////////////
  2133. CMD:goto(playerid, params[], help)
  2134. {
  2135.  
  2136. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2137. new id,Float:X,Float:Y,Float:Z,string[128];
  2138. if(sscanf(params, "u", id)) return SCM(playerid, -1, ""CRVENA"GR:AS | "BELA"/goto [ID/Ime]");
  2139. if(id == IPI) return PogresanID(playerid);
  2140. GetPlayerPos(id, X, Y, Z); SetPlayerPos(playerid, X + 2.0, Y, Z); SetPlayerInterior(playerid,GetPlayerInterior(id));
  2141. format(string,sizeof(string),""CRVENA"BU:RP] "SIVA"Teleportovao si se do %s-a!",ImeIgraca(id));
  2142. SCM(playerid,-1,string);
  2143. format(string,sizeof(string),""CRVENA"BU:RP] "SIVA"Admin %s se teleportovao do tebe!",ImeIgraca(playerid));
  2144. SCM(id,-1,string);
  2145. return 1;
  2146. }
  2147. ///////////////////////////////////////////////////
  2148. CMD:report(playerid, params[], help)
  2149. {
  2150. new id, razlog[80],string[128];
  2151. if(sscanf(params, "us[80]", id, razlog)) return SCM(playerid, -1, ""SIVA"GR:AS | "CRVENA"/report [ID] [TEXT]");
  2152. if(id == IPI) return PogresanID(playerid);
  2153. format(string, sizeof(string), ""CRVENA"Prijavio: %s[ID:%d] | Prijavljen: %s | Razlog: %s", ImeIgraca(playerid), playerid, ImeIgraca(id), razlog);
  2154. AdminPoruka(-1, string);
  2155. SCM(playerid, -1, ""CRVENA"----------- Vas report je poslat adminima -----------");
  2156. return 1;
  2157. }
  2158. CMD:fixveh(playerid, params[], help)
  2159. {
  2160. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2161. new string[128];
  2162. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1, ""BELA"BU:RP] "ZUTA"Morate biti u vozilu!");
  2163. RepairVehicle(GetPlayerVehicleID(playerid));
  2164. format(string,sizeof(string),""CRVENA"A | "BELA"%s je popravio vozilo!",ImeIgraca(playerid));
  2165. AdminPoruka(-1, string);
  2166. SCM(playerid,-1,""CRVENA"BU:RP] "BELA"Vozilo Popravljeno!");
  2167. return 1;
  2168. }
  2169. ///////////////////////////////////////////////////
  2170. CMD:nitro(playerid, params[], help)
  2171. {
  2172. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2173. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1, ""CRVENA"BU:RP] "SIVA"Morate biti u vozilu!");
  2174. AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  2175. SCM(playerid, -1, "GR:AS | "ZUTA"Nitro je uspesno dodat u vozilo!");
  2176. return 1;
  2177. }
  2178. ///////////////////////////////////////////////////
  2179. CMD:slap(playerid, params[], help)
  2180. {
  2181. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2182. new id,razlog[80],string[128],Float:helti,Float:X,Float:Y,Float:Z;
  2183. if(sscanf(params, "us[80]", id, razlog)) return SCM(playerid, -1, ""SIVA"GR:AS | "CRVENA"/slap [ID] [Razlog]");
  2184. if(id == IPI) return PogresanID(playerid);
  2185. format(string,sizeof(string),""CRVENA"A | "ZUTA"Admin %s je slapovao igraca %s |",ImeIgraca(playerid),ImeIgraca(id));
  2186. SCMTA(-1,string);
  2187. format(string,sizeof(string),""CRVENA"Razlog: | "ZUTA"%s "CRVENA"|",razlog);
  2188. SCMTA(-1,string);
  2189. GetPlayerPos(id, X, Y, Z);
  2190. SetPlayerPos(id, X, Y, Z + 10.0);
  2191. GetPlayerHealth(id, helti);
  2192. SetPlayerHealth(id ,helti -20);
  2193. return 1;
  2194. }
  2195. //////////////////////////////////////////////////
  2196. CMD:getip(playerid, params[], help)
  2197. {
  2198. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2199. new id,ip[50],string[128];
  2200. if(sscanf(params, "u", id)) return SCM(playerid, -1, ""SIVA"GR:AS | /getip [ID/Ime]");
  2201. if(id == IPI) return PogresanID(playerid);
  2202. format(string,sizeof(string),""SIVA"Igrac %s | IP: %s",ImeIgraca(id),ip);
  2203. SCM(playerid,-1,string);
  2204. GetPlayerIp(id,ip,50);
  2205. return 1;
  2206. }
  2207. //////////////////////////////////////////////////
  2208. CMD:explode(playerid, params[], help)
  2209. {
  2210. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2211. new id,string[128],Float:X,Float:Y,Float:Z;
  2212. if(sscanf(params, "u", id)) return SCM(playerid, -1, ""SIVA"GR:AS | /explode [ID/Ime]");
  2213. if(id == IPI) return PogresanID(playerid);
  2214. format(string,sizeof(string),"EXPLODE | Admin %s | Igrac %s",ImeIgraca(playerid),ImeIgraca(id));
  2215. SCMTA(-1,string);
  2216. GameTextForPlayer(id,"~r~EXPLODE!",5000,3);
  2217. GetPlayerPos(id, X, Y, Z);
  2218. CreateExplosion(X, Y, Z, 12, 10.0);
  2219. return 1;
  2220. }
  2221. //////////////////////////////////////////////////
  2222. CMD:atime(playerid, params[], help)
  2223. {
  2224. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2225. new time,string[80];
  2226. if(sscanf(params, "i", time))
  2227. {
  2228. SCM(playerid, -1, ""SPLAVA"GR:AS | "BELA"/atime [time]");
  2229. SCM(playerid, -1, ""SPLAVA"GR:AS | Time: Ne moze biti manje od 0 i vec od 24!");
  2230. return 1;
  2231. }
  2232. if(time < 0 || time > 24) return SCM(playerid, -1, ""SIVA"GRESKA | Pogresan ID sat/i");
  2233. format(string,sizeof(string),""CRVENA" | "ZELENA"Admin %s je promenio sat/i u %d! "CRVENA"|",ImeIgraca(playerid),time);
  2234. SCMTA(-1,string);
  2235. SetWorldTime(time);
  2236. return 1;
  2237. }
  2238. ///////////////////////////////////////////////////////
  2239. CMD:aweather(playerid, params[], help)
  2240. {
  2241. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2242. new weather,string[128];
  2243. if(sscanf(params, "i", weather))
  2244. {
  2245. SCM(playerid, -1, ""SPLAVA"GR:AS | "BELA"/aweather [vreme]");
  2246. SCM(playerid, -1, ""SPLAVA"GR:AS | Vreme: Ne moze biti manje od 0 i vec od 44!");
  2247. return 1;
  2248. }
  2249. if(weather < 0 || weather > 44) return SCM(playerid, -1, ""SIVA"GRESKA | Pogresan ID Vremena!");
  2250. format(string,sizeof(string),""SIVA"Admin %s je postavio vreme na %d!",ImeIgraca(playerid),weather);
  2251. SCMTA(-1,string);
  2252. SetWeather(weather);
  2253. return 1;
  2254. }
  2255. CMD:cnn(playerid, params[], help)
  2256. {
  2257. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2258. new vrsta, text[100],string[128];
  2259. if(sscanf(params, "is[100]", vrsta, text))
  2260. {
  2261. SCM(playerid, -1, ""SPLAVA"GR:AS | "BELA"/cnn [vrsta] [text]");
  2262. SCM(playerid, -1, ""CRVENA"Vrsta 2 je onemogucena!");
  2263. return 1;
  2264. }
  2265. if(vrsta == 2) return GameTextForPlayer(playerid,"~r~2 je onemoguceno!",5000,3);
  2266. GameTextForAll(text, 5000, vrsta);
  2267. format(string,sizeof(string),""CRVENA"Admin %s koristio /cnn!",ImeIgraca(playerid));
  2268. AdminPoruka(-1,string);
  2269. return 1;
  2270. }
  2271. CMD:odg(playerid, params[], help)
  2272. {
  2273. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2274. new id, poruka[80],string[128];
  2275. if(sscanf(params, "us[80]", id, poruka)) return SCM(playerid,-1,""SPLAVA"GR:AS | "BELA"/odg [ID/Ime] [Odgovor]");
  2276. if(id == IPI) return PogresanID(playerid);
  2277. format(string,sizeof string, ""SPLAVA"Vas odgovor %s-u [ID:%d]: "BELA"%s", ImeIgraca(id) , id, poruka);
  2278. SCM(playerid, -1,string);
  2279. format(string,sizeof string ,""SPLAVA"%s [ID:%d] vam je odgovorio: "BELA"%s",ImeIgraca(playerid),playerid,poruka);
  2280. SCM(id, -1,string);
  2281. return 1;
  2282. }
  2283. //////////////////////////////////////////////////
  2284. CMD:cc(playerid, params[], help)
  2285. {
  2286. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2287. for(new oc = 0; oc <= 180; oc++) { SCMTA(-1, " "); }
  2288. new string[128];
  2289. format(string,sizeof(string),""SPLAVA"BU:RP] "SIVA"Chat ocistio %s.",ImeIgraca(playerid));
  2290. SCMTA(-1,string);
  2291. return 1;
  2292. }
  2293. CMD:gmx(playerid, params[], help)
  2294. {
  2295. if(PlayerInfo[playerid][pAdmin] < 4) return NemaOvlastenje(playerid);
  2296. foreach(Player,i)
  2297. SendRconCommand("gmx");
  2298. SCMTA(-1,"| "SPLAVA"Server se restartuje "BELA"|");
  2299. print("Server Restartovan...");
  2300. return 1;
  2301. }
  2302. //////////////////////////////////////////////////
  2303. CMD:healall(playerid, params[], help)
  2304. {
  2305. if(PlayerInfo[playerid][pAdmin] < 3) return NemaOvlastenje(playerid);
  2306. new string[128];
  2307. foreach(Player,i) { SetPlayerHealth(i,100.0); }
  2308. format(string,sizeof(string),""SPLAVA"(( "SIVA" Admin %s je napunio helte svim igracima "SPLAVA"))",ImeIgraca(playerid));
  2309. SCMTA(-1,string);
  2310. return 1;
  2311. }
  2312. ///////////////////////////////////////////////////////
  2313. CMD:armorall(playerid, params[], help)
  2314. {
  2315. if(PlayerInfo[playerid][pAdmin] < 3) return NemaOvlastenje(playerid);
  2316. new string[128];
  2317. foreach(Player,i) { SetPlayerArmour(i,100.0); }
  2318. format(string,sizeof(string),""SPLAVA"(( "SIVA"Admin %s je napunio pancir svim igracima "SPLAVA"))",ImeIgraca(playerid));
  2319. SCMTA(-1,string);
  2320. return 1;
  2321. }
  2322. CMD:admins(playerid, params[], help)
  2323. {
  2324. new string[1024]; format(string, sizeof(string), "");
  2325. foreach(Player, i)
  2326. {
  2327. if (PlayerInfo[i][pAdmin] >= 1 || PlayerInfo[i][pAdmin] <= 4)
  2328. {
  2329. new atext[20];
  2330. format(atext, sizeof(atext), ""SPLAVA"[ID %d] ", i);
  2331. strcat(string, atext);
  2332. strcat(string, ImeIgraca(i));
  2333. strcat(string, " | ");
  2334. strcat(string, "Admin Level: ");
  2335. format(atext, sizeof(atext), "%d", PlayerInfo[i][pAdmin]);
  2336. strcat(string, atext);
  2337. strcat(string, "\n");
  2338. }
  2339. }
  2340. if(strlen(string) == 0) return SCM(playerid, -1, ""SIVA"Nema admina online!");
  2341. ShowPlayerDialog(playerid, D_ADMINI, DIALOG_STYLE_MSGBOX, ""BELA"Admini Online", string, "Uredu", "Izlaz");
  2342. return 1;
  2343. }
  2344. CMD:agivegun(playerid, params[], help)
  2345. {
  2346. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2347. new id,idoruzija,municija,string[128];
  2348. if(sscanf(params, "uii", id, idoruzija, municija))
  2349. {
  2350. SCM(playerid,-1, ""ZUTA"GR:AS | "BELA"/agivegun [ID/Nick] [Weapon ID] [Municija]");
  2351. SCM(playerid,-1, ""ZUTA"Zabranjena oruzija su minigun i zolja i nemojte ici preko 999 metaka!");
  2352. return 1;
  2353. }
  2354. if(id == IPI) return PogresanID(playerid);
  2355. if(municija < 1 || municija > 999) return SCM(playerid,-1,""CRVENA"Ne mozete ici ispod 1 i preko 999!");
  2356. if(idoruzija == 38 || idoruzija == 35) return SCM(playerid,-1,""CRVENA"Ta oruzija su zabranjena!");
  2357. format(string,sizeof(string),""ZUTA"BU:RP] "BELA"Admin "CRVENA"%s "BELA"vam je dao oruzije ID "SPLAVA"%d!",ImeIgraca(playerid),idoruzija);
  2358. SCM(id,-1,string);
  2359. format(string,sizeof(string),""ZUTA"BU:RP] "BELA"Dali ste oruzije ID "CRVENA"%d "BELA"igracu "SPLAVA"%s!",idoruzija,ImeIgraca(id));
  2360. SCM(playerid,-1,string);
  2361. GivePlayerWeapon(id, idoruzija, municija);
  2362. return 1;
  2363. }
  2364. //////////////////////////////////////////////////
  2365. CMD:agivemoney(playerid, params[], help)
  2366. {
  2367. if(PlayerInfo[playerid][pAdmin] < 3) return NemaOvlastenje(playerid);
  2368. new id, novac, string[128];
  2369. if(sscanf(params, "ud", id, novac)) return SCM(playerid,-1, "GR:AS | "ZUTA"/agivemoney [ID/Ime] [Kolicina Novca]");
  2370. PlayerInfo[id][pNovac] += novac;
  2371. GivePlayerMoney(id, novac);
  2372. format(string, sizeof(string), ""SIVA"BU:RP] "SPLAVA"%s ti je dao $%d novca.", ImeIgraca(playerid), novac);
  2373. SCM(id, -1, string);
  2374. format(string, sizeof(string), ""SIVA"BU:RP] "SPLAVA"Dali ste %s %d novca.", ImeIgraca(id), novac);
  2375. SCM(playerid, -1, string);
  2376. format(string,sizeof(string),""SIVA"BU:RP] "SPLAVA"Admin %s je dao %s novca %d$!",ImeIgraca(playerid),ImeIgraca(id), novac);
  2377. AdminPoruka(-1, string);
  2378. return 1;
  2379. }
  2380. ///////////////////////////////////////////////////////
  2381. CMD:asetmoney(playerid, params[], help)
  2382. {
  2383. if(PlayerInfo[playerid][pAdmin] < 3) return NemaOvlastenje(playerid);
  2384. new id, novac, string[128];
  2385. if(sscanf(params, "ud", id, novac)) return SCM(playerid,-1, "GR:AS | "ZUTA"/asetmoney [ID/Ime] [Novac]");
  2386. ResetPlayerMoney(id);
  2387. GivePlayerMoney(id, novac);
  2388. format(string, sizeof(string), ""SIVA"BU:RP] "SPLAVA"%s ti je podesio novac na $%d.", ImeIgraca(playerid), novac);
  2389. SCM(id, -1, string);
  2390. format(string, sizeof(string), ""SIVA"BU:RP] "SPLAVA"Podesili ste %s novac na %d.", ImeIgraca(id), novac);
  2391. SCM(playerid, -1, string);
  2392. format(string,sizeof(string),""SIVA"BU:RP] "SPLAVA"Admin %s je postavio %s novca %d$!",ImeIgraca(playerid),ImeIgraca(id), novac);
  2393. AdminPoruka(-1, string);
  2394. return 1;
  2395. }
  2396. CMD:stats(playerid, params[], help)
  2397. {
  2398. new string[256];
  2399. SCM(playerid,-1,""CRVENA"------------------------------------ STATS ------------------------------------");
  2400. format(string, sizeof(string),""SPLAVA"Skor: %d | Ubistava: %d | Smrti: %d |",PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pUbistva],PlayerInfo[playerid][pSmrti]);
  2401. SCM(playerid,-1,string);
  2402. format(string, sizeof(string),""SPLAVA"Admin: %d | Novac: %d | Warn: %d/10",PlayerInfo[playerid][pAdmin],GetPlayerMoney(playerid));
  2403. SCM(playerid,-1,string);
  2404. return 1;
  2405. }
  2406. CMD:adminhelp(playerid, params[],help)
  2407. {
  2408. #pragma unused help
  2409. if(PlayerInfo[playerid][pAdmin] < 1) return NemaOvlastenje(playerid);
  2410. new ahelp[1080];
  2411. strcat(ahelp, ""SPLAVA"Admin Help: "SIVA"/makeadmin /ao /ban /kick /kill /mute /unmute /pchat /v(stvoriti vozilo)\n", sizeof(ahelp));
  2412. strcat(ahelp, ""SPLAVA"Admin Help: "SIVA"/rtc /setskin /jetpack /unbanip /specon /specoff /onduty /offduty /makevip\n", sizeof(ahelp));
  2413. strcat(ahelp, ""SPLAVA"Admin Help: "SIVA"/freeze /unfreeze /sethp /setarmor /a (admin chat) /gethere /goto /report /avipoff\n", sizeof(ahelp));
  2414. strcat(ahelp, ""SPLAVA"Admin Help: "SIVA"/pomoc /fixveh /nitro /slap /getip /explode /atime /aweather /cnn /warn /setmoney\n", sizeof(ahelp));
  2415. strcat(ahelp, ""SPLAVA"Admin Help: "SIVA"/offwarn /odg /cc /ateleport /gmx /healall /armorall /admins /makevip /agivemoney\n", sizeof(ahelp));
  2416. strcat(ahelp, ""SPLAVA"Admin Help: "SIVA"/kreirajkucu /izbrisikucu /portkuca /kreirajrent /izbrisirent /aktorpanel /kreirajtrafiku\n", sizeof(ahelp));
  2417. strcat(ahelp, ""SPLAVA"Admin Help: "SIVA"/kreirajkapiju /izbrisikapiju /kreirajnargilu", sizeof(ahelp));
  2418. SPD(playerid, D_AHELP, DIALOG_STYLE_MSGBOX, ""BELA"ADMIN HELP", ahelp, "Uredu", "Izlaz");
  2419. return 1;
  2420. }
  2421. CMD:kreirajrent(playerid, params[]) {
  2422.  
  2423. #pragma unused params
  2424.  
  2425. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Niste RCON admin.");
  2426. new Float:X, Float:Y, Float:Z, i = NextRentID(MAX_RENTS);
  2427. GetPlayerPos(playerid, X,Y,Z);
  2428. RentInfo[ i ][ rentID ] = CreatePickup(19132, 1, X,Y,Z, 0);
  2429. RentInfo[ i ][ RentLabel ] = Create3DTextLabel("[ RENT ]\n{FFFFFF}Da iznajmite vozilo, kucajte\n{0077C7}/rent", 0x0077C7FF, X, Y, Z, 10.0, 0, 0);
  2430. RentInfo[ i ][ rentX ] = X;
  2431. RentInfo[ i ][ rentY ] = Y;
  2432. RentInfo[ i ][ rentZ ] = Z;
  2433. SaveRent(i);
  2434. return 1;
  2435. }
  2436. CMD:izbrisirent(playerid, params[]) {
  2437.  
  2438. #pragma unused params
  2439.  
  2440. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Niste RCON admin.");
  2441. new i = GetNearestRent(playerid), rentFile[ 60 ];
  2442. if(i == -1) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Niste blizu rent pickup-a.");
  2443. DestroyPickup(RentInfo[ i ][ rentID ]);
  2444. Delete3DTextLabel(RentInfo[ i ][ RentLabel ]);
  2445. RentInfo[ i ][ rentX ] = 0.0;
  2446. RentInfo[ i ][ rentY ] = 0.0;
  2447. RentInfo[ i ][ rentZ ] = 0.0;
  2448. format(rentFile, sizeof(rentFile), RENT_FILE, i);
  2449. if(fexist(rentFile)) { fremove(rentFile); }
  2450. return 1;
  2451. }
  2452. // Sentinel 405 Faggio 462
  2453. CMD:rent(playerid, params[]) {
  2454.  
  2455. #pragma unused params
  2456.  
  2457. if(GetNearestRent(playerid) == -1) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Niste blizu rent pickup-a.");
  2458. if(IznajmioVozilo[ playerid ] != 0) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Vec ste iznajmili vozilo.");
  2459. ShowPlayerDialog(playerid, DIALOG_RENT, DIALOG_STYLE_LIST, "{0077C7}Iznamljivanje {FFFFFF}vozila", "Sentinel\nFaggio", "Izaberi","Izlaz");
  2460. return 1;
  2461. }
  2462. CMD:unrent(playerid, params[]) {
  2463.  
  2464. #pragma unused params
  2465.  
  2466. if(IznajmioVozilo[ playerid ] == 0) return SendClientMessage(playerid, 0x0077C7FF, "[ERROR] {FFFFFF}Niste iznajmili vozilo.");
  2467. KillTimer(RentTimer[ playerid ]);
  2468. DestroyVehicle(RentVeh[ playerid ]);
  2469. Delete3DTextLabel(RentVehLabel[ RentVeh[ playerid ] ]);
  2470. IznajmioVozilo[ playerid ] = 0;
  2471. if(RentOdabir[ playerid ] == 1) {
  2472. GivePlayerMoney(playerid, RentVreme[ playerid ]*100);
  2473. new str[ 120 ];
  2474. format(str, sizeof(str), "[UNRENT] {FFFFFF}Uspesno ste vratili iznamljeno vozilo te vam je vraceno %d$", RentVreme[ playerid ]*100);
  2475. SendClientMessage(playerid, 0x0077C7FF, str);
  2476. RentOdabir[ playerid ] = 0;
  2477. RentVreme[ playerid ] = 0;
  2478. RentVeh[ playerid ] = 0;
  2479. }
  2480. else if(RentOdabir[ playerid ] == 2) {
  2481. GivePlayerMoney(playerid, RentVreme[ playerid ]*70);
  2482. new str[ 120 ];
  2483. format(str, sizeof(str), "[UNRENT] {FFFFFF}Uspesno ste vratili iznamljeno vozilo te vam je vraceno %d$", RentVreme[ playerid ]*70);
  2484. SendClientMessage(playerid, 0x0077C7FF, str);
  2485. RentOdabir[ playerid ] = 0;
  2486. RentVreme[ playerid ] = 0;
  2487. RentVeh[ playerid ] = 0;
  2488. }
  2489. return 1;
  2490. }
  2491. CMD:aktorpanel(playerid, params[], help) {
  2492.  
  2493. #pragma unused params
  2494.  
  2495. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste ulogovani kao RCON admin.");
  2496. ShowPlayerDialog(playerid, DIALOG_AKTORPANEL, DIALOG_STYLE_LIST, "{0077C7}AKTOR {FFFFFF}PANEL", "Kreiraj aktora\nDodaj aktoru animaciju\nIzmeni aktora\nIzbrisi aktora","Izaberi","Izlaz");
  2497. return 1;
  2498. }
  2499. CMD:kreirajtrafiku( playerid, params[] ) {
  2500. if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "{008467}[ TRAFIKA ]: {FFFFFF}Morate se ulogovati na rcon.");
  2501. new Float:X,Float:Y,Float:Z, i = next_trafika_ID( MAX_TRAFIKA );
  2502. GetPlayerPos(playerid, X,Y,Z);
  2503. trafika_object[ i ] = CreateObject(1571, X,Y,Z, 0.0,0.0,0.0, 300.0);
  2504. EditObject(playerid, trafika_object[ i ]);
  2505. KreiraTrafiku[ playerid ] = i;
  2506. SendClientMessage(playerid, -1, "{008467}[ TRAFIKA ]: {FFFFFF}Uspesno ste poceli kreiranje trafike.");
  2507. return true;
  2508. }
  2509. CMD:trafika( playerid, params[] ) {
  2510. for( new i; i < MAX_TRAFIKA; i++ ) {
  2511. if( IsPlayerInRangeOfPoint( playerid, 3.0, TrafikaInfo[ i ][ PosX ], TrafikaInfo[ i ][ PosY ], TrafikaInfo[ i ][ PosZ ] )) {
  2512. ShowPlayerDialog(playerid, dialog_TRAFIKA, DIALOG_STYLE_TABLIST_HEADERS, "{008467}- {FFFFFF}TRAFIKA {008467}-",
  2513. "Vrsta\tKolicina\tCena\n\
  2514. Cokoladica\t1 cokoladica\t$50\n\
  2515. Pomrfit\t1 pomfrit\t$500",
  2516. "{008467}Potvrdi", "Izlaz");
  2517. }
  2518. }
  2519. return true;
  2520. }
  2521. CMD:kreirajkapiju(playerid, params[], help) {
  2522.  
  2523. new objid, closetime, Float:closespeed, i = NextPKID(MAX_PRIVKAPIJE);
  2524. if(sscanf(params, "ddf", objid, closetime, closespeed)) return SendClientMessage(playerid, -1, "/kreirajpk [Object ID] [Vreme zatvaranja] [Brzina zatvaranja]");
  2525. PkInfo[ i ][ pkObjID ] = objid;
  2526. PkInfo[ i ][ pkCloseTime ] = closetime;
  2527. PkInfo[ i ][ pkCloseSpeed ] = closespeed;
  2528. KreiraPK[ playerid ] = i;
  2529. ShowPlayerDialog(playerid, DIALOG_GATECREATE, DIALOG_STYLE_LIST, "KREIRANJE PRIVATNE KAPIJE","V.I.P\nIgrac\nSvi igraci","U redu","Izlaz");
  2530. return 1;
  2531. }
  2532. CMD:izbrisikapiju(playerid, params[], help) {
  2533.  
  2534. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON admin.");
  2535. new i = GetNearestPK(playerid), pkFile[ 60 ];
  2536. if(i == -1) return SendClientMessage(playerid, -1, "Niste u blizini kapije.");
  2537. DestroyObject(PkInfo[ i ][ pkID ]);
  2538. Delete3DTextLabel(PkLabel[ i ]);
  2539. PkInfo[ i ][ pkX ] = 0.0;
  2540. PkInfo[ i ][ pkY ] = 0.0;
  2541. PkInfo[ i ][ pkZ ] = 0.0;
  2542. PkInfo[ i ][ pkRX ] = 0.0;
  2543. PkInfo[ i ][ pkRY ] = 0.0;
  2544. PkInfo[ i ][ pkRZ ] = 0.0;
  2545. format(pkFile, sizeof(pkFile), PRIVKAPIJE_FILE, i);
  2546. if(fexist(pkFile)) { fremove(pkFile); }
  2547. return 1;
  2548. }
  2549. CMD:nargilaoff(playerid, params[], help) {
  2550.  
  2551. if(NargiluIznajmio[ playerid ] == 0) return SendClientMessage(playerid, -1, "Niste iznajmili nargilu.");
  2552. new i = NargiluIznajmio[ playerid ];
  2553. Update3DTextLabelText(NargilaLabel[ i ], 0xFFFFFFFF, "/nargila\nNije iznamljena.");
  2554. NargilaInfo[ i ][ IznajmioNargilu ] = -1;
  2555. NargilaInfo[ i ][ IznamljenaNargila ] = false;
  2556. NargiluIznajmio[ playerid ] = 0;
  2557. KillTimer(NargilaTimer[ playerid ]);
  2558. SendClientMessage(playerid, -1, "Vise ne iznamljujete nargilu.");
  2559. return 1;
  2560. }
  2561. CMD:kreirajnargilu(playerid, params[], help) {
  2562.  
  2563. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON Admin.");
  2564. new i = NextNargilaID(sizeof(NargilaInfo)), Float:X,Float:Y,Float:Z;
  2565. GetPlayerPos(playerid, X,Y,Z);
  2566. NargilaInfo[ i ][ nargilaID ] = CreateObject(2726, X, Y, Z, 0.0, 0.0, 0.0);
  2567. EditObject(playerid, NargilaInfo[ i ][ nargilaID ]);
  2568. KreiraNargilu[ playerid ] = i;
  2569. SendClientMessage(playerid, -1, "Zapoceli ste kreiranje nargile.");
  2570. NargilaInfo[ i ][ IznajmioNargilu ] = -1;
  2571. return 1;
  2572. }
  2573. CMD:nargila(playerid, params[], help) {
  2574.  
  2575. for(new i; i < sizeof(NargilaInfo); i++) {
  2576. if(IsPlayerInRangeOfPoint(playerid, 3.0, NargilaInfo[ i ][ nargilaPosX ], NargilaInfo[ i ][ nargilaPosY ], NargilaInfo[ i ][ nargilaPosZ ])) {
  2577. if(NargilaInfo[ i ][ IznajmioNargilu ] != playerid && NargilaInfo[ i ][ IznamljenaNargila ] == true) return SendClientMessage(playerid, -1, "Ta nargila je vec iznamljena.");
  2578. if(NargiluIznajmio[ playerid ] != 0) return SendClientMessage(playerid, -1, "Vec ste iznajmili nargilu ( /nargilaoff )");
  2579. ShowPlayerDialog(playerid, DIALOG_NARGILARENT, DIALOG_STYLE_INPUT, "NARGILA","Upisite vreme iznamljivanja nargile.\nNajmanje - 1 minut, najvise - 5 minuta.","U redu","Odustani");
  2580. }
  2581. }
  2582. return 1;
  2583. }
  2584. //------------------------------------------
  2585. GetNearestRent( playerid ) {
  2586.  
  2587. for( new i = 1; i < MAX_RENTS; i++) {
  2588.  
  2589. if( IsPlayerInRangeOfPoint( playerid, 3.0, RentInfo[ i ][ rentX ], RentInfo[ i ][ rentY ], RentInfo[ i ][ rentZ ] ) ) { return i; }
  2590. }
  2591. return -1;
  2592. }
  2593. stock NextRentID(const len) {
  2594. new id = (-1);
  2595. for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  2596. provjera = ( loop+1 );
  2597. format( Data_, ( sizeof Data_ ), RENT_FILE, provjera );
  2598. if(!fexist(Data_)) {
  2599. id = ( provjera );
  2600. break; } }
  2601. return ( id );
  2602. }
  2603. stock SaveRent(id) {
  2604.  
  2605. new rentFile[ 60 ];
  2606. format(rentFile, sizeof(rentFile), RENT_FILE, id);
  2607. new INI:File = INI_Open(rentFile);
  2608. INI_WriteFloat(File, "Lokacija_X", RentInfo[ id ][ rentX ]);
  2609. INI_WriteFloat(File, "Lokacija_Y", RentInfo[ id ][ rentY ]);
  2610. INI_WriteFloat(File, "Lokacija_Z", RentInfo[ id ][ rentZ ]);
  2611. INI_Close(File);
  2612. return 1;
  2613. }
  2614. GetNearestAktor( playerid ) {
  2615. for( new b = 1; b < sizeof(AktorInfo); b++) {
  2616. if( IsPlayerInRangeOfPoint( playerid, 4.0, AktorInfo[ b ][ aktorX ], AktorInfo[ b ][ aktorY ], AktorInfo[ b ][ aktorZ ] ) ) return b; }
  2617. return -1;
  2618. }
  2619. stock NextAktorID(const len) {
  2620. new id = (-1);
  2621. for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  2622. provjera = ( loop+1 );
  2623. format( Data_, ( sizeof Data_ ), AKTOR_FILE, provjera );
  2624. if(!fexist(Data_)) {
  2625. id = ( provjera );
  2626. break; } }
  2627. return ( id );
  2628. }
  2629. stock SaveAktor(id) {
  2630. new aktorFile[ 60 ];
  2631. format(aktorFile, sizeof(aktorFile), AKTOR_FILE, id);
  2632. new INI:File = INI_Open(aktorFile);
  2633. INI_WriteString(File, "Ime", AktorInfo[ id ][ aktorime ]);
  2634. INI_WriteFloat(File, "Lokacija_X", AktorInfo[ id ][ aktorX ]);
  2635. INI_WriteFloat(File, "Lokacija_Y", AktorInfo[ id ][ aktorY ]);
  2636. INI_WriteFloat(File, "Lokacija_Z", AktorInfo[ id ][ aktorZ ]);
  2637. INI_WriteFloat(File, "Rotacija_A", AktorInfo[ id ][ aktorA ]);
  2638. INI_WriteInt(File, "Skin", AktorInfo[ id ][ aktorskin ]);
  2639. INI_Close(File);
  2640. }
  2641. forward TimerClosePK(i); public TimerClosePK(i) {
  2642.  
  2643. MoveObject(PkInfo[ i ][ pkID ], PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ], PkInfo[ i ][ pkCloseSpeed ], PkInfo[ i ][ pkRX ], PkInfo[ i ][ pkRY ], PkInfo[ i ][ pkRZ ]);
  2644. PkInfo[ i ][ pkOtvorena ] = false;
  2645. return 1;
  2646. }
  2647. forward LoadPK(id, name[], value[]); public LoadPK(id, name[], value[]) {
  2648.  
  2649. INI_Float("Lokacija_X", PkInfo[ id ][ pkX ]);
  2650. INI_Float("Lokacija_Y", PkInfo[ id ][ pkY ]);
  2651. INI_Float("Lokacija_Z", PkInfo[ id ][ pkZ ]);
  2652. INI_Float("Rotacija_X", PkInfo[ id ][ pkRX ]);
  2653. INI_Float("Rotacija_Y", PkInfo[ id ][ pkRY ]);
  2654. INI_Float("Rotacija_Z", PkInfo[ id ][ pkRZ ]);
  2655. INI_Float("Otvorena_X", PkInfo[ id ][ pkoX ]);
  2656. INI_Float("Otvorena_Y", PkInfo[ id ][ pkoY ]);
  2657. INI_Float("Otvorena_Z", PkInfo[ id ][ pkoZ ]);
  2658. INI_Float("Otvorena_RX", PkInfo[ id ][ pkoRX ]);
  2659. INI_Float("Otvorena_RY", PkInfo[ id ][ pkoRY ]);
  2660. INI_Float("Otvorena_RZ", PkInfo[ id ][ pkoRZ ]);
  2661. INI_Int("Object_ID", PkInfo[ id ][ pkObjID ]);
  2662. INI_Int("Close_Time", PkInfo[ id ][ pkCloseTime ]);
  2663. INI_Float("Close_Speed", PkInfo[ id ][ pkCloseSpeed ]);
  2664. INI_String("For_Player", PkInfo[ id ][ pkForPlayer ], 24);
  2665. INI_Bool("For_VIPS", PkInfo[ id ][ pkForVips ]);
  2666. INI_Bool("For_All", PkInfo[ id ][ pkForAll ]);
  2667. return 1;
  2668. }
  2669. stock NextPKID(const len) {
  2670. new id = (-1);
  2671. for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  2672. provjera = ( loop+1 );
  2673. format( Data_, ( sizeof Data_ ), PRIVKAPIJE_FILE, provjera );
  2674. if(!fexist(Data_)) {
  2675. id = ( provjera );
  2676. break; } }
  2677. return ( id );
  2678. }
  2679. GetNearestPK( playerid ) {
  2680. for( new i = 1; i < MAX_PRIVKAPIJE; i++) {
  2681. if( IsPlayerInRangeOfPoint( playerid, 6.0, PkInfo[ i ][ pkX ], PkInfo[ i ][ pkY ], PkInfo[ i ][ pkZ ] ) ) { return i; }
  2682. }
  2683. return -1;
  2684. }
  2685. stock SavePK(id) {
  2686.  
  2687. new pkFile[ 60 ];
  2688. format(pkFile, sizeof(pkFile), PRIVKAPIJE_FILE, id);
  2689. new INI:File = INI_Open(pkFile);
  2690. INI_WriteFloat(File, "Lokacija_X", PkInfo[ id ][ pkX ]);
  2691. INI_WriteFloat(File, "Lokacija_Y", PkInfo[ id ][ pkY ]);
  2692. INI_WriteFloat(File, "Lokacija_Z", PkInfo[ id ][ pkZ ]);
  2693. INI_WriteFloat(File, "Rotacija_X", PkInfo[ id ][ pkRX ]);
  2694. INI_WriteFloat(File, "Rotacija_Y", PkInfo[ id ][ pkRY ]);
  2695. INI_WriteFloat(File, "Rotacija_Z", PkInfo[ id ][ pkRZ ]);
  2696. INI_WriteFloat(File, "Otvorena_X", PkInfo[ id ][ pkoX ]);
  2697. INI_WriteFloat(File, "Otvorena_Y", PkInfo[ id ][ pkoY ]);
  2698. INI_WriteFloat(File, "Otvorena_Z", PkInfo[ id ][ pkoZ ]);
  2699. INI_WriteFloat(File, "Otvorena_RX", PkInfo[ id ][ pkoRX ]);
  2700. INI_WriteFloat(File, "Otvorena_RY", PkInfo[ id ][ pkoRY ]);
  2701. INI_WriteFloat(File, "Otvorena_RZ", PkInfo[ id ][ pkoRZ ]);
  2702. INI_WriteInt(File, "Object_ID", PkInfo[ id ][ pkObjID ]);
  2703. INI_WriteInt(File, "Close_Time", PkInfo[ id ][ pkCloseTime ]);
  2704. INI_WriteFloat(File, "Close_Speed", PkInfo[ id ][ pkCloseSpeed ]);
  2705. INI_WriteString(File, "For_Player", PkInfo[ id ][ pkForPlayer ]);
  2706. INI_WriteBool(File, "For_VIPS", PkInfo[ id ][ pkForVips ]);
  2707. INI_WriteBool(File, "For_All", PkInfo[ id ][ pkForAll ]);
  2708. INI_Close(File);
  2709. return 1;
  2710. }
  2711. stock GetName( playerid ) {
  2712. new name[24];
  2713. GetPlayerName(playerid,name,24);
  2714. return name;
  2715. }
  2716. forward OcitajNargilu(id, name[], value[]);
  2717. public OcitajNargilu(id, name[], value[]) {
  2718. INI_Float("Lokacija_X", NargilaInfo[ id ][ nargilaPosX ]);
  2719. INI_Float("Lokacija_Y", NargilaInfo[ id ][ nargilaPosY ]);
  2720. INI_Float("Lokacija_Z", NargilaInfo[ id ][ nargilaPosZ ]);
  2721. INI_Float("Rotacija_X", NargilaInfo[ id ][ nargilaRotX ]);
  2722. INI_Float("Rotacija_Y", NargilaInfo[ id ][ nargilaRotY ]);
  2723. INI_Float("Rotacija_Z", NargilaInfo[ id ][ nargilaRotZ ]);
  2724. return 1;
  2725. }
  2726. forward UnrentNargila(playerid);
  2727. public UnrentNargila(playerid) {
  2728.  
  2729. new i = NargiluIznajmio[ playerid ];
  2730. Update3DTextLabelText(NargilaLabel[ i ], 0xFFFFFFFF, "/nargila\nNije iznamljena.");
  2731. NargilaInfo[ i ][ IznajmioNargilu ] = -1;
  2732. NargilaInfo[ i ][ IznamljenaNargila ] = false;
  2733. NargiluIznajmio[ playerid ] = 0;
  2734. SendClientMessage(playerid, -1, "Vise ne iznamljujete nargilu.");
  2735. return 1;
  2736. }
  2737. stock NextNargilaID(const len) {
  2738. new id = (-1);
  2739. for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
  2740. provjera = ( loop+1 );
  2741. format( Data_, ( sizeof Data_ ), "/Nargile/%d.ini", provjera );
  2742. if(!fexist(Data_)) {
  2743. id = ( provjera );
  2744. break; } }
  2745. return ( id );
  2746. }
  2747. stock SaveNargila(id) {
  2748. new nFile[ 60 ];
  2749. format(nFile, sizeof(nFile), "/Nargile/%d.ini", id);
  2750. new INI:File = INI_Open(nFile);
  2751. INI_WriteFloat(File, "Lokacija_X", NargilaInfo[ id ][ nargilaPosX ]);
  2752. INI_WriteFloat(File, "Lokacija_Y", NargilaInfo[ id ][ nargilaPosY ]);
  2753. INI_WriteFloat(File, "Lokacija_Z", NargilaInfo[ id ][ nargilaPosZ ]);
  2754. INI_WriteFloat(File, "Rotacija_X", NargilaInfo[ id ][ nargilaRotX ]);
  2755. INI_WriteFloat(File, "Rotacija_Y", NargilaInfo[ id ][ nargilaRotY ]);
  2756. INI_WriteFloat(File, "Rotacija_Z", NargilaInfo[ id ][ nargilaRotZ ]);
  2757. INI_Close(File);
  2758. }
RAW Paste Data