Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum VehicleModel2
- {
- Chimera,
- CarbonRs,
- Hermes,
- Virgo3,
- Hotknife,
- TipTruck,
- Faggio2,
- Youga,
- Yosemite3,
- Glendale,
- Dominator,
- Rebla,
- Bf400,
- Kalahari,
- Trophytruck,
- Coquette,
- BType,
- Boxville3,
- Baller2,
- Ardent,
- Miljet,
- Phantom3,
- FreightCar,
- Elegy,
- Speedo4,
- Cheetah2,
- SabreGt2,
- Speeder,
- Reaper,
- Buffalo3,
- FreightCont2,
- Tempesta,
- Dinghy2,
- Tropic,
- GBurrito2,
- Stryder,
- Hexer,
- Dynasty,
- Stafford,
- Crusader,
- CogCabrio,
- Vacca,
- Formula,
- PBus2,
- Gauntlet2,
- Chino,
- Polmav,
- PropTrailer,
- CargoPlane,
- SlamVan5,
- Surano,
- Hauler2,
- Cliffhanger,
- RakeTrailer,
- JB7002,
- Squalo,
- Turismor,
- Outlaw,
- Avenger2,
- Kanjo,
- Kuruma2,
- Infernus,
- Nightshark,
- Speeder2,
- Boxville4,
- Handler,
- Imperator,
- Volatol,
- Cruiser,
- PoliceT,
- Tornado,
- Lguard,
- Baller5,
- Mixer2,
- Lynx,
- Huntley,
- Fusilade,
- Swinger,
- Dinghy3,
- UtilliTruck,
- Voodoo2,
- BoatTrailer,
- Moonbeam,
- Dune2,
- Zr380,
- Khamelion,
- Apc,
- Packer,
- TankerCar,
- Hustler,
- Luxor,
- Romero,
- Fcr,
- Issi4,
- Barracks3,
- Banshee2,
- Baller4,
- Lectro,
- FreightGrain,
- Comet5,
- Baller6,
- Bruiser,
- Cerberus2,
- Boxville5,
- Contender,
- Drafter,
- Surfer,
- Cog552,
- Supervolito,
- TrailerSmall,
- Ruston,
- Gauntlet3,
- Dukes,
- Speedo2,
- SlamVan,
- Sadler2,
- Buffalo2,
- Vagrant,
- Gargoyle,
- Pranger,
- Sovereign,
- Frogger,
- Buzzard2,
- Ztype,
- Alpha,
- Submersible,
- Rhino,
- Coquette3,
- Sanchez,
- Buzzard,
- Sheava,
- Defiler,
- SlamVan2,
- Annihilator,
- Z190,
- Monster4,
- Rhapsody,
- Bjxl,
- Biff,
- Jetmax,
- Dinghy4,
- Pariah,
- Sultan2,
- Sentinel2,
- Habanero,
- Oppressor,
- Stromberg,
- Intruder,
- UtilliTruck2,
- Burrito4,
- Savestra,
- Mule,
- Cog55,
- Toro2,
- Mesa,
- Rrocket,
- Xa21,
- FreightCont1,
- Issi3,
- Ruiner2,
- Casco,
- Pony2,
- Furia,
- Duster,
- Hydra,
- Sultan,
- Tampa,
- Sugoi,
- Voltic2,
- Sandking2,
- Impaler2,
- Coquette2,
- GrainTrailer,
- Youga2,
- Freight,
- Tezeract,
- Ninef,
- Dinghy,
- Nero,
- Nokota,
- Blista2,
- Tula,
- Thrax,
- Skylift,
- Michelli,
- Jb700,
- Jet,
- BobcatXl,
- Toro,
- Barracks2,
- Specter2,
- Swift2,
- Velum2,
- Pigalle,
- Nero2,
- Verlierer2,
- Sentinel3,
- Peyote3,
- Hotring,
- Asbo,
- SlamVan3,
- Superd,
- BfInjection,
- Fbi,
- TriBike,
- Bmx,
- Burrito5,
- Caddy,
- Rumpo,
- Ambulance,
- Dubsta,
- Technical2,
- Akula,
- Openwheel2,
- Xls,
- Seminole,
- Marshall,
- Gp1,
- Issi6,
- Caracara,
- Hakuchou,
- Landstalker,
- Bestiagts,
- Deviant,
- Airbus,
- Zhaba,
- Emerus,
- Serrano,
- Vestra,
- Oracle,
- Sentinel,
- Sc1,
- Flatbed,
- Technical3,
- Warrener,
- Cyclone,
- Cargobob3,
- Paragon2,
- Fmj,
- Tractor3,
- Tropic2,
- Vstr,
- Tulip,
- Rumpo3,
- Deluxo,
- Paradise,
- Thruster,
- Schafter4,
- Sanctus,
- Forklift,
- Openwheel1,
- TrailerLarge,
- Torero,
- Picador,
- Hauler,
- Tornado2,
- Issi5,
- Scarab2,
- Valkyrie2,
- Stinger,
- Brioso,
- Airtug,
- Comet4,
- Molotok,
- Windsor,
- Deveste,
- Fagaloa,
- Cargobob2,
- Imperator2,
- Tractor,
- RancherXl,
- Pounder2,
- T20,
- Akuma,
- Dilettante2,
- Strikeforce,
- Yosemite2,
- Manana2,
- Monster3,
- Stratum,
- RapidGt2,
- Bison3,
- Streiter,
- SlamVan6,
- Stockade,
- Enduro,
- Tornado3,
- DLoader,
- Washington,
- Mower,
- Tr3,
- Diablous2,
- Youga3,
- Besra,
- Peyote,
- Thrust,
- Retinue,
- Issi7,
- Zion3,
- Yosemite,
- Ratbike,
- Camper,
- Baller3,
- Specter,
- Bulldozer,
- Tropos,
- Moonbeam2,
- Dune3,
- Fugitive,
- Gb200,
- Cerberus3,
- Police3,
- Trash,
- Schafter6,
- Sheriff2,
- Stalion,
- RancherXl2,
- Gauntlet4,
- FireTruck,
- Vagner,
- Tourbus,
- Mule4,
- Frogger2,
- Taco,
- Tanker2,
- Titan,
- Osiris,
- Daemon,
- Voodoo,
- Cavalcade,
- TrailerLogs,
- Futo,
- Cargobob4,
- Retinue2,
- Esskey,
- Brutus3,
- Menacer,
- Police,
- RapidGt3,
- Benson,
- Tyrus,
- Lurcher,
- Oppressor2,
- Insurgent2,
- Bison2,
- Carbonizzare,
- Tr2,
- Tr4,
- Pounder,
- Prototipo,
- UtilliTruck3,
- Dukes3,
- Rocoto,
- Brutus,
- Bagger,
- DockTrailer,
- Phantom,
- Dump,
- Blazer,
- Manana,
- Stunt,
- Gauntlet5,
- Entity2,
- Faction,
- Avenger,
- Avarus,
- Guardian,
- Rallytruck,
- Tug,
- Club,
- StingerGt,
- Technical,
- Impaler,
- Phoenix,
- Gt500,
- Tractor2,
- Coach,
- Mesa3,
- SlamVan4,
- Trailers3,
- Mule3,
- Italigtb,
- Rebel2,
- Bruiser3,
- Primo2,
- Faction3,
- Tornado4,
- Cognoscenti,
- Comet3,
- PBus,
- Feltzer2,
- Terbyte,
- Boxville,
- Havok,
- Police4,
- Stretch,
- Formula2,
- Nightshade,
- RapidGt,
- Windsor2,
- Impaler3,
- Insurgent3,
- Wastlndr,
- Asterope,
- Surge,
- Brutus2,
- Premier,
- Emperor2,
- TrailerSmall2,
- Insurgent,
- Neon,
- Volatus,
- Faggio,
- Pfister811,
- Novak,
- Deathbike2,
- Seminole2,
- Asea,
- Asea2,
- Peyote2,
- Gauntlet,
- Tornado5,
- Faction2,
- PoliceOld2,
- Rumpo2,
- Granger,
- TvTrailer,
- Microlight,
- Penetrator,
- Seven70,
- Everon,
- Mammatus,
- GBurrito,
- Impaler4,
- Burrito3,
- Coquette4,
- Rubble,
- Starling,
- Scrap,
- Bullet,
- Bruiser2,
- Riot2,
- SabreGt,
- Sheriff,
- Velum,
- Supervolito2,
- Double,
- Dune,
- Mamba,
- Maverick,
- Radi,
- Phantom2,
- Fbi2,
- ArmyTrailer2,
- Police2,
- Voltic,
- Neo,
- Nightblade,
- Valkyrie,
- Blazer5,
- Trailers2,
- Feltzer3,
- Clique,
- Tornado6,
- Gresley,
- PoliceOld1,
- Riata,
- Raiden,
- AlphaZ1,
- Manchez,
- Schafter3,
- Brawler,
- Zr3803,
- Stanier,
- ArmyTrailer,
- Ninef2,
- Sanchez2,
- Prairie,
- Bodhi2,
- Khanjali,
- Infernus2,
- Daemon2,
- Zentorno,
- Pyro,
- Dominator5,
- Deathbike3,
- Kuruma,
- Chino2,
- Tigon,
- Vindicator,
- TrFlat,
- Caracara2,
- Burrito,
- TowTruck,
- Surfer2,
- Cheetah,
- Jester,
- Nimbus,
- Dominator6,
- EntityXf,
- Ingot,
- Faggio3,
- Lazer,
- Blazer3,
- Ellie,
- FlashGt,
- Trash2,
- Schafter2,
- Minitank,
- Vigilante,
- Emperor3,
- Dubsta3,
- TriBike2,
- Le7B,
- Adder,
- Shamal,
- Luxor2,
- Tampa3,
- Rebel,
- ArmyTanker,
- Blade,
- Riot,
- Zion2,
- Sandking,
- Issi2,
- Toros,
- Primo,
- Scarab,
- Fq2,
- Taipan,
- Imorgon,
- Dilettante,
- Minivan2,
- Zion,
- Jester2,
- Zr3802,
- Trailers4,
- RentalBus,
- Furoregt,
- Tampa2,
- Submersible2,
- Mule2,
- Comet2,
- Marquis,
- Banshee,
- Seashark,
- Buccaneer2,
- Zombiea,
- Tailgater,
- Howard,
- Cutter,
- Visione,
- Cheburek,
- Dominator3,
- Turismo2,
- Rogue,
- CableCar,
- Taxi,
- TipTruck2,
- Locust,
- Dominator2,
- Glendale2,
- Pcj,
- Burrito2,
- Dodo,
- Virgo2,
- Ruffian,
- Bati2,
- Schafter5,
- Docktug,
- Nebula,
- Trailers,
- Ripley,
- Monster,
- Landstalker2,
- Fixter,
- Komoda,
- BType2,
- Dune4,
- Vigero,
- Barracks,
- Speedo,
- Baller,
- Patriot,
- Cerberus,
- Cavalcade2,
- Mixer,
- FreightTrailer,
- Omnis,
- Caddy3,
- Fcr2,
- Imperator3,
- Mogul,
- Mesa2,
- Schwarzer,
- Tanker,
- Seasparrow,
- Monster5,
- Bus,
- Chernobog,
- Dominator4,
- Emperor,
- Buccaneer,
- Zorrusso,
- Raptor,
- RatLoader,
- Krieger,
- Trophytruck2,
- Cuban800,
- Scramjet,
- Nemesis,
- Massacro2,
- Penumbra2,
- Jackal,
- Wolfsbane,
- Seashark2,
- Blimp2,
- Vortex,
- Cognoscenti2,
- BType3,
- Sadler,
- Blista3,
- F620,
- RatLoader2,
- Scarab3,
- Zombieb,
- Elegy2,
- Caddy2,
- Oracle2,
- Schlagen,
- Virgo,
- Predator,
- Italigtb2,
- Paragon,
- TowTruck2,
- Blazer4,
- Monroe,
- Xls2,
- Panto,
- Patriot2,
- Revolter,
- Shotaro,
- Stalion2,
- TriBike3,
- BaleTrailer,
- Dubsta2,
- Seabreeze,
- Viseris,
- Felon,
- Penumbra,
- Tyrant,
- Hellion,
- Bifta,
- Blista,
- Swift,
- ItaliGto,
- Dukes2,
- S80,
- Autarch,
- Dune5,
- Seashark3,
- Minivan,
- Blimp3,
- Brickade,
- Buffalo,
- SultanRs,
- RcBandito,
- Suntrap,
- Hakuchou2,
- Diablous,
- Boxville2,
- Ruiner,
- Jester3,
- Stockade3,
- Barrage,
- Jugular,
- Scorcher,
- Innovation,
- Blimp,
- Massacro,
- Vader,
- Kamacho,
- Journey,
- Pony,
- Limo2,
- Bati,
- Felon2,
- Savage,
- Freecrawler,
- Cargobob,
- Vamos,
- Blazer2,
- Hunter,
- Policeb,
- Bombushka,
- Halftrack,
- Deathbike,
- Bison,
- Regina,
- Exemplar
- }
- public class CarSpawnerServer : BaseScript
- {
- public CarSpawnerServer()
- {
- RegisterCommand("v", new Action<int, List<object>, string>(OnSpawnCar), false);
- }
- private void OnSpawnCar(int source, List<object> args, string rawCommand)
- {
- Player player = Players[source];
- if (args.Count == 0)
- {
- SendChat(player, "Usage: /v [index or vehicle name]");
- return;
- }
- string input = args[0].ToString();
- string modelName = null;
- // נסה לפרש מספר (אינדקס)
- if (int.TryParse(input, out int index))
- {
- if (!Enum.IsDefined(typeof(VehicleModel2), index))
- {
- SendChat(player, $"Invalid vehicle index: {index}");
- return;
- }
- modelName = Enum.GetName(typeof(VehicleModel2), index);
- }
- else
- {
- modelName = input.ToLower();
- // בדיקה אם הדגם קיים בכלל ברשימה (אופציונלי)
- if (!Enum.TryParse<VehicleModel2>(modelName, true, out _))
- {
- SendChat(player, $"Note: '{modelName}' is not in the official list, trying anyway.");
- }
- }
- // שלח ללקוח את שם המודל כדי לשגר אותו
- TriggerClientEvent(player, "CarSpawner:SpawnVehicle", modelName);
- }
- private void SendChat(Player player, string message)
- {
- TriggerClientEvent(player, "chat:addMessage", new Dictionary<string, object>
- {
- { "color", new[] { 255, 255, 0 } },
- { "args", new[] { "[Server]", message } }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement