DiscordVehiclesRestrict

Documentation moved [refer to following for instructions]: DiscordVehiclesRestrict - Badger Docs

Archived Documentation Below:

DiscordVehiclesRestrict (DiscordVehicleWhitelist by FAXES)

This is a Discord Vehicle Restriction script that restricts vehicles to certain roles with discord. This idea came about because of FAXES DiscordVehicleWhitelist. I have gotten permission from FAXES to add onto his script and make it possible to restrict vehicle use to only certain roles within Discord.

The permissions update every respawn for a player :slight_smile:

Download

DiscordVehiclesRestrict

How to Install

— (REQUIRED) MAKE SURE YOU SET UP IllusiveTea’s discord_perms script which you can find here: Discord roles for permissions (im creative, i know)

  1. Download DiscordVehicleWhitelist
  2. Extract the .zip and place the folder in your /resources/ of your Fivem server
  3. Make sure you add “start DiscordVehicleWhitelist” in your server.cfg
  4. Enjoy

Setup

  1. The 1s must be replaced with IDs of the roles within your discord
  2. The order of the roles need to match up with the restrictedVehicles list within the client.lua:
--- Config ---

--[[
	REPLACE THE '1's WITH YOUR DISCORD ROLES' IDs
]]
-- THESE NEED TO BE THE RESPECTIVE ROLE IDs OF YOUR DISCORD ROLES:
roleList = {
1, -- Civ
1, -- Trusted Civ
}

My Other Work

DiscordChatRoles

DiscordAcePerms

SandyVehiclesRestrict

DiscordTagIDs

DiscordVehiclesRestrict

DiscordPedPerms

BadgerAnims

DiscordWeaponPerms

BadgerTools

BadgerBankRobbery

VehicleTrustSystem

Credits

@Faxes for all his awesome work and for allowing me permission to release this! :slight_smile:

12 Likes

What’s the difference between this script and FAXES’s ?

1 Like

This one allows restricting vehicles to multiple certain groups rather than just 1 vehicle blacklisting script

1 Like

I have removed your Discord link as it is against our rules linked below to advertise your Discord.

for some reason this is not working

Make sure you set it up correctly. Works fine on my server

1 Like

Yout chat text roles works perfectlly but this seams to not be working

This works as well if set up properly. Run your config through a lua parser, fix your errors.

1 Like

I doble check everithing and I am not getting any errors, here are all the linies https://i.imgur.com/8wwB3dT.png

You did not follow instructions…

oh wait in that pic its the wrong server lua this is it https://i.imgur.com/2KFy7fB.png

What is not working about it? Are there any errors or? It works fine on my test server, so the script functions correctly and must be an error with setting it up properly.

Literlly no errors, I can spawn per example spawn owner vechiles even tho i only have state role on di**ord

I would try setting it up for 1 role, then go role by role. I can tell you the error is on your end since I have the exact same script running on my server with no issues.

ok will try that, but wierlly your other chat and id tags work perfectlly with same roles

At the risk of sounding stupid… does this work with vMenu’s permission system?

In what regard? It uses discord roles for the permissions to drive the vehicles

The script is not working for me neither. I don’t know what Im doing wrong. Since I restrict for example Zentorno to be restricted to Civilian only but somehow it restricts it to every rank. Im Im also not getting any errors

Picture of my configs:
https://gyazo.com/46e363cc16adbc72e57e5977371d3211

1 Like

Make sure your discord is being detected. Fivem API gets the discord ID through the application on your PC being open for it

I’m pretty sure is being detected and my discord is up running. I have also tried on my friends too but the same thing happens to them too.:slightly_smiling_face:

Have I done something wrong in these configs?

discord_perms:
https://gyazo.com/78f40d8fef8b67e331ea5afbee2edc2a

DiscordWhitelistRestrict:
https://gyazo.com/46e363cc16adbc72e57e5977371d3211