Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.21 KB | None | 0 0
  1. stock NapraviVoziloEno(X_THREAD,Model,Float:x,Float:y,Float:z,Float:a,col1,col2,name[],cena)
  2. {
  3. for(new i = 0; i < sizeof(MyVehicle); i++ )
  4. {
  5. if(MyVehicle[i][MyVehSlot] == 0)
  6. {
  7. MyVehicle[i][MyVehModel] = Model;
  8. MyVehicle[i][MyVehPos][0]= x;
  9. MyVehicle[i][MyVehPos][1] = y;
  10. MyVehicle[i][MyVehPos][2] = z;
  11. MyVehicle[i][MyVehPos][3] = a;
  12. MyVehicle[i][MyVehCol][0] = col1;
  13. MyVehicle[i][MyVehCol][1] = col2;
  14. MyVehicle[i][MyVehCena] = cena;
  15. MyVehicle[i][MyVehAlarm] = 0;
  16. MyVehicle[i][MyVehLock] = 0;
  17. MyVehicle[i][MyVehCar] = -1;
  18. strmid(MyVehicle[i][MyVehOwner], name, 0, strlen(name), 32);
  19.  
  20. MyVehicle[i][MyVehID] = CreateVehicle(MyVehicle[i][MyVehModel],MyVehicle[i][MyVehPos][0],MyVehicle[i][MyVehPos][1],MyVehicle[i][MyVehPos][2],MyVehicle[i][MyVehPos][3],MyVehicle[i][MyVehCol][0],MyVehicle[i][MyVehCol][1],30000);
  21. switch(X_THREAD)
  22. {
  23. case 0:
  24. {
  25. MyVehicle[i][MyVehCar] = 1;
  26. MyVehicle[i][MyVehSlot] = 1;
  27. }
  28. }
  29. ZacuvajCarOwnerShip(i);
  30. return i;
  31. }
  32. }
  33. return 1;
  34. }
  35.  
  36. //-------------------------------------------------------------------------------------------------------------------------------------
  37. //===============================[Avto Salon]===================================
  38. if(dialogid == DIALOG_AVTOSALON)
  39. {
  40. if(response)
  41. {
  42. switch(listitem)
  43. {
  44. case 0:
  45. {
  46. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  47. {
  48. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  49. TogglePlayerControllable(playerid, 1);
  50. return 1;
  51. }
  52. if(4000000 >= GetPlayerMoney(playerid))
  53. {
  54. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  55. return 1;
  56. }
  57. new s, poz = random(sizeof(randomswp));
  58. s = NapraviVoziloEno(0, 560, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  59. GivePlayerMoney(playerid, -4000000);// SULTAN
  60. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  61. Gorivo[s] = 100;
  62. ZacuvajCarOwnerShip(s);
  63. Avtosalon[playerid] = 1;
  64. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  65. }
  66. case 1:
  67. {
  68. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  69. {
  70. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  71. TogglePlayerControllable(playerid, 1);
  72. return 1;
  73. }
  74. if(3000000 >= GetPlayerMoney(playerid))
  75. {
  76. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  77. return 1;
  78. }
  79. new s, poz = random(sizeof(randomswp));
  80. s = NapraviVoziloEno(0, 579, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  81. GivePlayerMoney(playerid, -3000000);// HUNTLEY
  82. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  83. Gorivo[s] = 100;
  84. ZacuvajCarOwnerShip(s);
  85. Avtosalon[playerid] = 1;
  86. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  87. }
  88. case 2:
  89. {
  90. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  91. {
  92. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  93. TogglePlayerControllable(playerid, 1);
  94. return 1;
  95. }
  96. if(4500000 >= GetPlayerMoney(playerid))
  97. {
  98. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  99. return 1;
  100. }
  101. new s, poz = random(sizeof(randomswp));
  102. s = NapraviVoziloEno(0, 451, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  103. GivePlayerMoney(playerid, -4500000);//TURIZMO
  104. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  105. Gorivo[s] = 100;
  106. ZacuvajCarOwnerShip(s);
  107. Avtosalon[playerid] = 1;
  108. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  109. }
  110. case 3:
  111. {
  112. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  113. {
  114. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  115. TogglePlayerControllable(playerid, 1);
  116. return 1;
  117. }
  118. if(2500000 >= GetPlayerMoney(playerid))
  119. {
  120. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  121. return 1;
  122. }
  123. new s, poz = random(sizeof(randomswp));
  124. s = NapraviVoziloEno(0, 411, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  125. GivePlayerMoney(playerid, -2500000);//INFERNUS
  126. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  127. Gorivo[s] = 100;
  128. ZacuvajCarOwnerShip(s);
  129. Avtosalon[playerid] = 1;
  130. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  131. }
  132. case 4:
  133. {
  134. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  135. {
  136. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  137. TogglePlayerControllable(playerid, 1);
  138. return 1;
  139. }
  140. if(2000000 >= GetPlayerMoney(playerid))
  141. {
  142. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  143. return 1;
  144. }
  145. new s, poz = random(sizeof(randomswp));
  146. s = NapraviVoziloEno(0, 429, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  147. GivePlayerMoney(playerid, -2000000);//BANSHEE
  148. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  149. Gorivo[s] = 100;
  150. ZacuvajCarOwnerShip(s);
  151. Avtosalon[playerid] = 1;
  152. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  153. }
  154. case 5:
  155. {
  156. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  157. {
  158. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  159. TogglePlayerControllable(playerid, 1);
  160. return 1;
  161. }
  162. if(2200000 >= GetPlayerMoney(playerid))
  163. {
  164. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  165. return 1;
  166. }
  167. new s, poz = random(sizeof(randomswp));
  168. s = NapraviVoziloEno(0, 506, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  169. GivePlayerMoney(playerid, -2200000);//SUPER GT
  170. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  171. Gorivo[s] = 100;
  172. ZacuvajCarOwnerShip(s);
  173. Avtosalon[playerid] = 1;
  174. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  175. }
  176. case 6:
  177. {
  178. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  179. {
  180. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  181. TogglePlayerControllable(playerid, 1);
  182. return 1;
  183. }
  184. if(2000000 >= GetPlayerMoney(playerid))
  185. {
  186. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  187. return 1;
  188. }
  189. new s, poz = random(sizeof(randomswp));
  190. s = NapraviVoziloEno(0, 477, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  191. GivePlayerMoney(playerid, -2000000);//ZR-350
  192. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  193. Gorivo[s] = 100;
  194. ZacuvajCarOwnerShip(s);
  195. Avtosalon[playerid] = 1;
  196. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  197. }
  198. case 7:
  199. {
  200. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  201. {
  202. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  203. TogglePlayerControllable(playerid, 1);
  204. return 1;
  205. }
  206. if(1500000 >= GetPlayerMoney(playerid))
  207. {
  208. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  209. return 1;
  210. }
  211. new s, poz = random(sizeof(randomswp));
  212. s = NapraviVoziloEno(0, 565, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  213. GivePlayerMoney(playerid, -1500000);//FLASH
  214. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  215. Gorivo[s] = 100;
  216. ZacuvajCarOwnerShip(s);
  217. Avtosalon[playerid] = 1;
  218. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  219. }
  220. case 8:
  221. {
  222. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  223. {
  224. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  225. TogglePlayerControllable(playerid, 1);
  226. return 1;
  227. }
  228. if(1000000 >= GetPlayerMoney(playerid))
  229. {
  230. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  231. return 1;
  232. }
  233. new s, poz = random(sizeof(randomswp));
  234. s = NapraviVoziloEno(0, 426, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  235. GivePlayerMoney(playerid, -1000000);//PREMIER
  236. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  237. Gorivo[s] = 100;
  238. ZacuvajCarOwnerShip(s);
  239. Avtosalon[playerid] = 1;
  240. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  241. }
  242. case 9:
  243. {
  244. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  245. {
  246. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  247. TogglePlayerControllable(playerid, 1);
  248. return 1;
  249. }
  250. if(900000 >= GetPlayerMoney(playerid))
  251. {
  252. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  253. return 1;
  254. }
  255. new s, poz = random(sizeof(randomswp));
  256. s = NapraviVoziloEno(0, 507, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  257. GivePlayerMoney(playerid, -900000);//ELEGANT
  258. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  259. Gorivo[s] = 100;
  260. ZacuvajCarOwnerShip(s);
  261. Avtosalon[playerid] = 1;
  262. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  263. }
  264. case 10:
  265. {
  266. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  267. {
  268. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  269. TogglePlayerControllable(playerid, 1);
  270. return 1;
  271. }
  272. if(800000 >= GetPlayerMoney(playerid))
  273. {
  274. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  275. return 1;
  276. }
  277. new s, poz = random(sizeof(randomswp));
  278. s = NapraviVoziloEno(0, 436, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  279. GivePlayerMoney(playerid, -800000);//PREVION
  280. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  281. Gorivo[s] = 100;
  282. ZacuvajCarOwnerShip(s);
  283. Avtosalon[playerid] = 1;
  284. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  285. }
  286. case 11:
  287. {
  288. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  289. {
  290. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  291. TogglePlayerControllable(playerid, 1);
  292. return 1;
  293. }
  294. if(700000 >= GetPlayerMoney(playerid))
  295. {
  296. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  297. return 1;
  298. }
  299. new s, poz = random(sizeof(randomswp));
  300. s = NapraviVoziloEno(0, 439, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  301. GivePlayerMoney(playerid, -700000);//STALLION
  302. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  303. Gorivo[s] = 100;
  304. ZacuvajCarOwnerShip(s);
  305. Avtosalon[playerid] = 1;
  306. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  307. }
  308. case 12:
  309. {
  310. if(MyVehicle[playerid][MyVehCar] == 1 && AllMyCars(playerid) >= PlayerInfo[playerid][pMaxKoli])
  311. {
  312. SendClientMessage(playerid, COLOR_WHITE, "{ff0000}| Error | {FFFFFF} Dostignat vi e limitot na avtomobili.");
  313. TogglePlayerControllable(playerid, 1);
  314. return 1;
  315. }
  316. if(1000000 >= GetPlayerMoney(playerid))
  317. {
  318. SendClientMessage(playerid,-1,"{ff0000}| Error | {FFFFFF}Nemate dovolno pari za ovaj avtomobil");
  319. return 1;
  320. }
  321. new s, poz = random(sizeof(randomswp));
  322. s = NapraviVoziloEno(0, 445, randomswp[ poz ][ 0 ], randomswp[ poz ][ 1 ], randomswp[ poz ][ 2 ], randomswp[ poz ][ 3 ], 1,1, GetName(playerid), 170000);
  323. GivePlayerMoney(playerid, -1000000);//ADMIRAL
  324. strmid(MyVehicle[s][MyVehOwner], GetName(playerid), 0, strlen(GetName(playerid)), 24);
  325. Gorivo[s] = 100;
  326. ZacuvajCarOwnerShip(s);
  327. Avtosalon[playerid] = 1;
  328. SendClientMessage(playerid, COLOR_WHITE,"{ff0000}[AvtoSalon]:{FFFFFF}Uspesno kupivte vozilo.Toa vi e parkirano na parkingot od salonot.");
  329. }
  330. }
  331. }
  332. else
  333. {
  334. SCM(playerid, COLOR_WHITE, "{1e90ff}| INFO |{FFFFFF}Povekje ne razgleduvate vozila.");
  335. }
  336. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement