Advertisement
Guest User

Untitled

a guest
Oct 18th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.64 KB | None | 0 0
  1. #include <a_samp>
  2. new Menu:CarMenu;
  3. new Menu:CarMenu2;
  4. new Menu:CarMenu3;
  5. new car[MAX_PLAYERS];
  6. #define COLOR_GREY 0xAFAFAFAA
  7. #define COLOR_GREEN 0x33AA33AA
  8. #define COLOR_RED 0xCC0000AA
  9. #define COLOR_YELLOW 0xFFFF00AA
  10. #define COLOR_WHITE 0xFFFFFFAA
  11.  
  12. #pragma tabsize 0
  13. // Hoi! Wat doe jij hier?
  14. // CJ Met zijn supercoole snor does not approYou Have To Be Rcon Admin To Use This Commande!
  15. #define FILTERSCRIPT
  16.  
  17. #if defined FILTERSCRIPT
  18.  
  19. public OnFilterScriptInit()
  20.  
  21. {
  22. print("\n--------------------------------------");
  23. print(" Auto menu voor Vakonov server ");
  24. print(" Door @nickbouwhuis ");
  25. print("--------------------------------------\n");
  26.  
  27. CarMenu = CreateMenu("Kies maar!", 1, 200.0, 100.0, 150.0, 150.0);
  28.  
  29. AddMenuItem(CarMenu, 0, "Infernus (:D)");
  30. AddMenuItem(CarMenu, 0, "Sultan");
  31. AddMenuItem(CarMenu, 0, "Blade");
  32. AddMenuItem(CarMenu, 0, "Cheetah");
  33. AddMenuItem(CarMenu, 0, "Elegy");
  34. AddMenuItem(CarMenu, 0, "Comet");
  35. AddMenuItem(CarMenu, 0, "-- Motoren en fietsen --");
  36. AddMenuItem(CarMenu, 0, "NRG-500");
  37. AddMenuItem(CarMenu, 0, "Quad");
  38. AddMenuItem(CarMenu, 0, "PCJ-600");
  39. AddMenuItem(CarMenu, 0, "Pizza scooter");
  40. AddMenuItem(CarMenu, 0, "Volgende");
  41.  
  42. CarMenu2 = CreateMenu("Kies maar!", 1, 200.0, 100.0, 150.0, 150.0);
  43. AddMenuItem(CarMenu2, 0, "Go Kart");
  44. AddMenuItem(CarMenu2, 0, "Dirt Bike");
  45. AddMenuItem(CarMenu2, 0, "Police bike");
  46. AddMenuItem(CarMenu2, 0, "Police Ranger");
  47. AddMenuItem(CarMenu2, 0, "Police car (LVPD)");
  48. AddMenuItem(CarMenu2, 0, "Freeway");
  49. AddMenuItem(CarMenu2, 0, "BMX");
  50. AddMenuItem(CarMenu2, 0, "Rotfiets");
  51. AddMenuItem(CarMenu2, 0, "MtBike");
  52. AddMenuItem(CarMenu2, 0, "Volgende");
  53. CarMenu3 = CreateMenu("Kies maar!", 1, 200.0, 100.0, 150.0, 150.0);
  54. AddMenuItem(CarMenu3, 0, "Vortex");
  55. AddMenuItem(CarMenu3, 0, "Monster Truck");
  56. AddMenuItem(CarMenu3, 0, "Monster Truck 2");
  57. AddMenuItem(CarMenu3, 0, "Cabbie");
  58. AddMenuItem(CarMenu2, 0, "-- Vliegtuigen en overige --");
  59. AddMenuItem(CarMenu2, 0, "Shamal");
  60. AddMenuItem(CarMenu2, 0, "Hydra");
  61. AddMenuItem(CarMenu2, 0, "Hunter");
  62. AddMenuItem(CarMenu3, 0, "Terug");
  63. return 1;
  64. }
  65.  
  66. public OnFilterScriptExit()
  67. {
  68.  
  69.  
  70.  
  71. return 1;
  72. }
  73.  
  74. #else
  75.  
  76. main()
  77. {
  78. print("\n----------------------------------");
  79. print(" Hoi");
  80. print("----------------------------------\n");
  81. }
  82.  
  83. #endif
  84.  
  85. public OnGameModeInit()
  86. {
  87.  
  88.  
  89. return 1;
  90. }
  91.  
  92. public OnGameModeExit()
  93. {
  94. return 1;
  95. }
  96.  
  97. public OnPlayerRequestClass(playerid, classid)
  98. {
  99. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  100. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  101. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  102. return 1;
  103. }
  104.  
  105. public OnPlayerRequestSpawn(playerid)
  106. {
  107. return 1;
  108. }
  109.  
  110. public OnPlayerConnect(playerid)
  111. {
  112. return 1;
  113. }
  114.  
  115. public OnPlayerDisconnect(playerid, reason)
  116. {
  117. return 1;
  118. }
  119.  
  120. public OnPlayerSpawn(playerid)
  121. {
  122.  
  123. return 1;
  124. }
  125.  
  126. public OnPlayerDeath(playerid, killerid, reason)
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnVehicleSpawn(vehicleid)
  132. {
  133. return 1;
  134. }
  135.  
  136. public OnVehicleDeath(vehicleid, killerid)
  137. {
  138. return 1;
  139. }
  140.  
  141. public OnPlayerText(playerid, text[])
  142. {
  143. return 1;
  144. }
  145.  
  146. public OnPlayerCommandText(playerid, cmdtext[])
  147.  
  148. {
  149. if (strcmp(cmdtext, "/v",true)==0)
  150. {
  151. if(!IsPlayerInAnyVehicle(playerid))
  152. {
  153. ShowMenuForPlayer(CarMenu,playerid);
  154. }
  155. else
  156. {
  157. SendClientMessage(playerid,0xFFFFFFFF,"Je zit al in een voertuig!");
  158. }
  159. return 1;
  160.  
  161.  
  162. }
  163. if (strcmp(cmdtext, "/auto",true)==0)
  164. {
  165. SendClientMessage(playerid,COLOR_YELLOW,"Het nieuwe commando is /v (V is voor Voertuig)");
  166. return 1;}
  167.  
  168. return 0;
  169. }
  170.  
  171. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  172. {
  173. return 1;
  174. }
  175.  
  176. public OnPlayerExitVehicle(playerid, vehicleid)
  177. {
  178. return 1;
  179. }
  180.  
  181. public OnPlayerStateChange(playerid, newstate, oldstate)
  182. {
  183. return 1;
  184. }
  185.  
  186. public OnPlayerEnterCheckpoint(playerid)
  187. {
  188. return 1;
  189. }
  190.  
  191. public OnPlayerLeaveCheckpoint(playerid)
  192. {
  193. return 1;
  194. }
  195.  
  196. public OnPlayerEnterRaceCheckpoint(playerid)
  197. {
  198. return 1;
  199. }
  200.  
  201. public OnPlayerLeaveRaceCheckpoint(playerid)
  202. {
  203. return 1;
  204. }
  205.  
  206. public OnRconCommand(cmd[])
  207. {
  208. return 1;
  209. }
  210.  
  211. public OnObjectMoved(objectid)
  212. {
  213. return 1;
  214. }
  215.  
  216. public OnPlayerObjectMoved(playerid, objectid)
  217. {
  218. return 1;
  219. }
  220.  
  221. public OnPlayerPickUpPickup(playerid, pickupid)
  222. {
  223. return 1;
  224. }
  225.  
  226. public OnPlayerSelectedMenuRow(playerid, row)
  227. {
  228. new Menu:CurrentMenu = GetPlayerMenu(playerid);
  229. if(CurrentMenu == CarMenu)
  230. {
  231. switch(row)
  232.  
  233. {
  234.  
  235.  
  236. case 0: //infernus
  237. {
  238. GetPlayerFacingAngle(playerid,a);
  239. GetPlayerPos(playerid, x, y, z);
  240. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  241. car[playerid] = CreateVehicle(411,x,y,z+4,a,-1,-1,30000);
  242. PutPlayerInVehicle(playerid, car[playerid], 0);
  243. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Infernus!");
  244. SendClientMessage(playerid, 0xFFFFFFFF, "Maak 'm wel geel he!!");
  245.  
  246. }
  247. case 1: //armour
  248. {
  249. GetPlayerFacingAngle(playerid,a);
  250. GetPlayerPos(playerid, x, y, z);
  251. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  252. car[playerid] = CreateVehicle(560,x,y,z+4,a,-1,-1,30000);
  253. PutPlayerInVehicle(playerid, car[playerid], 0);
  254. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Sultan");
  255.  
  256. }
  257. case 2: //heal+armour
  258. {
  259. GetPlayerFacingAngle(playerid,a);
  260. GetPlayerPos(playerid, x, y, z);
  261. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  262. car[playerid] = CreateVehicle(536,x,y,z+4,a,-1,-1,30000);
  263. PutPlayerInVehicle(playerid, car[playerid], 0);
  264. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Blade");
  265.  
  266. }
  267. case 3: //healx2
  268. {
  269. GetPlayerFacingAngle(playerid,a);
  270. GetPlayerPos(playerid, x, y, z);
  271. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  272. car[playerid] = CreateVehicle(415,x,y,z+4,a,-1,-1,30000);
  273. PutPlayerInVehicle(playerid, car[playerid], 0);
  274. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Cheetah");
  275.  
  276. }
  277. case 4: //armourx2
  278. {
  279. GetPlayerFacingAngle(playerid,a);
  280. GetPlayerPos(playerid, x, y, z);
  281. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  282. car[playerid] = CreateVehicle(562,x,y,z+4,a,-1,-1,30000);
  283. PutPlayerInVehicle(playerid, car[playerid], 0);
  284. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Elegy");
  285.  
  286. }
  287. case 5: //M4
  288. {
  289. GetPlayerFacingAngle(playerid,a);
  290. GetPlayerPos(playerid, x, y, z);
  291. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  292. car[playerid] = CreateVehicle(480,x,y,z+4,a,-1,-1,30000);
  293. PutPlayerInVehicle(playerid, car[playerid], 0);
  294. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Comet");
  295.  
  296. }
  297. case 6: //bikes
  298. {
  299. SendClientMessage(playerid,0xFFFFFFFF,"Hahah. Dit is niks :)");
  300. ShowMenuForPlayer(CarMenu,playerid);
  301.  
  302. }
  303. case 7: //M4
  304. {
  305. GetPlayerFacingAngle(playerid,a);
  306. GetPlayerPos(playerid, x, y, z);
  307. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  308. car[playerid] = CreateVehicle(522,x,y,z+4,a,-1,-1,30000);
  309. PutPlayerInVehicle(playerid, car[playerid], 0);
  310. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een NRG-500");
  311. }
  312.  
  313. case 8: //M4
  314. {
  315. GetPlayerFacingAngle(playerid,a);
  316. GetPlayerPos(playerid, x, y, z);
  317. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  318. car[playerid] = CreateVehicle(471,x,y,z+4,a,-1,-1,30000);
  319. PutPlayerInVehicle(playerid, car[playerid], 0);
  320. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Quad_bike");
  321. }
  322.  
  323. case 9: //next
  324. {
  325. GetPlayerFacingAngle(playerid,a);
  326. GetPlayerPos(playerid, x, y, z);
  327. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  328. car[playerid] = CreateVehicle(461,x,y,z+4,a,-1,-1,30000);
  329. PutPlayerInVehicle(playerid, car[playerid], 0);
  330. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een PCJ-600");
  331.  
  332.  
  333.  
  334. }
  335.  
  336. case 10: //pcj-600
  337. {
  338. GetPlayerFacingAngle(playerid,a);
  339. GetPlayerPos(playerid, x, y, z);
  340. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  341. car[playerid] = CreateVehicle(448,x,y,z+4,a,-1,-1,30000);
  342. PutPlayerInVehicle(playerid, car[playerid], 0);
  343. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een pizza scootertje.");
  344. SendClientMessage(playerid, 0xFFFFFFFF, "Snel! De pizza's worden koud!");
  345.  
  346.  
  347. }
  348.  
  349.  
  350. case 11: //other vehicles
  351. {
  352.  
  353. ShowMenuForPlayer(CarMenu2,playerid);
  354. }
  355.  
  356. }
  357. }
  358.  
  359. if(CurrentMenu == CarMenu2)
  360. {
  361. switch(row)
  362.  
  363. {
  364.  
  365.  
  366. case 0: //go kart
  367. {
  368. GetPlayerFacingAngle(playerid,a);
  369. GetPlayerPos(playerid, x, y, z);
  370. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  371. car[playerid] = CreateVehicle(571,x,y,z+4,a,-1,-1,30000);
  372. PutPlayerInVehicle(playerid, car[playerid], 0);
  373. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Go Kart");
  374.  
  375. }
  376. case 1: //dirt bike
  377. {
  378. GetPlayerFacingAngle(playerid,a);
  379. GetPlayerPos(playerid, x, y, z);
  380. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  381. car[playerid] = CreateVehicle(468,x,y,z+4,a,-1,-1,30000);
  382. PutPlayerInVehicle(playerid, car[playerid], 0);
  383. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Dirt Bike");
  384.  
  385. }
  386.  
  387. case 2: //police bike
  388. {
  389. GetPlayerFacingAngle(playerid,a);
  390. GetPlayerPos(playerid, x, y, z);
  391. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  392. car[playerid] = CreateVehicle(523,x,y,z+4,a,-1,-1,30000);
  393. PutPlayerInVehicle(playerid, car[playerid], 0);
  394. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Police Bike");
  395.  
  396. }
  397.  
  398. case 3: //police ranger
  399. {
  400. GetPlayerFacingAngle(playerid,a);
  401. GetPlayerPos(playerid, x, y, z);
  402. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  403. car[playerid] = CreateVehicle(599,x,y,z+4,a,-1,-1,30000);
  404. PutPlayerInVehicle(playerid, car[playerid], 0);
  405. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Police Ranger");
  406.  
  407. }
  408. case 4: //police car
  409. {
  410. GetPlayerFacingAngle(playerid,a);
  411. GetPlayerPos(playerid, x, y, z);
  412. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  413. car[playerid] = CreateVehicle(598,x,y,z+4,a,-1,-1,30000);
  414. PutPlayerInVehicle(playerid, car[playerid], 0);
  415. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een LVPD Politiewagen");
  416.  
  417. }
  418. case 5:
  419. {
  420. GetPlayerFacingAngle(playerid,a);
  421. GetPlayerPos(playerid, x, y, z);
  422. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  423. car[playerid] = CreateVehicle(481,x,y,z+4,a,-1,-1,30000);
  424. PutPlayerInVehicle(playerid, car[playerid], 0);
  425. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een BMX");
  426.  
  427. }
  428. case 6:
  429. {
  430. GetPlayerFacingAngle(playerid,a);
  431. GetPlayerPos(playerid, x, y, z);
  432. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  433. car[playerid] = CreateVehicle(509,x,y,z+4,a,-1,-1,30000);
  434. PutPlayerInVehicle(playerid, car[playerid], 0);
  435. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een vervelde rotfiets");
  436. SendClientMessage(playerid, 0xFFFFFFFF, "Verder alles goed?");
  437.  
  438. }
  439. case 7:
  440. {
  441. GetPlayerFacingAngle(playerid,a);
  442. GetPlayerPos(playerid, x, y, z);
  443. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  444. car[playerid] = CreateVehicle(510,x,y,z+4,a,-1,-1,30000);
  445. PutPlayerInVehicle(playerid, car[playerid], 0);
  446. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Mountain Bike");
  447.  
  448. }
  449.  
  450.  
  451. }
  452. case 8:
  453. {
  454. ShowMenuForPlayer(CarMenu3,playerid);
  455. }
  456. }
  457. }
  458. if(CurrentMenu == CarMenu3)
  459. {
  460. switch(row)
  461.  
  462. {
  463.  
  464.  
  465. case 0:
  466. {
  467. GetPlayerFacingAngle(playerid,a);
  468. GetPlayerPos(playerid, x, y, z);
  469. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  470. car[playerid] = CreateVehicle(539,x,y,z+4,a,-1,-1,30000);
  471. PutPlayerInVehicle(playerid, car[playerid], 0);
  472. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Vortex");
  473.  
  474. }
  475. case 1:
  476. {
  477. GetPlayerFacingAngle(playerid,a);
  478. GetPlayerPos(playerid, x, y, z);
  479. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  480. car[playerid] = CreateVehicle(444,x,y,z+4,a,-1,-1,30000);
  481. PutPlayerInVehicle(playerid, car[playerid], 0);
  482. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Monster Truck");
  483.  
  484. }
  485. case 2:
  486. {
  487. GetPlayerFacingAngle(playerid,a);
  488. GetPlayerPos(playerid, x, y, z);
  489. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  490. car[playerid] = CreateVehicle(556,x,y,z+4,a,-1,-1,30000);
  491. PutPlayerInVehicle(playerid, car[playerid], 0);
  492. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Monster Truck No.2");
  493.  
  494. }
  495. case 3:
  496. {
  497. GetPlayerFacingAngle(playerid,a);
  498. GetPlayerPos(playerid, x, y, z);
  499. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  500. car[playerid] = CreateVehicle(438,x,y,z+4,a,-1,-1,30000);
  501. PutPlayerInVehicle(playerid, car[playerid], 0);
  502. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Cabbie");
  503.  
  504. }
  505. case 4: // Planes Jets etc
  506. {
  507. SendClientMessage(playerid,0xFFFFFFFF,"Wasmetjou?");
  508. }
  509. case 5:
  510. {
  511. GetPlayerFacingAngle(playerid,a);
  512. GetPlayerPos(playerid, x, y, z);
  513. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  514. car[playerid] = CreateVehicle(519,x,y,z+4,a,-1,-1,30000);
  515. PutPlayerInVehicle(playerid, car[playerid], 0);
  516. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Shamal");
  517.  
  518. }
  519. case 6:
  520. {
  521. GetPlayerFacingAngle(playerid,a);
  522. GetPlayerPos(playerid, x, y, z);
  523. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  524. car[playerid] = CreateVehicle(520,x,y,z+4,a,-1,-1,30000);
  525. PutPlayerInVehicle(playerid, car[playerid], 0);
  526. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Hydra");
  527.  
  528. }
  529. case 7:
  530. {
  531. GetPlayerFacingAngle(playerid,a);
  532. GetPlayerPos(playerid, x, y, z);
  533. if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
  534. car[playerid] = CreateVehicle(425,x,y,z+4,a,-1,-1,30000);
  535. PutPlayerInVehicle(playerid, car[playerid], 0);
  536. SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Hunter");
  537. case 8:
  538. {
  539. ShowMenuForPlayer(CarMenu2,playerid);
  540. }
  541. }
  542. }
  543. return 1;
  544. }
  545.  
  546. public OnPlayerExitedMenu(playerid)
  547. {
  548. return 1;
  549. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement