Advertisement
Guest User

Untitled

a guest
Feb 8th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.03 KB | None | 0 0
  1. case DIALOG_VCP:
  2. {
  3. if(response)
  4. {
  5. new i = Player[playerid][carVCP];
  6. if(i == INVALID_VEHICLE_ID)
  7. {
  8. if(Player[playerid][english])
  9. Server(playerid, "Error when receiving vehicle data.");
  10. else
  11. Server(playerid, "Error ketika menerima data.");
  12. return 1;
  13. }
  14.  
  15. switch(listitem)
  16. {
  17. case 0:
  18. {
  19. if(Vehicles[i][vehLock])
  20. {
  21. Vehicles[i][vehLock] = false;
  22. if(Player[playerid][english])
  23. Info(playerid, "You "CHAT_RED"unlocked"CHAT_WHITE" this vehicle.");
  24. else
  25. Info(playerid, "Kamu "CHAT_RED"tidak mengunci"CHAT_WHITE" kendaraan ini.");
  26. }
  27. else
  28. {
  29. Vehicles[i][vehLock] = true;
  30. if(Player[playerid][english])
  31. Info(playerid, "You "CHAT_YELLOW"locked"CHAT_WHITE" this vehicle.");
  32. else
  33. Info(playerid, "Kamu "CHAT_YELLOW"mengunci"CHAT_WHITE" kendaraan ini.");
  34. }
  35. cmd_vcp(playerid, "");
  36. }
  37. case 1:
  38. {
  39. if(Vehicles[i][vehAlarm])
  40. {
  41. Vehicles[i][vehAlarm] = false;
  42. if(Player[playerid][english])
  43. Info(playerid, "You toggle the alarm "CHAT_RED"off"CHAT_WHITE".");
  44. else
  45. Info(playerid, "Kamu "CHAT_RED"menonaktifkan"CHAT_WHITE" alarm.");
  46. }
  47. else
  48. {
  49. Vehicles[i][vehAlarm] = true;
  50. if(Player[playerid][english])
  51. Info(playerid, "You toggle the alarm "CHAT_YELLOW"on"CHAT_WHITE".");
  52. else
  53. Info(playerid, "Kamu "CHAT_YELLOW"mengaktifkan"CHAT_WHITE" alarm.");
  54. }
  55. cmd_vcp(playerid, "");
  56. }
  57. case 2:
  58. {
  59. if(Player[playerid][english])
  60. format(message, sizeof(message), "Current Plate : "CHAT_YELLOW"%s", Vehicles[i][vehPlate]);
  61. else
  62. format(message, sizeof(message), "Plat yang sekarang : "CHAT_YELLOW"%s", Vehicles[i][vehPlate]);
  63. if(Player[playerid][english])
  64. ShowPlayerDialog(playerid, DIALOG_CHANGEPLATE, DIALOG_STYLE_INPUT, "Change Plate", message, "Change", "Cancel");
  65. else
  66. ShowPlayerDialog(playerid, DIALOG_CHANGEPLATE, DIALOG_STYLE_INPUT, "Ganti Plat", message, "Ganti", "Batal");
  67. }
  68. case 3:
  69. {
  70. parkVehicles(i, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
  71. if(Player[playerid][english])
  72. Info(playerid, "Your vehicle will be spawned here next time.");
  73. else
  74. Info(playerid, "Kendaraanmu akan spawn disini lain kali.");
  75. }
  76. case 4:
  77. {
  78. if(Player[playerid][english])
  79. format(message, sizeof(message), "Current Color : "CHAT_YELLOW"%d", Vehicles[i][vehColor][0]);
  80. else
  81. format(message, sizeof(message), "Warna yang sekarang : "CHAT_YELLOW"%d", Vehicles[i][vehColor][0]);
  82. if(Player[playerid][english])
  83. ShowPlayerDialog(playerid, DIALOG_CHANGECOLOR, DIALOG_STYLE_INPUT, "Change Color", message, "Change", "Cancel");
  84. else
  85. ShowPlayerDialog(playerid, DIALOG_CHANGECOLOR, DIALOG_STYLE_INPUT, "Ganti Warna", message, "Ganti", "Batal");
  86. }
  87. case 5:
  88. {
  89. if(Player[playerid][english])
  90. format(message, sizeof(message), "Current Color : "CHAT_YELLOW"%d", Vehicles[i][vehColor][1]);
  91. else
  92. format(message, sizeof(message), "Warna yang sekarang : "CHAT_YELLOW"%d", Vehicles[i][vehColor][1]);
  93. if(Player[playerid][english])
  94. ShowPlayerDialog(playerid, DIALOG_CHANGECOLOR2, DIALOG_STYLE_INPUT, "Change Color", message, "Change", "Cancel");
  95. else
  96. ShowPlayerDialog(playerid, DIALOG_CHANGECOLOR2, DIALOG_STYLE_INPUT, "Ganti Warna", message, "Ganti", "Batal");
  97. }
  98. case 6:
  99. {
  100. if(Player[playerid][english])
  101. ShowPlayerDialog(playerid, DIALOG_NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Select","Back");
  102. else
  103. ShowPlayerDialog(playerid, DIALOG_NEON, DIALOG_STYLE_LIST, "Pilih warna untuk neon","Biru\nHijau\nKuning\nPutih\nPink\nMatikan Neon","Pilih","Kembali");
  104. }
  105. }
  106. }
  107. }
  108. case DIALOG_CHANGEPLATE:
  109. {
  110. if(response)
  111. {
  112. if(strlen(inputtext) > 10 || strlen(inputtext) < 3)
  113. {
  114. if(Player[playerid][english])
  115. Server(playerid, "Please insert 3-10 character.");
  116. else
  117. Server(playerid, "Masukkan 3-10 karakter.");
  118. }
  119. else
  120. {
  121. new i = Player[playerid][carVCP];
  122. if(i == INVALID_VEHICLE_ID)
  123. {
  124. if(Player[playerid][english])
  125. Server(playerid, "Error when receiving vehicle data.");
  126. else
  127. Server(playerid, "Gagal menerima data.");
  128. return 1;
  129. }
  130. format(Vehicles[i][vehPlate], 16, "%s", inputtext);
  131. SetVehicleNumberPlate(Vehicles[i][vehicleData], Vehicles[i][vehPlate]);
  132. createVehicle(Vehicles[i][vehicleData], true);
  133. }
  134. }
  135. cmd_vcp(playerid, "");
  136. }
  137. case DIALOG_MYVEHICLES:
  138. {
  139. if(response)
  140. {
  141. new count = 0;
  142. for(new i = 0; i < MAX_VEH; i++)
  143. {
  144. if(!Vehicles[i][vehStatus]) continue;
  145.  
  146. if(Vehicles[i][vehOwner] == Player[playerid][pID])
  147. {
  148. if(count == listitem)
  149. {
  150. Player[playerid][carVCP] = i;
  151. format(message, sizeof(message), "%s - %d", vehicleNames[Vehicles[i][vehModel] - 400], Vehicles[i][vehID]);
  152. if(Player[playerid][english])
  153. ShowPlayerDialog(playerid, DIALOG_MYVEHICLES2, DIALOG_STYLE_LIST, message, "Locate Vehicle\nRespawn Vehicle\nSell Vehicle To Server\nSell Vehicle To Player", "Choose", "Back");
  154. else
  155. ShowPlayerDialog(playerid, DIALOG_MYVEHICLES2, DIALOG_STYLE_LIST, message, "Cari Kendaraan\nRespawn Kendaraan\nJual kendaraan ke server\nJual kendaraan ke player", "Pilih", "Kembali");
  156. break;
  157. }
  158. else
  159. {
  160. count++;
  161. }
  162. }
  163. }
  164. }
  165. }
  166. case DIALOG_MYVEHICLES2:
  167. {
  168. if(response)
  169. {
  170. new i = Player[playerid][carVCP];
  171. switch(listitem)
  172. {
  173. case 0:
  174. {
  175. if(IsPlayerInAnyVehicle(playerid))
  176. {
  177. new Float:x, Float:y, Float:z;
  178. GetVehiclePos(Vehicles[i][vehicleData], x, y, z);
  179. SetPVarFloat(playerid, "Spongebob", x);
  180. SetPVarFloat(playerid, "Mario", y);
  181. SetPVarFloat(playerid, "SpiderPig", z);
  182. SetPVarString(playerid, "FAIL", "Your Car");
  183. if(Player[playerid][english])
  184. Info(playerid, "Follow the arrow to find your car.");
  185. else
  186. Info(playerid, "Ikuti panah untuk mencari mobilmu.");
  187. GPSObject[playerid] = CreateObject(1318, 0, 0, 0, 0.0, 0.0, 0);
  188. SetPVarInt(playerid, "YEAH", 1);
  189. }
  190. else
  191. {
  192. if(Player[playerid][english])
  193. Server(playerid, "You must be in vehicle to locate your car.");
  194. else
  195. Server(playerid, "Kamu harus di kendaraan untuk mencari kendaraanmu.");
  196. }
  197. }
  198. case 1:
  199. {
  200. createVehicle(i, true);
  201. if(Player[playerid][english])
  202. Server(playerid, "Your vehicle has been respawned.");
  203. else
  204. Server(playerid, "Kendaraanmu telah respawn.");
  205. }
  206. case 2:
  207. {
  208. new price = 0;
  209. for(new m = 0; m < sizeof(Dealership); m++)
  210. {
  211. if(Dealership[m][dealerModel] == Vehicles[i][vehModel])
  212. {
  213. price = Dealership[m][dealerPrice];
  214. break;
  215. }
  216. }
  217. price = price - floatround(price * 0.20, floatround_round);
  218. if(Player[playerid][english])
  219. format(message, sizeof(message), "Are you sure you want to sell your vehicle for "CHAT_YELLOW"$%s"CHAT_WHITE"?", FormatNumber(price));
  220. else
  221. format(message, sizeof(message), "Apa kamu yakin akan menjual kendaraanmu untuk "CHAT_YELLOW"$%s"CHAT_WHITE"?", FormatNumber(price));
  222. if(Player[playerid][english])
  223. ShowPlayerDialog(playerid, DIALOG_SALESERVER, DIALOG_STYLE_MSGBOX, "Sell Vehicle", message, "Sell", "Cancel");
  224. else
  225. ShowPlayerDialog(playerid, DIALOG_SALESERVER, DIALOG_STYLE_MSGBOX, "Jual Kendaraan", message, "Jual", "Batal");
  226. }
  227. case 3:
  228. {
  229. Player[playerid][vsellCar] = Player[playerid][carVCP];
  230. if(Player[playerid][english])
  231. ShowPlayerDialog(playerid, DIALOG_VSELL, DIALOG_STYLE_INPUT, "Sell Vehicle", "Insert player ID", "Sell", "Cancel");
  232. else
  233. ShowPlayerDialog(playerid, DIALOG_VSELL, DIALOG_STYLE_INPUT, "Jual Kendaraan", "Masukkan player ID", "Jual", "Batal");
  234. }
  235. }
  236. }
  237. else
  238. {
  239. cmd_myvehicles(playerid, "");
  240. }
  241. }
  242. case DIALOG_CHANGECOLOR:
  243. {
  244. if(response)
  245. {
  246. if(strval(inputtext) >= 0 && strval(inputtext) <= 255)
  247. {
  248. new i = Player[playerid][carVCP];
  249. Vehicles[i][vehColor][0] = strval(inputtext);
  250. ChangeVehicleColor(Vehicles[i][vehicleData], Vehicles[i][vehColor][0], Vehicles[i][vehColor][1]);
  251. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  252. }
  253. else
  254. {
  255. if(Player[playerid][english])
  256. Info(playerid, "Please input between 0 - 255.");
  257. else
  258. Info(playerid, "Masukkan nomor antara 0 - 255.");
  259. }
  260. }
  261. }
  262. case DIALOG_CHANGECOLOR2:
  263. {
  264. if(response)
  265. {
  266. if(strval(inputtext) >= 0 && strval(inputtext) <= 255)
  267. {
  268. new i = Player[playerid][carVCP];
  269. Vehicles[i][vehColor][1] = strval(inputtext);
  270. ChangeVehicleColor(Vehicles[i][vehicleData], Vehicles[i][vehColor][0], Vehicles[i][vehColor][1]);
  271. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  272. }
  273. else
  274. {
  275. if(Player[playerid][english])
  276. Info(playerid, "Please input between 0 - 255.");
  277. else
  278. Info(playerid, "Masukkan nomor antara 0 - 255.");
  279. }
  280. }
  281. }
  282. case DIALOG_GPS:
  283. {
  284. if(response)
  285. {
  286. GetPlayerLocationFromId(playerid, listitem);
  287. }
  288. }
  289. case DIALOG_SALESERVER:
  290. {
  291. if(response)
  292. {
  293. new i = Player[playerid][carVCP], price = 0;
  294. for(new m = 0; m < sizeof(Dealership); m++)
  295. {
  296. if(Dealership[m][dealerModel] == Vehicles[i][vehModel])
  297. {
  298. price = Dealership[m][dealerPrice];
  299. break;
  300. }
  301. }
  302. price = price - floatround(price * 0.20, floatround_round);
  303. if(Player[playerid][english])
  304. format(message, sizeof(message), CHAT_WHITE"You sold your vehicle for "CHAT_YELLOW"$%s"CHAT_WHITE".", FormatNumber(price));
  305. else
  306. format(message, sizeof(message), CHAT_WHITE"Kamu menjual mobilmu dengan harga "CHAT_YELLOW"$%s"CHAT_WHITE".", FormatNumber(price));
  307. Info(playerid, message);
  308. giveMoney(playerid, price);
  309. __deleteVehicle(i);
  310. }
  311. }
  312. case DIALOG_VSELL:
  313. {
  314. if(response)
  315. {
  316. if(!isConnected(strval(inputtext)))
  317. {
  318. if(Player[playerid][english])
  319. ShowPlayerDialog(playerid, DIALOG_VSELL, DIALOG_STYLE_INPUT, "Sell Vehicle", CHAT_WHITE"That player isn't connected!\nInsert player ID", "Sell", "Cancel");
  320. else
  321. ShowPlayerDialog(playerid, DIALOG_VSELL, DIALOG_STYLE_INPUT, "Jual Kendaraan", CHAT_WHITE"Player tidak login!\nMasukkan player ID", "Jual", "Batal");
  322. }
  323. else if(isMe(playerid, strval(inputtext)))
  324. {
  325. if(Player[playerid][english])
  326. ShowPlayerDialog(playerid, DIALOG_VSELL, DIALOG_STYLE_INPUT, "Sell Vehicle", CHAT_WHITE"You can't sell to yourself!\nInsert player ID", "Sell", "Cancel");
  327. else
  328. ShowPlayerDialog(playerid, DIALOG_VSELL, DIALOG_STYLE_INPUT, "Jual Kendaraan", CHAT_WHITE"Kamu tidak bisa menjual ke dirimu sendiri!\nnMasukkan player ID", "Jual", "Batal");
  329. }
  330. else
  331. {
  332. Player[playerid][vsellTo] = strval(inputtext);
  333. if(Player[playerid][english])
  334. format(message, sizeof(message), CHAT_WHITE"You want to sell your vehicle to "CHAT_YELLOW"%s"CHAT_WHITE".\nInsert price for your vehicle", GetName(Player[playerid][vsellTo]));
  335. else
  336. format(message, sizeof(message), CHAT_WHITE"Kamu akan menjual mobilmu ke "CHAT_YELLOW"%s"CHAT_WHITE".\nMasukkan harga", GetName(Player[playerid][vsellTo]));
  337. ShowPlayerDialog(playerid, DIALOG_VSELL2, DIALOG_STYLE_INPUT, "Sell Vehicle", message, "Sell", "Cancel");
  338. }
  339. }
  340. }
  341. case DIALOG_VSELL2:
  342. {
  343. if(response)
  344. {
  345. if(!isConnected(Player[playerid][vsellTo]))
  346. {
  347. if(Player[playerid][english])
  348. Server(playerid, "That player isn't connected.");
  349. else
  350. Server(playerid, "Player tidak login.");
  351. return 1;
  352. }
  353. if(strval(inputtext) >= 100000)
  354. {
  355. new msg2[512];
  356. Player[playerid][vsellPrice] = strval(inputtext);
  357. if(Player[playerid][english])
  358. format(msg2, sizeof(msg2), CHAT_WHITE"Are you sure you want to sell your vehicle to "CHAT_YELLOW"%s"CHAT_WHITE".\nWith price "CHAT_YELLOW"%s", GetName(Player[playerid][vsellTo]), FormatNumber(Player[playerid][vsellPrice]));
  359. else
  360. format(msg2, sizeof(msg2), CHAT_WHITE"Apa kamu yakin akan menjual mobilmu ke "CHAT_YELLOW"%s"CHAT_WHITE".\nDengan harga "CHAT_YELLOW"%s", GetName(Player[playerid][vsellTo]), FormatNumber(Player[playerid][vsellPrice]));
  361. ShowPlayerDialog(playerid, DIALOG_CONFVS, DIALOG_STYLE_MSGBOX, "Sell Vehicle", msg2, "Sell", "Cancel");
  362. }
  363. else
  364. {
  365. if(Player[playerid][english])
  366. format(message, sizeof(message), CHAT_WHITE"Minimum price is 100.000!\nYou want to sell your vehicle to "CHAT_YELLOW"%s"CHAT_WHITE".\nInsert price for your vehicle", GetName(Player[playerid][vsellTo]));
  367. else
  368. format(message, sizeof(message), CHAT_WHITE"Minimal harga adalah 100.000!\nKamu akan menjual mobilmu ke "CHAT_YELLOW"%s"CHAT_WHITE".\nMasukkan harga", GetName(Player[playerid][vsellTo]));
  369. ShowPlayerDialog(playerid, DIALOG_VSELL2, DIALOG_STYLE_INPUT, "Sell Vehicle", message, "Sell", "Cancel");
  370. }
  371. }
  372. }
  373. case DIALOG_CONFVS:
  374. {
  375. if(response)
  376. {
  377. new otherID = Player[playerid][vsellTo];
  378. if(!isConnected(Player[playerid][vsellTo]))
  379. {
  380. if(Player[playerid][english])
  381. Server(playerid, "That player isn't connected.");
  382. else
  383. Server(playerid, "Player tidak login.");
  384. return 1;
  385. }
  386. if(Player[otherID][vsellFrom] == INVALID_PLAYER_ID)
  387. {
  388. Player[otherID][vsellFrom] = playerid;
  389. new msg2[512], i = Player[playerid][vsellCar];
  390. if(Player[otherID][english])
  391. format(msg2, sizeof(msg2), CHAT_YELLOW"%s "CHAT_WHITE" want to sell "CHAT_YELLOW"%s"CHAT_WHITE".\nWith price "CHAT_YELLOW"%s"CHAT_WHITE".\nDo you want to buy?", GetName(playerid), vehicleNames[Vehicles[i][vehModel] - 400], FormatNumber(Player[playerid][vsellPrice]));
  392. else
  393. format(msg2, sizeof(msg2), CHAT_YELLOW"%s "CHAT_WHITE" ingin menjual "CHAT_YELLOW"%s"CHAT_WHITE".\nDengan harga "CHAT_YELLOW"%s"CHAT_WHITE".\nApakah anda mau beli?", GetName(playerid), vehicleNames[Vehicles[i][vehModel] - 400], FormatNumber(Player[playerid][vsellPrice]));
  394. ShowPlayerDialog(otherID, DIALOG_CONFIRMVSELL, DIALOG_STYLE_MSGBOX, "Buy Vehicle", msg2, "Buy", "Cancel");
  395. }
  396. else
  397. {
  398. Server(playerid, "That player already in transaction.");
  399. }
  400. }
  401. }
  402. case DIALOG_CONFIRMVSELL:
  403. {
  404. new otherID = Player[playerid][vsellFrom], i = Player[otherID][vsellCar];
  405. if(response && Player[playerid][vsellFrom] != INVALID_PLAYER_ID)
  406. {
  407. if(!isConnected(Player[playerid][vsellFrom]))
  408. {
  409. if(Player[playerid][english])
  410. Server(playerid, "Request is expired.");
  411. else
  412. Server(playerid, "Permintaan kadaluarsa.");
  413. return 1;
  414. }
  415. new maxcar, count2 = 0;
  416. if(Player[playerid][vipLevel] > 0)
  417. {
  418. maxcar = MAX_VIP_VEHICLES;
  419. }
  420. else
  421. {
  422. maxcar = MAX_PLAYER_VEHICLES;
  423. }
  424. count2 = countplayerVeh(playerid);
  425. if(count2 < maxcar)
  426. {
  427. if(Player[playerid][playerMoney] >= Player[otherID][vsellPrice])
  428. {
  429. giveMoney(otherID, Player[otherID][vsellPrice]);
  430. takeMoney(playerid, Player[otherID][vsellPrice]);
  431. RemovePlayerFromVehicle(otherID);
  432. if(Player[otherID][english])
  433. format(message, sizeof(message), CHAT_YELLOW"%s bought your car for "CHAT_YELLOW"%s"CHAT_WHITE".", GetName(playerid), FormatNumber(Player[otherID][vsellPrice]));
  434. else
  435. format(message, sizeof(message), CHAT_YELLOW"%s Membeli mobilmu dengan harga "CHAT_YELLOW"%s"CHAT_WHITE".", GetName(playerid), FormatNumber(Player[otherID][vsellPrice]));
  436. ShowPlayerDialog(otherID, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Congratulations!!!", message, "Confirm", "");
  437. if(Player[playerid][english])
  438. format(message, sizeof(message), CHAT_YELLOW"Succesfully bought "CHAT_YELLOW"%s "CHAT_WHITE"car for "CHAT_YELLOW"%s"CHAT_WHITE".", GetName(otherID), FormatNumber(Player[otherID][vsellPrice]));
  439. else
  440. format(message, sizeof(message), CHAT_YELLOW"Sukses membeli mobil "CHAT_YELLOW"%s "CHAT_WHITE"dengan harga "CHAT_YELLOW"%s"CHAT_WHITE".", GetName(otherID), FormatNumber(Player[otherID][vsellPrice]));
  441. Server(playerid, message);
  442. Vehicles[i][vehOwner] = Player[playerid][pID];
  443. saveVehicles(i);
  444. Player[playerid][vsellFrom] = INVALID_PLAYER_ID;
  445. Player[otherID][vsellCar] = -1;
  446. Player[otherID][vsellPrice] = -1;
  447. }
  448. else
  449. {
  450. if(Player[playerid][english])
  451. Server(playerid, "You didn't have enough money to buy that vehicle.");
  452. else
  453. Server(playerid, "Uangmu tidak cukup untuk membeli mobil itu.");
  454. if(Player[otherID][english])
  455. Server(otherID, "That player didn't have enough money to buy your vehicle.");
  456. else
  457. Server(otherID, "Player itu tidak mempunyai uang yang cukup untuk membeli mobilmu.");
  458. }
  459. }
  460. else
  461. {
  462. if(Player[playerid][english])
  463. Info(playerid, "You've reached maximum car limit.");
  464. else
  465. Info(playerid, "Kamu mencapai batas kepemilikan mobil pribadi.");
  466. if(Player[otherID][english])
  467. Server(otherID, "That player has reached maximum car limit.");
  468. else
  469. Server(otherID, "Player itu telah melebihi batas mobil pribadi.");
  470. }
  471. }
  472. else
  473. {
  474. if(isConnected(Player[playerid][vsellFrom]))
  475. {
  476. if(Player[otherID][english])
  477. Info(otherID, "Your vehicle sell request has been denied.");
  478. else
  479. Info(otherID, "Permintaanmu ditolak.");
  480. }
  481. }
  482. Player[playerid][vsellFrom] = INVALID_PLAYER_ID;
  483. }
  484. case DIALOG_PLAYERVEHICLES:
  485. {
  486. if(response)
  487. {
  488. new count = 0, otherID = Player[playerid][tempID];
  489. if(!isConnected(otherID))
  490. {
  491. Server(playerid, "That player isn't logged in!");
  492. return 1;
  493. }
  494.  
  495. for(new i = 0; i < MAX_VEH; i++)
  496. {
  497. if(!Vehicles[i][vehStatus]) continue;
  498.  
  499. if(Vehicles[i][vehOwner] == Player[otherID][pID])
  500. {
  501. if(count == listitem)
  502. {
  503. Player[playerid][carVCP] = i;
  504. format(message, sizeof(message), "%s - %d", vehicleNames[Vehicles[i][vehModel] - 400], Vehicles[i][vehID]);
  505. ShowPlayerDialog(playerid, DIALOG_PLAYERVEHICLES2, DIALOG_STYLE_LIST, message, "Locate Vehicle\nRespawn Vehicle\nGoto Vehicle", "Choose", "Back");
  506. break;
  507. }
  508. else
  509. {
  510. count++;
  511. }
  512. }
  513. }
  514. }
  515. }
  516. case DIALOG_PLAYERVEHICLES2:
  517. {
  518. if(response)
  519. {
  520. new i = Player[playerid][carVCP], otherID = Player[playerid][tempID];
  521. if(!isConnected(otherID))
  522. {
  523. Server(playerid, "That player isn't logged in!");
  524. return 1;
  525. }
  526. switch(listitem)
  527. {
  528. case 0:
  529. {
  530. if(IsPlayerInAnyVehicle(playerid))
  531. {
  532. new Float:x, Float:y, Float:z;
  533. GetVehiclePos(Vehicles[i][vehicleData], x, y, z);
  534. SetPVarFloat(playerid, "Spongebob", x);
  535. SetPVarFloat(playerid, "Mario", y);
  536. SetPVarFloat(playerid, "SpiderPig", z);
  537. SetPVarString(playerid, "FAIL", "Your Car");
  538. Info(playerid, "Follow the arrow to find that car.");
  539. GPSObject[playerid] = CreateObject(1318, 0, 0, 0, 0.0, 0.0, 0);
  540. SetPVarInt(playerid, "YEAH", 1);
  541. }
  542. else
  543. {
  544. Server(playerid, "You must be in vehicle to locate that car.");
  545. }
  546. }
  547. case 1:
  548. {
  549. createVehicle(i, true);
  550. Server(playerid, "That vehicle has been respawned.");
  551. }
  552. case 2:
  553. {
  554. new Float:x, Float:y, Float:z;
  555. GetVehiclePos(Vehicles[i][vehicleData], x, y, z);
  556. SetPlayerPos(playerid, x, y, z + 2);
  557. SetPlayerVirtualWorld(playerid, Vehicles[i][vehVW]);
  558. SetPlayerInterior(playerid, Vehicles[i][vehInt]);
  559. }
  560. }
  561. }
  562. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement