[Release] Sandy Vehicles Restrict

Version 1.0

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 :slight_smile:

Installation
  1. Download SandyVehiclesRestrict
  2. Extract the .zip and place the folder in your /resources/ of your Fivem server
  3. Make sure you give your permission group access or give your steam identifier access to run the command
  4. Enjoy :slight_smile:
Permissions

Remember to replace [Role] with the role group’s name and [HexID] with your steam hex

add_ace identifier.steam:[HexID] Restrictions.Sandy allow
add_ace group.[Role] Restrictions.Sandy allow
add_principal identifier.steam:[HexID] [Role]
Download

SandyVehiclesRestrict

My Other Work

DiscordChatRoles

DiscordAcePerms

SandyVehiclesRestrict

DiscordTagIDs

DiscordVehiclesRestrict

DiscordPedPerms

BadgerAnims

DiscordWeaponPerms

BadgerTools

BadgerBankRobbery

VehicleTrustSystem

Version 2.0
Coming Soon

Ideas:

  • Countdown till vehicles are restricted
  • Restrict vehicles based on being in Sandy Shores zone (using coordinates in Fivem)
  • Permission to bypass restrictions on vehicles (for staff/owners possibly)
  • Suggest some ideas :slight_smile:
4 Likes

Good job on this. Looks great :+1:.

1 Like

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?

1 Like

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 wonder where you got this idea… :thinking:

Hey!

I recommend you to use

RegisterCommand( commandName --[[ string ]], handler --[[ func ]], restricted --[[ boolean ]] )

for your commands. Doing it the way like in your script is deprecated and shouldn’t be used.
Everything else looks fine, nice script. :slight_smile:

Greetings

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 :stuck_out_tongue: Thanks for the tip though

Unlisted until deprecated methods (chatMessage) are fixed.

Use chat:addMessage instead. For commands use RegisterCommand.

As per rules

  • Deprecated methods . Make sure your release does not contain deprecated methods, such as creating chat commands without the REGISTER_COMMAND native.

I fixed all the deprecation I believe :slight_smile:

Hey can I edit some of your stuff and repost and give you credit’s

What do the edits involve?

Having different restricted cars and different locations

1 Like

I suggest you PR instead. It will be rejected on the forum if it’s just adding some locations/vehicles on a list.

1 Like

ok thank you

Do a PR and I’ll surely add it. I’ll also add it here as version 2.0 and give your credit where it’s due :slight_smile:

Best Regards,
Badger

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.