Advertisement
JuanStone

Fs Spawn Autos By JuanStone

May 5th, 2014
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.18 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include < a_samp >
  6. #include < zcmd >
  7. #include < sscanf >
  8.  
  9. #define Dialogo_Vehiculos 1
  10.  
  11. new AutoSpawn [ MAX_PLAYERS ];
  12.  
  13. new NombreVehiculo [ 212 ][ ] =
  14. {
  15. "Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
  16. "Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
  17. "Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
  18. "Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
  19. "Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
  20. "Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
  21. "Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
  22. "Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
  23. "Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
  24. "Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
  25. "Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
  26. "Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
  27. "Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
  28. "Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
  29. "Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
  30. "Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
  31. "Stair Trailer","Boxville","Farm Plow","Utility Trailer"
  32. };
  33.  
  34. public OnFilterScriptInit()
  35. {
  36. print ( "\n----------------------------------------" );
  37. print ( " Fs Menú Vehicles By JuanStone loaded " );
  38. print ( "http://forum.sa-mp.com/member.php?u=232360" );
  39. print ( "-----------------------------------------" );
  40. return 1;
  41. }
  42.  
  43. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  44. {
  45. if ( dialogid == Dialogo_Vehiculos )
  46. {
  47. if ( response )
  48. {
  49. switch ( listitem )
  50. {
  51. case 0: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+1, DIALOG_STYLE_LIST, "Off Road", "Landstalker\nBF Injection\nMonster\nPatriot\nRancher\nSandking\nMesa\nRancher police\nMonster A\nMonster B\nBandito\nDune\nHuntley" ,"accepted", "exit" );
  52. case 1: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+2, DIALOG_STYLE_LIST, "Sport Vehicles", "Buffalo\nInfernus\nCheetah\nBanshee\nTurismo\nSabre\nZR-350\nHotring Racer A\nBlista Compact\nHotring Racer B\nHotring Racer C\nSuper GT\nBullet\nUranus\nJester\nFlash\nEuros\nClub\nAlpha\nPhoenix", "accept", "exit" );
  53. case 2: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+3, DIALOG_STYLE_LIST, "Vehicles Lowriders", "Voodoo\nRemington\nSlamvan\nBlade\nTahoma\nSavanna\nBroadway\nTornado", "accepet", "exit" );
  54. case 3: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+4, DIALOG_STYLE_LIST, "Vehicles Saloons", "Bravura\nSentinel\nManana\nEsperanto\nWashington\nPremier\nPrevion\nAdmiral\nGlendale\nOceanic\nHermes\nVirgo\nGreenwood\nBloodring Banger\nElegant\nNebula\nMajestic\nBuccaneer\nFortune\nCadrona\nWillard\nVincent\nClover\nIntruder\nPrimo\nTampa\nSunrise\nMerit\nSultan\nElegy\nStafford\nEmperor\nGlendale Shit", "accept", "exit" );
  55. case 4: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+5, DIALOG_STYLE_LIST, "Vehicles Station Wagons", "Perenniel\nMoonbeam\nSolair\nRegina\nStratum", "accepted", "exit" );
  56. case 5: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+6, DIALOG_STYLE_LIST, "Vehicles Public Service", "Firetruck\nAmbulance\nTaxi\nEnforcer\nBus\nRhino\nBarracks\nCoach\nCabbie\nFBI Rancher\nHPV1000\nFBI Truck\nFiretruck LA\nPolice Car (LSPD)\nPolice Car (SFPD)\nPolice Car (LVPD)\nPolice Ranger\nS.W.A.T.", "accept", "exit" );
  57. case 6: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+7, DIALOG_STYLE_LIST, "Vehicles Industrial", "Linerunner\nTrashmaster\nPony\nMule\nBobcat\nRumpo\nPacker\nFlatbed\nYankee\nTopfun Van\nWalton\nBurrito\nBoxville\nBenson\nTanker\nRoadtrain\nCement Truck\nTractor\nSadler\nUtility Van\nYosemite\nDFT-30\nNewsvan\nPicador\nSadler Shit\nBoxville", "accept", "exit" );
  58. case 7: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+8, DIALOG_STYLE_LIST, "Unique Vehicles", "Dumper\nStretch\nMr Whoopee\nSecuricar\nHotknife\nRomero\nTram\nCaddy\nCamper\nBaggage\nDozer\nJourney\nTowtruck\nForklift\nCombine Harvester\nFreight (Train)\nBrownstreak (Train)\nVortex\nHustler\nKart\nMower\nSweeper\nTug\nHotdog", "accept", "exit" );
  59. case 8: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+9, DIALOG_STYLE_LIST, "Helicopters", "Leviathan\nHunter\nSeasparrow\nSparrow\nMaverick\nSan News Maverick\nPolice Maverick\nCargobob\nRaindance", "accept", "exit" );
  60. case 9: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+10, DIALOG_STYLE_LIST, "Airplane", "Skimmer\nRustler\nBeagle\nCropduster\nStuntplane\nShamal\nHydra\nNevada\nAT400\nAndromada\nDodo", "accept", "exit" );
  61. case 10: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+11, DIALOG_STYLE_LIST, "Boats", "Predator\nSquallo\nSpeeder\nReefer\nTropic\nCoastguard\nDinghy\nMarquis\nJetmax\nLaunch", "accept", "exit" );
  62. case 11: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+12, DIALOG_STYLE_LIST, "Trailers", "Article Trailer\nArticle Trailer 2\nFreight Flat Trailer (Train)\nStreak Trailer (Train)\nPetrol Trailer\nFreight Box Trailer (Train)\nArticle Trailer 3\nBaggage Trailer A\nBaggage Trailer B\nTug Stairs Trailer\nFarm Trailer\nUtility Trailer", "accept", "exit" );
  63. case 12: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+13, DIALOG_STYLE_LIST, "RC Vehicles", "RC Bandit\nRC Baron\nRC Raider\nRC Goblin\nRC Tiger\nRC Cam", "accept", "exit" );
  64. }
  65. }
  66. return 1;
  67. }
  68.  
  69. if ( dialogid == Dialogo_Vehiculos+1 )
  70. {
  71. if ( response )
  72. {
  73. switch ( listitem )
  74. {
  75. case 0: CrearVehiculo ( playerid, 400 );
  76. case 1: CrearVehiculo ( playerid, 424 );
  77. case 2: CrearVehiculo ( playerid, 444 );
  78. case 3: CrearVehiculo ( playerid, 470 );
  79. case 4: CrearVehiculo ( playerid, 489 );
  80. case 5: CrearVehiculo ( playerid, 495 );
  81. case 6: CrearVehiculo ( playerid, 500 );
  82. case 7: CrearVehiculo ( playerid, 505 );
  83. case 8: CrearVehiculo ( playerid, 556 );
  84. case 9: CrearVehiculo ( playerid, 557 );
  85. case 10: CrearVehiculo ( playerid, 568 );
  86. case 11: CrearVehiculo ( playerid, 573 );
  87. case 12: CrearVehiculo ( playerid, 579 );
  88. }
  89. }
  90. return 1;
  91. }
  92.  
  93. if ( dialogid == Dialogo_Vehiculos+2 )
  94. {
  95. if ( response )
  96. {
  97. switch ( listitem )
  98. {
  99. case 0: CrearVehiculo ( playerid, 402 );
  100. case 1: CrearVehiculo ( playerid, 411 );
  101. case 2: CrearVehiculo ( playerid, 415 );
  102. case 3: CrearVehiculo ( playerid, 429 );
  103. case 4: CrearVehiculo ( playerid, 451 );
  104. case 5: CrearVehiculo ( playerid, 475 );
  105. case 6: CrearVehiculo ( playerid, 477 );
  106. case 7: CrearVehiculo ( playerid, 494 );
  107. case 8: CrearVehiculo ( playerid, 496 );
  108. case 9: CrearVehiculo ( playerid, 502 );
  109. case 10: CrearVehiculo ( playerid, 503 );
  110. case 11: CrearVehiculo ( playerid, 506 );
  111. case 12: CrearVehiculo ( playerid, 541 );
  112. case 13: CrearVehiculo ( playerid, 558 );
  113. case 14: CrearVehiculo ( playerid, 559 );
  114. case 15: CrearVehiculo ( playerid, 565 );
  115. case 16: CrearVehiculo ( playerid, 587 );
  116. case 17: CrearVehiculo ( playerid, 489 );
  117. case 18: CrearVehiculo ( playerid, 602 );
  118. case 19: CrearVehiculo ( playerid, 603 );
  119. }
  120. }
  121. return 1;
  122. }
  123.  
  124. if ( dialogid == Dialogo_Vehiculos+3 )
  125. {
  126. if ( response )
  127. {
  128. switch ( listitem )
  129. {
  130. case 0: CrearVehiculo ( playerid, 412 );
  131. case 1: CrearVehiculo ( playerid, 534 );
  132. case 2: CrearVehiculo ( playerid, 535 );
  133. case 3: CrearVehiculo ( playerid, 536 );
  134. case 4: CrearVehiculo ( playerid, 566 );
  135. case 5: CrearVehiculo ( playerid, 567 );
  136. case 6: CrearVehiculo ( playerid, 575 );
  137. case 7: CrearVehiculo ( playerid, 576 );
  138. }
  139. }
  140. return 1;
  141. }
  142.  
  143. if ( dialogid == Dialogo_Vehiculos+4 )
  144. {
  145. if ( response )
  146. {
  147. switch ( listitem )
  148. {
  149. case 0: CrearVehiculo ( playerid, 401 );
  150. case 1: CrearVehiculo ( playerid, 405 );
  151. case 2: CrearVehiculo ( playerid, 410 );
  152. case 3: CrearVehiculo ( playerid, 419 );
  153. case 4: CrearVehiculo ( playerid, 421 );
  154. case 5: CrearVehiculo ( playerid, 426 );
  155. case 6: CrearVehiculo ( playerid, 436 );
  156. case 7: CrearVehiculo ( playerid, 445 );
  157. case 8: CrearVehiculo ( playerid, 466 );
  158. case 9: CrearVehiculo ( playerid, 467 );
  159. case 10: CrearVehiculo ( playerid, 474 );
  160. case 11: CrearVehiculo ( playerid, 491 );
  161. case 12: CrearVehiculo ( playerid, 492 );
  162. case 13: CrearVehiculo ( playerid, 504 );
  163. case 14: CrearVehiculo ( playerid, 507 );
  164. case 15: CrearVehiculo ( playerid, 516 );
  165. case 16: CrearVehiculo ( playerid, 517 );
  166. case 17: CrearVehiculo ( playerid, 518 );
  167. case 18: CrearVehiculo ( playerid, 526 );
  168. case 19: CrearVehiculo ( playerid, 527 );
  169. case 20: CrearVehiculo ( playerid, 529 );
  170. case 21: CrearVehiculo ( playerid, 540 );
  171. case 22: CrearVehiculo ( playerid, 542 );
  172. case 23: CrearVehiculo ( playerid, 546 );
  173. case 24: CrearVehiculo ( playerid, 547 );
  174. case 25: CrearVehiculo ( playerid, 549 );
  175. case 26: CrearVehiculo ( playerid, 550 );
  176. case 27: CrearVehiculo ( playerid, 551 );
  177. case 28: CrearVehiculo ( playerid, 560 );
  178. case 29: CrearVehiculo ( playerid, 562 );
  179. case 30: CrearVehiculo ( playerid, 580 );
  180. case 31: CrearVehiculo ( playerid, 585 );
  181. case 32: CrearVehiculo ( playerid, 604 );
  182. }
  183. }
  184. return 1;
  185. }
  186.  
  187. if ( dialogid == Dialogo_Vehiculos+5 )
  188. {
  189. if ( response )
  190. {
  191. switch ( listitem )
  192. {
  193. case 0: CrearVehiculo ( playerid, 404 );
  194. case 1: CrearVehiculo ( playerid, 418 );
  195. case 2: CrearVehiculo ( playerid, 458 );
  196. case 3: CrearVehiculo ( playerid, 479 );
  197. case 4: CrearVehiculo ( playerid, 561 );
  198. }
  199. }
  200. return 1;
  201. }
  202.  
  203. if ( dialogid == Dialogo_Vehiculos+6 )
  204. {
  205. if ( response )
  206. {
  207. switch ( listitem )
  208. {
  209. case 0: CrearVehiculo ( playerid, 407 );
  210. case 1: CrearVehiculo ( playerid, 416 );
  211. case 2: CrearVehiculo ( playerid, 420 );
  212. case 3: CrearVehiculo ( playerid, 427 );
  213. case 4: CrearVehiculo ( playerid, 431 );
  214. case 5: CrearVehiculo ( playerid, 432 );
  215. case 6: CrearVehiculo ( playerid, 433 );
  216. case 7: CrearVehiculo ( playerid, 437 );
  217. case 8: CrearVehiculo ( playerid, 438 );
  218. case 9: CrearVehiculo ( playerid, 490 );
  219. case 10: CrearVehiculo ( playerid, 523 );
  220. case 11: CrearVehiculo ( playerid, 528 );
  221. case 12: CrearVehiculo ( playerid, 544 );
  222. case 13: CrearVehiculo ( playerid, 596 );
  223. case 14: CrearVehiculo ( playerid, 597 );
  224. case 15: CrearVehiculo ( playerid, 598 );
  225. case 16: CrearVehiculo ( playerid, 599 );
  226. case 17: CrearVehiculo ( playerid, 601 );
  227. }
  228. }
  229. return 1;
  230. }
  231.  
  232. if ( dialogid == Dialogo_Vehiculos+7 )
  233. {
  234. if ( response )
  235. {
  236. switch ( listitem )
  237. {
  238. case 0: CrearVehiculo ( playerid, 403 );
  239. case 1: CrearVehiculo ( playerid, 408 );
  240. case 2: CrearVehiculo ( playerid, 413 );
  241. case 3: CrearVehiculo ( playerid, 414 );
  242. case 4: CrearVehiculo ( playerid, 422 );
  243. case 5: CrearVehiculo ( playerid, 440 );
  244. case 6: CrearVehiculo ( playerid, 443 );
  245. case 7: CrearVehiculo ( playerid, 455 );
  246. case 8: CrearVehiculo ( playerid, 456 );
  247. case 9: CrearVehiculo ( playerid, 459 );
  248. case 10: CrearVehiculo ( playerid, 478 );
  249. case 11: CrearVehiculo ( playerid, 482 );
  250. case 12: CrearVehiculo ( playerid, 498 );
  251. case 13: CrearVehiculo ( playerid, 499 );
  252. case 14: CrearVehiculo ( playerid, 514 );
  253. case 15: CrearVehiculo ( playerid, 515 );
  254. case 16: CrearVehiculo ( playerid, 524 );
  255. case 17: CrearVehiculo ( playerid, 531 );
  256. case 18: CrearVehiculo ( playerid, 543 );
  257. case 19: CrearVehiculo ( playerid, 552 );
  258. case 20: CrearVehiculo ( playerid, 554 );
  259. case 21: CrearVehiculo ( playerid, 578 );
  260. case 22: CrearVehiculo ( playerid, 582 );
  261. case 23: CrearVehiculo ( playerid, 600 );
  262. case 24: CrearVehiculo ( playerid, 605 );
  263. case 25: CrearVehiculo ( playerid, 609 );
  264. }
  265. }
  266. return 1;
  267. }
  268.  
  269. if ( dialogid == Dialogo_Vehiculos+8 )
  270. {
  271. if ( response )
  272. {
  273. switch ( listitem )
  274. {
  275. case 0: CrearVehiculo ( playerid, 406 );
  276. case 1: CrearVehiculo ( playerid, 409 );
  277. case 2: CrearVehiculo ( playerid, 423 );
  278. case 3: CrearVehiculo ( playerid, 428 );
  279. case 4: CrearVehiculo ( playerid, 434 );
  280. case 5: CrearVehiculo ( playerid, 442 );
  281. case 6: CrearVehiculo ( playerid, 449 );
  282. case 7: CrearVehiculo ( playerid, 457 );
  283. case 8: CrearVehiculo ( playerid, 483 );
  284. case 9: CrearVehiculo ( playerid, 485 );
  285. case 10: CrearVehiculo ( playerid, 486 );
  286. case 11: CrearVehiculo ( playerid, 508 );
  287. case 12: CrearVehiculo ( playerid, 525 );
  288. case 13: CrearVehiculo ( playerid, 530 );
  289. case 14: CrearVehiculo ( playerid, 532 );
  290. case 15: CrearVehiculo ( playerid, 537 );
  291. case 16: CrearVehiculo ( playerid, 538 );
  292. case 17: CrearVehiculo ( playerid, 539 );
  293. case 18: CrearVehiculo ( playerid, 545 );
  294. case 19: CrearVehiculo ( playerid, 571 );
  295. case 20: CrearVehiculo ( playerid, 572 );
  296. case 21: CrearVehiculo ( playerid, 574 );
  297. case 22: CrearVehiculo ( playerid, 583 );
  298. case 23: CrearVehiculo ( playerid, 588 );
  299. }
  300. }
  301. return 1;
  302. }
  303.  
  304. if ( dialogid == Dialogo_Vehiculos+9 )
  305. {
  306. if ( response )
  307. {
  308. switch ( listitem )
  309. {
  310. case 0: CrearVehiculo ( playerid, 417 );
  311. case 1: CrearVehiculo ( playerid, 425 );
  312. case 2: CrearVehiculo ( playerid, 447 );
  313. case 3: CrearVehiculo ( playerid, 469 );
  314. case 4: CrearVehiculo ( playerid, 487 );
  315. case 5: CrearVehiculo ( playerid, 488 );
  316. case 6: CrearVehiculo ( playerid, 497 );
  317. case 7: CrearVehiculo ( playerid, 548 );
  318. case 8: CrearVehiculo ( playerid, 563 );
  319. }
  320. }
  321. return 1;
  322. }
  323.  
  324. if ( dialogid == Dialogo_Vehiculos+10 )
  325. {
  326. if ( response )
  327. {
  328. switch ( listitem )
  329. {
  330. case 0: CrearVehiculo ( playerid, 460 );
  331. case 1: CrearVehiculo ( playerid, 476 );
  332. case 2: CrearVehiculo ( playerid, 511 );
  333. case 3: CrearVehiculo ( playerid, 512 );
  334. case 4: CrearVehiculo ( playerid, 513 );
  335. case 5: CrearVehiculo ( playerid, 519 );
  336. case 6: CrearVehiculo ( playerid, 520 );
  337. case 7: CrearVehiculo ( playerid, 553 );
  338. case 8: CrearVehiculo ( playerid, 577 );
  339. case 9: CrearVehiculo ( playerid, 592 );
  340. case 10: CrearVehiculo ( playerid, 593 );
  341. }
  342. }
  343. return 1;
  344. }
  345.  
  346. if ( dialogid == Dialogo_Vehiculos+11 )
  347. {
  348. if ( response )
  349. {
  350. switch ( listitem )
  351. {
  352. case 0: CrearVehiculo ( playerid, 430 );
  353. case 1: CrearVehiculo ( playerid, 446 );
  354. case 2: CrearVehiculo ( playerid, 452 );
  355. case 3: CrearVehiculo ( playerid, 453 );
  356. case 4: CrearVehiculo ( playerid, 454 );
  357. case 5: CrearVehiculo ( playerid, 472 );
  358. case 6: CrearVehiculo ( playerid, 473 );
  359. case 7: CrearVehiculo ( playerid, 484 );
  360. case 8: CrearVehiculo ( playerid, 493 );
  361. case 9: CrearVehiculo ( playerid, 595 );
  362. }
  363. }
  364. return 1;
  365. }
  366.  
  367. if ( dialogid == Dialogo_Vehiculos+12 )
  368. {
  369. if ( response )
  370. {
  371. switch ( listitem )
  372. {
  373. case 0: CrearVehiculo ( playerid, 435 );
  374. case 1: CrearVehiculo ( playerid, 450 );
  375. case 2: CrearVehiculo ( playerid, 569 );
  376. case 3: CrearVehiculo ( playerid, 570 );
  377. case 4: CrearVehiculo ( playerid, 584 );
  378. case 5: CrearVehiculo ( playerid, 590 );
  379. case 6: CrearVehiculo ( playerid, 591 );
  380. case 7: CrearVehiculo ( playerid, 606 );
  381. case 8: CrearVehiculo ( playerid, 607 );
  382. case 9: CrearVehiculo ( playerid, 608 );
  383. case 10: CrearVehiculo ( playerid, 610 );
  384. case 11: CrearVehiculo ( playerid, 611 );
  385. }
  386. }
  387. return 1;
  388. }
  389.  
  390. if ( dialogid == Dialogo_Vehiculos+13 )
  391. {
  392. if ( response )
  393. {
  394. switch ( listitem )
  395. {
  396. case 0: CrearVehiculo ( playerid, 441 );
  397. case 1: CrearVehiculo ( playerid, 464 );
  398. case 2: CrearVehiculo ( playerid, 465 );
  399. case 3: CrearVehiculo ( playerid, 501 );
  400. case 4: CrearVehiculo ( playerid, 564 );
  401. case 5: CrearVehiculo ( playerid, 594 );
  402. }
  403. }
  404. return 1;
  405. }
  406. return 1;
  407. }
  408.  
  409. CMD:vehicles ( playerid, params[] )
  410. {
  411. #pragma unused params
  412. ShowPlayerDialog(playerid, Dialogo_Vehiculos, DIALOG_STYLE_LIST, "Vehicle menu","Vehicles Off Road\nSport Vehicles\nVehicles Lowriders\nVehicles Saloons\nVehicles Station Wagons\nVehicles Public Service\nVehicles Industrial\nUnique Vehicles\nVehicles Helicopters\nVehicles Airplane\nVehicles Boats\nVehicles Trailers\nRC Vehicles","accept", "exit" );
  413.  
  414. return 1;
  415. }
  416.  
  417. CMD:v ( playerid, params[] )
  418. {
  419. new vehiculo;
  420.  
  421. if ( sscanf ( params, "i", vehiculo ) ) return SendClientMessage ( playerid, -1, "Uso: /v [id]." );
  422. {
  423. if ( vehiculo < 400 || vehiculo > 611 ) return SendClientMessage(playerid, -1, "vehicle incorrect /v [ id(400-611) ]" );
  424.  
  425. CrearVehiculo ( playerid, vehiculo );
  426.  
  427. NombreDelAuto ( playerid );
  428. }
  429. return 1;
  430. }
  431.  
  432. CrearVehiculo ( playerid, modelid )
  433. {
  434. new Vehiculo, Float:x, Float:y, Float:z, Float:angulo;
  435.  
  436. if ( GetPlayerState ( playerid ) == PLAYER_STATE_DRIVER )
  437. {
  438. Vehiculo = GetPlayerVehicleID ( playerid );
  439.  
  440. GetVehiclePos ( Vehiculo, x, y, z );
  441.  
  442. GetVehicleZAngle ( Vehiculo, angulo );
  443.  
  444. DestroyVehicle ( Vehiculo );
  445. }
  446. else
  447. {
  448. GetPlayerPos ( playerid, x, y, z );
  449.  
  450. GetPlayerFacingAngle ( playerid, angulo );
  451. }
  452. if ( AutoSpawn[ playerid ] != 0 ) DestroyVehicle ( AutoSpawn[ playerid ] );
  453.  
  454. AutoSpawn[ playerid ] = CreateVehicle ( modelid, x, y, z, angulo, -1, -1, 60 );
  455.  
  456. LinkVehicleToInterior ( AutoSpawn [ playerid ], GetPlayerInterior ( playerid ) );
  457.  
  458. SetVehicleVirtualWorld ( AutoSpawn [ playerid ], GetPlayerVirtualWorld ( playerid ) );
  459.  
  460. PutPlayerInVehicle ( playerid, AutoSpawn[ playerid ], 0 );
  461.  
  462. NombreDelAuto ( playerid );
  463.  
  464. return 1;
  465. }
  466.  
  467. stock NombreDelAuto ( playerid )
  468. {
  469. new Vehiculo, VehiculoID, string [ 144 ];
  470.  
  471. VehiculoID = GetPlayerVehicleID ( playerid );
  472.  
  473. Vehiculo = GetVehicleModel ( VehiculoID ) - 400;
  474.  
  475. format ( string, sizeof ( string ), "~n~~n~~n~~n~~n~~n~~b~~h~~h~ %s!", NombreVehiculo[ Vehiculo ] );
  476.  
  477. GameTextForPlayer ( playerid, string, 3000, 5 );
  478.  
  479. return 1;
  480. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement