This is a pretty simple script, but I felt a need for it.
What this script does is restricts vehicles for all users on the server if the AOP is Sandy Shores. The way this is done is by a command being ran.
KEEP IN MIND: The restrictions list is missing a lot of super and sports vehicles. You can easily add their spawn codes into the list in client.lua via “restrictList” list.
Commands:
/sandy on - Turns the restrictions for vehicles on
/sandy off - Turns the restrictions for vehicles off
Upon running /sandy on, a message will be sent like:
Upon running /sandy off, a message will be sent like:
Now what happens in game when users try to drive the super cars whilst the restrictions are on you ask?:
They simply get kicked out of the vehicle
Installation
Download SandyVehiclesRestrict
Extract the .zip and place the folder in your /resources/ of your Fivem server
Make sure you give your permission group access or give your steam identifier access to run the command
Enjoy
Permissions
Remember to replace [Role] with the role group’s name and [HexID] with your steam hex
Thanks so much! I’m thinking about updating it to actually use location instead and check if they’re in bounds of sandy to make it even more advanced and useful.
Just a question for you… if someone is in sandy area and driving at 120mph in a super car and the AOP is then set on… does it just boot them out of the car at 120?
Currently the way it works is once the command is ran, it boots anyone in a restricted car out of it. I could add in a countdown until it restricts the car if that’s a concern of yours?
i was just wondering what would happen if already in a vehicle and moving. Could instead of doing a count down. Check to see if vehicle is moving if false - kick and delete vehicle … if true set gas to 0 or turn engine off - and when not moving then kick and delete… instead of just kicking out of a moving vehicle.
Just a suggestion since i was in a vehicle and booted out at 90mph and no idea why it made me a bit confused and looked horrible from a RP side of things.
I gotta learn how to use that, you’re right. I’m just very used to like coding minecraft plugins in the past, so like I’m not used to this different syntax Thanks for the tip though
I really like the concept of this as our server does not allow Supercars in Blaine County. A couple questions about V2 that is coming, will that have the zone restrictions, and if so, are we able to edit the zone? Also, are we able to edit the vehicles that are not allowed?
You’ve always been able to edit the vehicles that are not allowed lol. With V2, the zone restriction would just be limited to Sandy Shores and Harmony possibly. Not sure if I’ll actually add the zone thing though. The countdown I will most definitely probably add though.