Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2021
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.63 KB | None | 0 0
  1. //-------------[PECANJE SISTEM]---------------//
  2. //---------------[BY GOPPERT]-----------------//
  3. //----------------[INCLUDES]------------------//
  4. #include <a_samp>
  5.  
  6. #undef MAX_PLAYERS
  7. #define MAX_PLAYERS 100
  8.  
  9. #include <streamer>
  10. #include <sscanf2>
  11. #include <YSI\y_ini>
  12. #include <YSI\y_va>
  13. #include <YSI\y_timers>
  14. #include <PAWN.cmd>
  15. //----------------[DEFINICIJE]----------------//
  16. #define CIJENASTAPA 2000
  17. #define CIJENAMAMCA 150
  18. #define MAX_TRG 10
  19.  
  20. enum
  21. {
  22. DIALOG_PECANJEOPREMA,
  23. DIALOG_KUPOVINAMAMCA,
  24. DIALOG_PANEL,
  25. DIALOG_PANEL2
  26. }
  27.  
  28. //----------------[VARIJABLE]----------------//
  29. new Peca[MAX_PLAYERS],KreiraShop[MAX_PLAYERS] = -1;
  30.  
  31. enum rInfo
  32. {
  33. Novac,
  34. StapPecanje,
  35. Mamac,
  36. Riba
  37. }
  38. new RibarInfo[MAX_PLAYERS][rInfo];
  39.  
  40. new Text3D:TrgovinaLabel[MAX_TRG],TrgovinaPickup[MAX_TRG];
  41. new Float:PickupPos[MAX_TRG][3],Kreirana[MAX_TRG],Trgovinaarea[MAX_TRG],TrgMapIcon[MAX_TRG],interierarea;
  42.  
  43.  
  44. //----------------[PUBLICS]----------------//
  45. public OnGameModeInit()
  46. {
  47. DisableInteriorEnterExits();
  48.  
  49. new komada = 0;
  50. for(new d; d < MAX_TRG; d++)
  51. {
  52. new TrgovinaFile[50],string[72];
  53. format(TrgovinaFile, sizeof(TrgovinaFile), "/Trgovine/%d.ini", d);
  54. if(fexist(TrgovinaFile))
  55. {
  56. INI_ParseFile(TrgovinaFile, "UcitajTrgovinu", .bExtra = true, .extra = d);
  57. if(Kreirana[d] == 1)
  58. {
  59. format(string,sizeof(string),"Trgovina Ribarske Opreme\nPritisnite 'F' za ulazak\nID: %d",d);
  60. TrgovinaLabel[d] = Create3DTextLabel(string,-1,PickupPos[d][0],PickupPos[d][1],PickupPos[d][2], 15.0,0,0);
  61. TrgovinaPickup[d] = CreatePickup(1239, 1, PickupPos[d][0],PickupPos[d][1],PickupPos[d][2]);
  62. Trgovinaarea[d] = CreateDynamicSphere(PickupPos[d][0], PickupPos[d][1], PickupPos[d][2], 1.3, -1, -1, -1);
  63. TrgMapIcon[d] = CreateDynamicMapIcon(PickupPos[d][0],PickupPos[d][1],PickupPos[d][2], 56, -1, 0, 0, -1, 3000.0);
  64. komada ++;
  65. }
  66. }
  67. }
  68. printf("- Trgovine ribolovske opreme uspjesno ucitane. %d trgovina",komada);
  69. interierarea = CreateDynamicSphere(255.2819,-41.5168,1002.0234, 1.2, -1, 14, -1);
  70. //----------------[INT TRGOVINE]----------------//
  71. CreateDynamicObject(2626, 256.050415, -40.543006, 1001.543945, 0.000000, 0.000000, 0.000000);
  72. CreateDynamicObject(1567, 257.387603, -39.120681, 1000.883300, 0.000000, 0.000000, 0.000000);
  73. CreateDynamicObject(1806, 255.970336, -39.536037, 1001.023437, 0.000000, 0.000000, 180.000000);
  74. CreateDynamicObject(18632, 259.436248, -39.419803, 1001.135437, 0.000000, 195.000000, 0.000000);
  75. CreateDynamicObject(18632, 259.436248, -39.529796, 1001.135437, 0.000000, 195.000000, 0.000000);
  76. CreateDynamicObject(18632, 259.436248, -39.619781, 1001.135437, 0.000000, 195.000000, 0.000000);
  77. CreateDynamicObject(18632, 259.436248, -39.699768, 1001.135437, 0.000000, 195.000000, 0.000000);
  78. CreateDynamicObject(18632, 259.436248, -39.789756, 1001.135437, 0.000000, 195.000000, 0.000000);
  79. CreateDynamicObject(18632, 259.436248, -39.879753, 1001.135437, 0.000000, 195.000000, 0.000000);
  80. CreateDynamicObject(19565, 257.547973, -43.774082, 1002.704101, 0.000000, 0.000000, 46.799987);
  81. CreateDynamicObject(19566, 257.306762, -43.753383, 1002.704101, 0.000000, 0.000000, 46.799987);
  82. CreateDynamicObject(19566, 257.030059, -43.726737, 1002.704101, 0.000000, 0.000000, 46.799987);
  83. CreateDynamicObject(19566, 256.725372, -43.715095, 1002.704101, 0.000000, 0.000000, 46.799987);
  84. CreateDynamicObject(19566, 256.428497, -43.724460, 1002.704101, 0.000000, 0.000000, 46.799987);
  85. CreateDynamicObject(19566, 256.137939, -43.712394, 1002.704101, 0.000000, 0.000000, 46.799987);
  86. CreateDynamicObject(19573, 257.950012, -43.969707, 1001.033447, 0.000000, 0.000000, 0.000000);
  87. CreateDynamicObject(19573, 257.559844, -43.969707, 1001.033447, 0.000000, 0.000000, 0.000000);
  88. CreateDynamicObject(19573, 257.169769, -43.969707, 1001.033447, 0.000000, 0.000000, 0.000000);
  89. CreateDynamicObject(19565, 258.645446, -43.803211, 1002.704101, 0.000000, 0.000000, 46.799987);
  90. CreateDynamicObject(19565, 258.390167, -43.782978, 1002.704101, 0.000000, 0.000000, 46.799987);
  91. CreateDynamicObject(19565, 258.078277, -43.764522, 1002.704101, 0.000000, 0.000000, 46.799987);
  92. CreateDynamicObject(19565, 257.822845, -43.744270, 1002.704101, 0.000000, 0.000000, 46.799987);
  93. CreateDynamicObject(19831, 259.383544, -43.382118, 1000.993408, 0.000000, 0.000000, -90.000000);
  94. CreateDynamicObject(1775, 254.159408, -43.122272, 1002.104187, 0.000000, 0.000000, 90.000000);
  95. CreateDynamicObject(1776, 255.199096, -44.032176, 1002.024108, 0.000000, 0.000000, 180.000000);
  96. return 1;
  97. }
  98. public OnGameModeExit()
  99. {
  100. for(new d; d < MAX_TRG; d++) { SacuvajTrgovinu(d); }
  101. return 1;
  102. }
  103. public OnPlayerConnect(playerid)
  104. {
  105. defer spawnuj(playerid);
  106. INI_ParseFile(RibarPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  107. if(!fexist(RibarPath(playerid)))
  108. {
  109. RibarInfo[playerid][Novac] = 10000;
  110. SacuvajRibara(playerid);
  111. }
  112. RemoveBuildingForPlayer(playerid, 2087, 257.8047, -43.8438, 1001.0313, 0.25);
  113. RemoveBuildingForPlayer(playerid, 2103, 258.1953, -43.7422, 1002.6953, 0.25);
  114. RemoveBuildingForPlayer(playerid, 2406, 259.5781, -43.2656, 1002.2266, 0.25);
  115. RemoveBuildingForPlayer(playerid, 2295, 258.6563, -42.7578, 1001.0234, 0.25);
  116. RemoveBuildingForPlayer(playerid, 2295, 259.2344, -39.7422, 1001.0234, 0.25);
  117. return 1;
  118. }
  119. public OnPlayerDisconnect(playerid, reason)
  120. {
  121. KreiraShop[playerid] = -1; Peca[playerid] = -1; SacuvajRibara(playerid);
  122. return 1;
  123. }
  124. public OnPlayerSpawn(playerid)
  125. {
  126. if(IsPlayerNPC(playerid)) return 1;
  127. SetPlayerInterior(playerid,0);
  128. TogglePlayerClock(playerid,0);
  129. ResetPlayerMoney(playerid);
  130. GivePlayerMoney(playerid,RibarInfo[playerid][Novac]);
  131. SetPlayerPos(playerid, 379.530, -2020.623, 7.83);
  132. GivePlayerWeapon(playerid,24,100);
  133. return 1;
  134. }
  135. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  136. {
  137. switch(dialogid)
  138. {
  139. case DIALOG_PECANJEOPREMA:
  140. {
  141. if(response)
  142. {
  143. if(listitem == 0)
  144. {
  145. if(RibarInfo[playerid][StapPecanje] != 0) return SendClientMessage(playerid,-1,"Vec posjedujes stap za pecanje");
  146. if(RibarInfo[playerid][Novac] < CIJENASTAPA) return va_SendClientMessage(playerid,-1,"Nemas dovoljno novca (%d$)",CIJENASTAPA);
  147. RibarInfo[playerid][StapPecanje] = 5+random(15);
  148. RibarInfo[playerid][Novac] -= CIJENASTAPA;
  149. GivePlayerMoney(playerid, -CIJENASTAPA);
  150. }
  151. if(listitem == 1)
  152. {
  153. if(RibarInfo[playerid][Mamac] >= 20) return SendClientMessage(playerid,-1,"Vec imas maksimalnu kolicinu mamca (20)");
  154. va_ShowPlayerDialog(playerid, DIALOG_KUPOVINAMAMCA,DIALOG_STYLE_INPUT, "Ribarska Oprema","Unesite kolicinu mamca koju zelite kupiti\nKolicina koju posjedujete %d/20\n{FF0000}Cijena mamca\t{33AA33}%d$/komadu",RibarInfo[playerid][Mamac],CIJENAMAMCA);
  155. }
  156. }
  157. }
  158. case DIALOG_KUPOVINAMAMCA:
  159. {
  160. if(response)
  161. {
  162. new kolicina;
  163. if(sscanf(inputtext, "d", kolicina)) return va_ShowPlayerDialog(playerid, DIALOG_KUPOVINAMAMCA,DIALOG_STYLE_INPUT, "Ribarska Oprema","Unesite kolicinu mamca koju zelite kupiti\nKolicina koju posjedujete %d/20\n{FF0000}Cijena mamca\t{33AA33}%d$/komadu",RibarInfo[playerid][Mamac],CIJENAMAMCA);
  164. if(kolicina < 1 || kolicina > 20 || kolicina+RibarInfo[playerid][Mamac] > 20) return SendClientMessage(playerid, -1, "Ne mozes kupiti manje od 1 i vise od 20 komada mamca");
  165. if(kolicina*CIJENAMAMCA >= RibarInfo[playerid][Novac]) return va_SendClientMessage(playerid, -1, "Nemas dovoljno novca. Fali %d$",RibarInfo[playerid][Novac]-(kolicina*CIJENAMAMCA));
  166. RibarInfo[playerid][Mamac] += kolicina;
  167. RibarInfo[playerid][Novac] -= kolicina*CIJENAMAMCA;
  168. GivePlayerMoney(playerid, -kolicina*CIJENAMAMCA);
  169. va_SendClientMessage(playerid,-1,"Kupio si %d komada mamca i platio %d$",kolicina,kolicina*CIJENAMAMCA);
  170. }
  171. }
  172. case DIALOG_PANEL:
  173. {
  174. if(!response) return 1;
  175. if(response)
  176. {
  177. switch(listitem)
  178. {
  179. case 0:
  180. {
  181. if(KreiraShop[playerid] != -1) return va_SendClientMessage(playerid,-1,"Vec kreiras trgovinu id %d",KreiraShop[playerid]);
  182. for(new d = 0; d < MAX_TRG; d++)
  183. {
  184. new TrgovinaFile[50];
  185. format(TrgovinaFile, sizeof(TrgovinaFile), "Trgovine/%d.ini", d);
  186. if(!fexist(TrgovinaFile))
  187. {
  188. KreiraShop[playerid] = d;
  189. SendClientMessage(playerid,-1,"Pritisnite 'Y' kad budete na lokaciji kreiranja trgovine ribarske opreme");
  190. return 1;
  191. }
  192. }
  193. return SendClientMessage(playerid,-1,"Kreiran je maksimalan broj trgovina ribarske opreme");
  194. }
  195. case 1:
  196. {
  197. ShowPlayerDialog(playerid, DIALOG_PANEL2, DIALOG_STYLE_INPUT, "Panel", "Unesite ID trgovine koji zelite obrisati", "Unesi", "Zatvori");
  198. }
  199. }
  200. }
  201. }
  202. case DIALOG_PANEL2:
  203. {
  204. if(!response) return 1;
  205. if(response)
  206. {
  207. new TrgovinaFile[60],id;
  208. if(sscanf(inputtext, "i", id)) return ShowPlayerDialog(playerid, DIALOG_PANEL2, DIALOG_STYLE_INPUT, "Panel", "Unesite ID trgovine koji zelite obrisati", "Unesi", "Zatvori");
  209. if(id == -1 || id > MAX_TRG || Kreirana[id] == 0) return SendClientMessage(playerid,-1,"Pogresan ID ili trgovina nije kreirana");
  210. DestroyPickup(TrgovinaPickup[id]); Delete3DTextLabel(TrgovinaLabel[id]); DestroyDynamicMapIcon(TrgMapIcon[id]); DestroyDynamicArea(Trgovinaarea[id]);
  211. Kreirana[id] = 0; va_SendClientMessage(playerid,-1,"Uspjesno ste obrisali trgovinu ribarske opreme ID %d!",id);
  212. format(TrgovinaFile, sizeof(TrgovinaFile), "Trgovine/%d.ini", id);
  213. if(fexist(TrgovinaFile))
  214. {
  215. fremove(TrgovinaFile);
  216. }
  217. }
  218. }
  219. }
  220. return 1;
  221. }
  222. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  223. {
  224. if(newkeys == KEY_YES)
  225. {
  226. if(KreiraShop[playerid] != -1)
  227. {
  228. new d = KreiraShop[playerid],Float:Pos[3],string[72];
  229. format(string,sizeof(string),"Trgovina Ribarske Opreme\nPritisnite 'F' za ulazak\nID: %d",d);
  230. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); PickupPos[d][0] = Pos[0]; PickupPos[d][1] = Pos[1]; PickupPos[d][2] = Pos[2]; Kreirana[d] = 1;
  231. TrgovinaLabel[d] = Create3DTextLabel(string,-1,PickupPos[d][0],PickupPos[d][1],PickupPos[d][2], 15.0,0,0);
  232. TrgovinaPickup[d] = CreatePickup(1239, 1, PickupPos[d][0],PickupPos[d][1],PickupPos[d][2]);
  233. Trgovinaarea[d] = CreateDynamicSphere(PickupPos[d][0], PickupPos[d][1], PickupPos[d][2], 1.5, -1, -1, -1);
  234. TrgMapIcon[d] = CreateDynamicMapIcon(PickupPos[d][0],PickupPos[d][1],PickupPos[d][2], 56, -1, 0, 0, -1, 3000.0);
  235. SacuvajTrgovinu(d); KreiraShop[playerid] = -1;
  236. return 1;
  237. }
  238. }
  239. if(newkeys == KEY_SECONDARY_ATTACK)
  240. {
  241. if(IsPlayerInAnyDynamicArea(playerid, 0))
  242. {
  243. for(new d = 0; d < MAX_TRG; d++)
  244. {
  245. if(IsPlayerInDynamicArea(playerid,Trgovinaarea[d], 0))
  246. {
  247. SetPlayerVirtualWorld(playerid, d); SetPlayerInterior(playerid, 14);
  248. SetPlayerPos(playerid, 255.2819,-41.5168,1002.0234);
  249. GameTextForPlayer(playerid, "~b~/kupi~n~ ~w~da kupite ribarsku opremu", 2000, 5);
  250. return 1;
  251. }
  252. }
  253. }
  254. if(IsPlayerInDynamicArea(playerid,interierarea, 0))
  255. {
  256. new d = GetPlayerVirtualWorld(playerid);
  257. SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0);
  258. SetPlayerPos(playerid, PickupPos[d][0],PickupPos[d][1],PickupPos[d][2]);
  259. return 1;
  260. }
  261. }
  262. return 1;
  263. }
  264. //----------------[KOMANDE]----------------//
  265. CMD:kupi(playerid, params[])
  266. {
  267. if(!IsPlayerInDynamicArea(playerid,interierarea, 0)) return SendClientMessage(playerid,-1,"Niste na mjestu kupovine ribarske opreme");
  268. va_ShowPlayerDialog(playerid, DIALOG_PECANJEOPREMA,DIALOG_STYLE_TABLIST_HEADERS, "Ribarska Oprema" , "Oprema\tCijena Opreme:\n{FF0000}Stap za pecanje\t{33AA33}%d$\n{FF0000}Mamac\t{33AA33}%d$",CIJENASTAPA,CIJENAMAMCA);
  269. return 1;
  270. }
  271. CMD:pecaj(playerid, params[])
  272. {
  273. if(Peca[playerid] != 0) return SendClientMessage(playerid,-1,"Vec pecate");
  274. if(RibarInfo[playerid][StapPecanje] == 0) return SendClientMessage(playerid,-1,"Ne posjedujes stap za pecanje");
  275. if(RibarInfo[playerid][Mamac] < 1) return SendClientMessage(playerid,-1,"Nemas mamac za pecanje kupi ga u trgovini ribarske opreme");
  276. defer PecaRibu(playerid);
  277. SetPlayerAttachedObject(playerid, 3,18632,6,0.079376,0.037070,0.007706,181.482910,0.000000,0.000000,1.000000,1.000000,1.000000);
  278. TogglePlayerControllable(playerid,false);
  279. SetPlayerFacingAngle(playerid,179.688461);
  280. ApplyAnimation(playerid,"SWORD","sword_block",50.0,0,1,0,1,1);
  281. RibarInfo[playerid][Mamac] --;
  282. Peca[playerid] = 1;
  283. return 1;
  284. }
  285. CMD:stats(playerid, params[])
  286. {
  287. va_SendClientMessage(playerid,-1,"Novac: %d$ | Riba: %d kg| Mamac %d/20 komada",RibarInfo[playerid][Novac],RibarInfo[playerid][Riba],RibarInfo[playerid][Mamac]);
  288. return 1;
  289. }
  290. CMD:panel(playerid, params[])
  291. {
  292. ShowPlayerDialog(playerid,DIALOG_PANEL,DIALOG_STYLE_LIST,"Panel","Kreiraj trgovinu ribarske opreme\nObrisi trgovinu ribarske opreme","Odaberi","Odustani");
  293. return 1;
  294. }
  295. //----------------[TIMERI]----------------//
  296. timer PecaRibu[20000](playerid)
  297. {
  298. if(Peca[playerid] != 0)
  299. {
  300. switch(random(6))
  301. {
  302. case 0:
  303. {
  304. va_SendClientMessage(playerid,-1,"Nisi upecao nista");
  305. RemovePlayerAttachedObject(playerid,3);
  306. TogglePlayerControllable(playerid,true); Peca[playerid] = 0; ClearAnimations(playerid);
  307. RibarInfo[playerid][StapPecanje] -= 1;
  308. if(RibarInfo[playerid][StapPecanje] == 0) return SendClientMessage(playerid,-1,"Vas stap za pecanje se potrgao, morate kupiti novi");
  309. }
  310. case 1:
  311. {
  312. va_SendClientMessage(playerid,-1,"Upecao si sardinu");
  313. RemovePlayerAttachedObject(playerid,3);
  314. TogglePlayerControllable(playerid,true); Peca[playerid] = 0; ClearAnimations(playerid);
  315. RibarInfo[playerid][StapPecanje] -= 1; RibarInfo[playerid][Riba] += 1;
  316. if(RibarInfo[playerid][StapPecanje] == 0) return SendClientMessage(playerid,-1,"Vas stap za pecanje se potrgao, morate kupiti novi");
  317. }
  318. case 2:
  319. {
  320. va_SendClientMessage(playerid,-1,"Nisi upecao nista");
  321. RemovePlayerAttachedObject(playerid,3);
  322. TogglePlayerControllable(playerid,true); Peca[playerid] = 0; ClearAnimations(playerid);
  323. RibarInfo[playerid][StapPecanje] -= 1;
  324. if(RibarInfo[playerid][StapPecanje] == 0) return SendClientMessage(playerid,-1,"Vas stap za pecanje se potrgao, morate kupiti novi");
  325. }
  326. case 3:
  327. {
  328. va_SendClientMessage(playerid,-1,"Upecao si oradu");
  329. RemovePlayerAttachedObject(playerid,3);
  330. TogglePlayerControllable(playerid,true); Peca[playerid] = 0; ClearAnimations(playerid);
  331. RibarInfo[playerid][StapPecanje] -= 1; RibarInfo[playerid][Riba] += 1;
  332. if(RibarInfo[playerid][StapPecanje] == 0) return SendClientMessage(playerid,-1,"Vas stap za pecanje se potrgao, morate kupiti novi");
  333. }
  334. case 4:
  335. {
  336. va_SendClientMessage(playerid,-1,"Upecao si sardinu");
  337. RemovePlayerAttachedObject(playerid,3);
  338. TogglePlayerControllable(playerid,true); Peca[playerid] = 0; ClearAnimations(playerid);
  339. RibarInfo[playerid][StapPecanje] -= 1; RibarInfo[playerid][Riba] += 1;
  340. if(RibarInfo[playerid][StapPecanje] == 0) return SendClientMessage(playerid,-1,"Vas stap za pecanje se potrgao, morate kupiti novi");
  341. }
  342. case 5:
  343. {
  344. va_SendClientMessage(playerid,-1,"Nisi upecao nista");
  345. RemovePlayerAttachedObject(playerid,3);
  346. TogglePlayerControllable(playerid,true); Peca[playerid] = 0; ClearAnimations(playerid);
  347. RibarInfo[playerid][StapPecanje] -= 1;
  348. if(RibarInfo[playerid][StapPecanje] == 0) return SendClientMessage(playerid,-1,"Vas stap za pecanje se potrgao, morate kupiti novi");
  349. }
  350. }
  351. SacuvajRibara(playerid);
  352. }
  353. return 1;
  354. }
  355. timer spawnuj[3000](playerid)
  356. {
  357. TogglePlayerSpectating(playerid,false);
  358. SpawnPlayer(playerid);
  359. return 1;
  360. }
  361. //----------------[CUVANJA I CITANJA]----------------//
  362. forward LoadUser_data(id, name[], value[]);
  363. public LoadUser_data(id, name[], value[])
  364. {
  365. INI_Int("Novac", RibarInfo[id][Novac]);
  366. INI_Int("StapPecanje", RibarInfo[id][StapPecanje]);
  367. INI_Int("Mamac", RibarInfo[id][Mamac]);
  368. INI_Int("Riba", RibarInfo[id][Riba]);
  369. return 1;
  370. }
  371. SacuvajRibara(id)
  372. {
  373. new INI:File = INI_Open(RibarPath(id));
  374. INI_SetTag(File,"data");
  375. INI_WriteInt(File, "Novac", RibarInfo[id][Novac]);
  376. INI_WriteInt(File, "StapPecanje", RibarInfo[id][StapPecanje]);
  377. INI_WriteInt(File, "Mamac", RibarInfo[id][Mamac]);
  378. INI_WriteInt(File, "Riba", RibarInfo[id][Riba]);
  379. INI_Close(File);
  380. return 1;
  381. }
  382. forward UcitajTrgovinu(d, name[], value[]);
  383. public UcitajTrgovinu(d, name[], value[])
  384. {
  385. INI_Int("Kreirana",Kreirana[d]);
  386. if(Kreirana[d] == 1)
  387. {
  388. INI_Float("PickupX",PickupPos[d][0]);
  389. INI_Float("PickupY",PickupPos[d][1]);
  390. INI_Float("PickupZ",PickupPos[d][2]);
  391. }
  392. return 1;
  393. }
  394. SacuvajTrgovinu(d)
  395. {
  396. new dFile[128];
  397. format(dFile, sizeof(dFile), "Trgovine/%d.ini", d);
  398. new INI:File = INI_Open(dFile);
  399. INI_WriteInt(File,"Kreirana",Kreirana[d]);
  400. if(Kreirana[d] == 1)
  401. {
  402. INI_WriteFloat(File,"PickupX",PickupPos[d][0]);
  403. INI_WriteFloat(File,"PickupY",PickupPos[d][1]);
  404. INI_WriteFloat(File,"PickupZ",PickupPos[d][2]);
  405. }
  406. INI_Close(File);
  407. }
  408. //----------------[OSTALO]----------------//
  409. RibarPath(playerid)
  410. {
  411. new string[128];
  412. format(string,sizeof(string), "Ribari/%s.ini", GetName(playerid));
  413. return string;
  414. }
  415. GetName(id)
  416. {
  417. new name[MAX_PLAYER_NAME];
  418. GetPlayerName(id, name, sizeof(name));
  419. return name;
  420. }
  421. stock va_ShowPlayerDialog(playerid,dialogid,type,name[],const fmat[], va_args<>)
  422. {
  423. return ShowPlayerDialog(playerid,dialogid,type,name,va_return(fmat, va_start<5>),"Odaberi","Odustani");
  424. }
  425. //----------------[END OF THE LINE]----------------//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement