[FilterScript] Basic vehicle spawn system
#1

Hello guys now made ​​this vehicle spawn system, the system will look very full, it comes with anti spam vehicle to avoid lag on the server apart when you spawn a vehicle you will see a textdraw with your name, the system comes with all the vehicles which are in gta.

Commands:

/Vehicles << Show Dialog Menu vehicles

/v [id vehicle] << spawning a vehicle by id


what makes each player a new vehicle spawning desaparesera the last to spawn what did this to avoid lag on the server.

click to view video


Total 14 dialogues are 13 different categories of vehicles.

pawn Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include < a_samp >
#include < zcmd >
#include < sscanf >

#define Dialogo_Vehiculos 1

new AutoSpawn [ MAX_PLAYERS ];

new NombreVehiculo [ 212 ][ ] =
{
"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
"Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
"Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
"Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
"Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
"Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
"Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
"Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
"Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
"Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
"Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
"Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
"Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
"Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
"Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
"Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
"Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};

public OnFilterScriptInit()
{
    print ( "\n----------------------------------------" );
    print ( "   Fs Menъ Vehicles By JuanStone loaded   " );
    print ( "http://forum.sa-mp.com/member.php?u=232360" );
    print (  "-----------------------------------------" );
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if ( dialogid == Dialogo_Vehiculos )
   {
   if ( response )
   {
   switch ( listitem )
   {
   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" );
   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" );
   case  2: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+3,  DIALOG_STYLE_LIST, "Vehicles Lowriders", "Voodoo\nRemington\nSlamvan\nBlade\nTahoma\nSavanna\nBroadway\nTornado", "accepet", "exit" );
   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" );
   case  4: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+5,  DIALOG_STYLE_LIST, "Vehicles Station Wagons", "Perenniel\nMoonbeam\nSolair\nRegina\nStratum", "accepted", "exit" );
   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" );
   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" );
   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" );
   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" );
   case  9: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+10, DIALOG_STYLE_LIST, "Airplane", "Skimmer\nRustler\nBeagle\nCropduster\nStuntplane\nShamal\nHydra\nNevada\nAT400\nAndromada\nDodo", "accept", "exit" );
   case 10: ShowPlayerDialog ( playerid, Dialogo_Vehiculos+11, DIALOG_STYLE_LIST, "Boats", "Predator\nSquallo\nSpeeder\nReefer\nTropic\nCoastguard\nDinghy\nMarquis\nJetmax\nLaunch", "accept", "exit" );
   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" );
   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" );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+1 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 400 );
   case  1: CrearVehiculo ( playerid, 424 );
   case  2: CrearVehiculo ( playerid, 444 );
   case  3: CrearVehiculo ( playerid, 470 );
   case  4: CrearVehiculo ( playerid, 489 );
   case  5: CrearVehiculo ( playerid, 495 );
   case  6: CrearVehiculo ( playerid, 500 );
   case  7: CrearVehiculo ( playerid, 505 );
   case  8: CrearVehiculo ( playerid, 556 );
   case  9: CrearVehiculo ( playerid, 557 );
   case 10: CrearVehiculo ( playerid, 568 );
   case 11: CrearVehiculo ( playerid, 573 );
   case 12: CrearVehiculo ( playerid, 579 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+2 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 402 );
   case  1: CrearVehiculo ( playerid, 411 );
   case  2: CrearVehiculo ( playerid, 415 );
   case  3: CrearVehiculo ( playerid, 429 );
   case  4: CrearVehiculo ( playerid, 451 );
   case  5: CrearVehiculo ( playerid, 475 );
   case  6: CrearVehiculo ( playerid, 477 );
   case  7: CrearVehiculo ( playerid, 494 );
   case  8: CrearVehiculo ( playerid, 496 );
   case  9: CrearVehiculo ( playerid, 502 );
   case 10: CrearVehiculo ( playerid, 503 );
   case 11: CrearVehiculo ( playerid, 506 );
   case 12: CrearVehiculo ( playerid, 541 );
   case 13: CrearVehiculo ( playerid, 558 );
   case 14: CrearVehiculo ( playerid, 559 );
   case 15: CrearVehiculo ( playerid, 565 );
   case 16: CrearVehiculo ( playerid, 587 );
   case 17: CrearVehiculo ( playerid, 489 );
   case 18: CrearVehiculo ( playerid, 602 );
   case 19: CrearVehiculo ( playerid, 603 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+3 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case 0: CrearVehiculo ( playerid, 412 );
   case 1: CrearVehiculo ( playerid, 534 );
   case 2: CrearVehiculo ( playerid, 535 );
   case 3: CrearVehiculo ( playerid, 536 );
   case 4: CrearVehiculo ( playerid, 566 );
   case 5: CrearVehiculo ( playerid, 567 );
   case 6: CrearVehiculo ( playerid, 575 );
   case 7: CrearVehiculo ( playerid, 576 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+4 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 401 );
   case  1: CrearVehiculo ( playerid, 405 );
   case  2: CrearVehiculo ( playerid, 410 );
   case  3: CrearVehiculo ( playerid, 419 );
   case  4: CrearVehiculo ( playerid, 421 );
   case  5: CrearVehiculo ( playerid, 426 );
   case  6: CrearVehiculo ( playerid, 436 );
   case  7: CrearVehiculo ( playerid, 445 );
   case  8: CrearVehiculo ( playerid, 466 );
   case  9: CrearVehiculo ( playerid, 467 );
   case 10: CrearVehiculo ( playerid, 474 );
   case 11: CrearVehiculo ( playerid, 491 );
   case 12: CrearVehiculo ( playerid, 492 );
   case 13: CrearVehiculo ( playerid, 504 );
   case 14: CrearVehiculo ( playerid, 507 );
   case 15: CrearVehiculo ( playerid, 516 );
   case 16: CrearVehiculo ( playerid, 517 );
   case 17: CrearVehiculo ( playerid, 518 );
   case 18: CrearVehiculo ( playerid, 526 );
   case 19: CrearVehiculo ( playerid, 527 );
   case 20: CrearVehiculo ( playerid, 529 );
   case 21: CrearVehiculo ( playerid, 540 );
   case 22: CrearVehiculo ( playerid, 542 );
   case 23: CrearVehiculo ( playerid, 546 );
   case 24: CrearVehiculo ( playerid, 547 );
   case 25: CrearVehiculo ( playerid, 549 );
   case 26: CrearVehiculo ( playerid, 550 );
   case 27: CrearVehiculo ( playerid, 551 );
   case 28: CrearVehiculo ( playerid, 560 );
   case 29: CrearVehiculo ( playerid, 562 );
   case 30: CrearVehiculo ( playerid, 580 );
   case 31: CrearVehiculo ( playerid, 585 );
   case 32: CrearVehiculo ( playerid, 604 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+5 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case 0: CrearVehiculo ( playerid, 404 );
   case 1: CrearVehiculo ( playerid, 418 );
   case 2: CrearVehiculo ( playerid, 458 );
   case 3: CrearVehiculo ( playerid, 479 );
   case 4: CrearVehiculo ( playerid, 561 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+6 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 407 );
   case  1: CrearVehiculo ( playerid, 416 );
   case  2: CrearVehiculo ( playerid, 420 );
   case  3: CrearVehiculo ( playerid, 427 );
   case  4: CrearVehiculo ( playerid, 431 );
   case  5: CrearVehiculo ( playerid, 432 );
   case  6: CrearVehiculo ( playerid, 433 );
   case  7: CrearVehiculo ( playerid, 437 );
   case  8: CrearVehiculo ( playerid, 438 );
   case  9: CrearVehiculo ( playerid, 490 );
   case 10: CrearVehiculo ( playerid, 523 );
   case 11: CrearVehiculo ( playerid, 528 );
   case 12: CrearVehiculo ( playerid, 544 );
   case 13: CrearVehiculo ( playerid, 596 );
   case 14: CrearVehiculo ( playerid, 597 );
   case 15: CrearVehiculo ( playerid, 598 );
   case 16: CrearVehiculo ( playerid, 599 );
   case 17: CrearVehiculo ( playerid, 601 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+7 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 403 );
   case  1: CrearVehiculo ( playerid, 408 );
   case  2: CrearVehiculo ( playerid, 413 );
   case  3: CrearVehiculo ( playerid, 414 );
   case  4: CrearVehiculo ( playerid, 422 );
   case  5: CrearVehiculo ( playerid, 440 );
   case  6: CrearVehiculo ( playerid, 443 );
   case  7: CrearVehiculo ( playerid, 455 );
   case  8: CrearVehiculo ( playerid, 456 );
   case  9: CrearVehiculo ( playerid, 459 );
   case 10: CrearVehiculo ( playerid, 478 );
   case 11: CrearVehiculo ( playerid, 482 );
   case 12: CrearVehiculo ( playerid, 498 );
   case 13: CrearVehiculo ( playerid, 499 );
   case 14: CrearVehiculo ( playerid, 514 );
   case 15: CrearVehiculo ( playerid, 515 );
   case 16: CrearVehiculo ( playerid, 524 );
   case 17: CrearVehiculo ( playerid, 531 );
   case 18: CrearVehiculo ( playerid, 543 );
   case 19: CrearVehiculo ( playerid, 552 );
   case 20: CrearVehiculo ( playerid, 554 );
   case 21: CrearVehiculo ( playerid, 578 );
   case 22: CrearVehiculo ( playerid, 582 );
   case 23: CrearVehiculo ( playerid, 600 );
   case 24: CrearVehiculo ( playerid, 605 );
   case 25: CrearVehiculo ( playerid, 609 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+8 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 406 );
   case  1: CrearVehiculo ( playerid, 409 );
   case  2: CrearVehiculo ( playerid, 423 );
   case  3: CrearVehiculo ( playerid, 428 );
   case  4: CrearVehiculo ( playerid, 434 );
   case  5: CrearVehiculo ( playerid, 442 );
   case  6: CrearVehiculo ( playerid, 449 );
   case  7: CrearVehiculo ( playerid, 457 );
   case  8: CrearVehiculo ( playerid, 483 );
   case  9: CrearVehiculo ( playerid, 485 );
   case 10: CrearVehiculo ( playerid, 486 );
   case 11: CrearVehiculo ( playerid, 508 );
   case 12: CrearVehiculo ( playerid, 525 );
   case 13: CrearVehiculo ( playerid, 530 );
   case 14: CrearVehiculo ( playerid, 532 );
   case 15: CrearVehiculo ( playerid, 537 );
   case 16: CrearVehiculo ( playerid, 538 );
   case 17: CrearVehiculo ( playerid, 539 );
   case 18: CrearVehiculo ( playerid, 545 );
   case 19: CrearVehiculo ( playerid, 571 );
   case 20: CrearVehiculo ( playerid, 572 );
   case 21: CrearVehiculo ( playerid, 574 );
   case 22: CrearVehiculo ( playerid, 583 );
   case 23: CrearVehiculo ( playerid, 588 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+9 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case 0: CrearVehiculo ( playerid, 417 );
   case 1: CrearVehiculo ( playerid, 425 );
   case 2: CrearVehiculo ( playerid, 447 );
   case 3: CrearVehiculo ( playerid, 469 );
   case 4: CrearVehiculo ( playerid, 487 );
   case 5: CrearVehiculo ( playerid, 488 );
   case 6: CrearVehiculo ( playerid, 497 );
   case 7: CrearVehiculo ( playerid, 548 );
   case 8: CrearVehiculo ( playerid, 563 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+10 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 460 );
   case  1: CrearVehiculo ( playerid, 476 );
   case  2: CrearVehiculo ( playerid, 511 );
   case  3: CrearVehiculo ( playerid, 512 );
   case  4: CrearVehiculo ( playerid, 513 );
   case  5: CrearVehiculo ( playerid, 519 );
   case  6: CrearVehiculo ( playerid, 520 );
   case  7: CrearVehiculo ( playerid, 553 );
   case  8: CrearVehiculo ( playerid, 577 );
   case  9: CrearVehiculo ( playerid, 592 );
   case 10: CrearVehiculo ( playerid, 593 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+11 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case 0: CrearVehiculo ( playerid, 430 );
   case 1: CrearVehiculo ( playerid, 446 );
   case 2: CrearVehiculo ( playerid, 452 );
   case 3: CrearVehiculo ( playerid, 453 );
   case 4: CrearVehiculo ( playerid, 454 );
   case 5: CrearVehiculo ( playerid, 472 );
   case 6: CrearVehiculo ( playerid, 473 );
   case 7: CrearVehiculo ( playerid, 484 );
   case 8: CrearVehiculo ( playerid, 493 );
   case 9: CrearVehiculo ( playerid, 595 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+12 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case  0: CrearVehiculo ( playerid, 435 );
   case  1: CrearVehiculo ( playerid, 450 );
   case  2: CrearVehiculo ( playerid, 569 );
   case  3: CrearVehiculo ( playerid, 570 );
   case  4: CrearVehiculo ( playerid, 584 );
   case  5: CrearVehiculo ( playerid, 590 );
   case  6: CrearVehiculo ( playerid, 591 );
   case  7: CrearVehiculo ( playerid, 606 );
   case  8: CrearVehiculo ( playerid, 607 );
   case  9: CrearVehiculo ( playerid, 608 );
   case 10: CrearVehiculo ( playerid, 610 );
   case 11: CrearVehiculo ( playerid, 611 );
   }
   }
   return 1;
   }
   
   if ( dialogid == Dialogo_Vehiculos+13 )
   {
   if ( response )
   {
   switch ( listitem )
   {
   case 0: CrearVehiculo ( playerid, 441 );
   case 1: CrearVehiculo ( playerid, 464 );
   case 2: CrearVehiculo ( playerid, 465 );
   case 3: CrearVehiculo ( playerid, 501 );
   case 4: CrearVehiculo ( playerid, 564 );
   case 5: CrearVehiculo ( playerid, 594 );
   }
   }
   return 1;
   }
   return 1;
}

CMD:vehicles ( playerid, params[] )
{
   #pragma unused params
   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" );

   return 1;
}

CMD:v ( playerid, params[] )
{
   new vehiculo;
   
   if ( sscanf ( params, "i", vehiculo ) ) return SendClientMessage ( playerid, -1, "Uso: /v [id]." );
   {
   if ( vehiculo < 400 || vehiculo > 611 ) return  SendClientMessage(playerid, -1, "vehicle incorrect /v [ id(400-611) ]" );
   
   CrearVehiculo ( playerid, vehiculo );
   
   NombreDelAuto ( playerid );
   }
   return 1;
}

CrearVehiculo ( playerid, modelid )
{
   new Vehiculo, Float:x, Float:y, Float:z, Float:angulo;

   if ( GetPlayerState ( playerid ) == PLAYER_STATE_DRIVER )
   {
   Vehiculo = GetPlayerVehicleID ( playerid );

   GetVehiclePos ( Vehiculo, x, y, z );

   GetVehicleZAngle ( Vehiculo, angulo );

   DestroyVehicle ( Vehiculo );
   }
   else
   {
   GetPlayerPos ( playerid, x, y, z );

   GetPlayerFacingAngle ( playerid, angulo );
   }
   if ( AutoSpawn[ playerid ] != 0 ) DestroyVehicle ( AutoSpawn[ playerid ] );

   AutoSpawn[ playerid ] = CreateVehicle ( modelid, x, y, z, angulo, -1, -1, 60 );

   LinkVehicleToInterior ( AutoSpawn [ playerid ], GetPlayerInterior ( playerid ) );

   SetVehicleVirtualWorld ( AutoSpawn [ playerid ], GetPlayerVirtualWorld ( playerid ) );

   PutPlayerInVehicle ( playerid, AutoSpawn[ playerid ], 0 );

   NombreDelAuto ( playerid );

   return 1;
}

stock NombreDelAuto ( playerid )
   {
   new Vehiculo, VehiculoID, string [ 144 ];

   VehiculoID = GetPlayerVehicleID ( playerid );

   Vehiculo = GetVehicleModel ( VehiculoID ) - 400;

   format ( string, sizeof ( string ), "~n~~n~~n~~n~~n~~n~~b~~h~~h~    %s!", NombreVehiculo[ Vehiculo ] );

   GameTextForPlayer ( playerid, string, 3000, 5 );

   return 1;
}
forgive if I do not understand, but hardly spoke english :c.


click to view image
click to view another image

Dowload - Pastebin
Reply


Messages In This Thread
Basic vehicle spawn system - by JuanStone - 06.05.2014, 02:12
Re: Basic vehicle spawn system - by Mckarlis - 06.05.2014, 07:35
Re: Basic vehicle spawn system - by sekonoppa - 06.05.2014, 08:39
Re: Basic vehicle spawn system - by JuanStone - 06.05.2014, 19:36

Forum Jump:


Users browsing this thread: 1 Guest(s)