I made this only because the /car command everyone seems to use is deprecated as hell (doesn’t use RegisterCommand, still checks for the slash and all!). And this one has more features.
Usage: /car modelname
Features:
- Admin-only setting (configurable in server.lua- simple true/false change.)
- Banned car list (in client.lua- uses numbers of vehicle classes) (admins can still spawn banned cars)
- Teleports you into the car
- Deletes the last vehicle (if you spawned it with the command)
- Instantly turns on the engine
- Much more feedback than the original: Lets you know what it’s doing so you don’t have to do any guesswork.
By default, military and train vehicles are banned. Simply get rid of the “19,21” on line 15 to unban them.
As for the vehicle ban list, the list uses the number ID’s for the classes to ban them. A full list of the ID’s is available in this native.
Enjoy!
No, this does not actively check if a user is in a banned car, it only prevents the spawning of them using it. This means players with access to client-side menus and other utilities can still spawn banned cars. If there is a high demand, I might make a resource to do this and actively check if a user is in a banned vehicle and kick them out if so.
carcommand2.0.zip (1.8 KB)