Andrew's Vehicle Spawner
Dependency Required.
This resource requires NativeUI Lua to function. It will not operate without this dependency. Please note that support will not be provided for the use of this resource if the required dependency is not installed and properly configured.
Overview
Andrew’s Vehicle Spawner is a FiveM resource that allows players to spawn vehicles from configurable categories, with optional ACE permissions per category or per individual vehicle.
Key Features:
Create multiple vehicle categories (e.g., Compacts, Sports, Emergency).
Restrict access to categories using ACE permissions.
Restrict individual vehicles within categories if desired.
Configurable keybind for opening the vehicle menu.
Optional automatic deletion of vehicles when spawning new ones or when access is denied.
Workflow
1️⃣ Opening the Vehicle Spawner
Default keybind is F6 (
Config.Keybind = 167).Pressing the key opens a menu listing all accessible vehicle categories.
2️⃣ Selecting a Category
Categories may require ACE permissions (
useACEPermissions = true).Only categories the player has access to are displayed.
3️⃣ Selecting a Vehicle
Each category contains vehicles with a
label(display name) andmodel(spawn code).Vehicles spawn at the player’s current location.
If
Config.DeleteCurrentVehicle = true, the current vehicle is deleted before spawning a new one.
4️⃣ Access Restriction
Vehicles in categories can be restricted individually.
If a player enters a vehicle they do not have access to and
Config.DeleteVehicles = true, the vehicle is automatically deleted.
Configuration (config.lua)
config.lua)Keybind
Vehicle Deletion Options
Categories
Each category defines a group of vehicles and optional ACE permissions.
Notes:
label→ The display name in the menu.model→ The vehicle spawn code used in the game.requiredPermission→ String representing the ACE permission required to access the category.useACEPermissions→ Set totrueto enforce permission checks.
Example Categories
Compacts
No
Blista, Brioso R/A, Dilettante
Sports
No
Comet, Sultan RS, Ninef
Off-Road
No
Brawler, Dune Buggy, Sandking XL
Emergency
Yes
Police, Police2, Police3
The Emergency category is restricted by ACE permission (
andrewvehicles.emergency).
Adding New Categories
Copy an existing category block inside
Config.Categories.Change the
name,useACEPermissions,requiredPermission, andvehiclesas needed.Add vehicles to
vehiclesusing the format:
Restricting Individual Vehicles
Currently, vehicle restrictions are applied at the category level.
If you want to restrict individual vehicles, ensure
useACEPermissions = trueand define a separate category with only permitted vehicles.
Permissions
ACE permissions can be added in
server.cfg:
Replace
group.adminwith your server group.
Optional Features
Delete current vehicle
Config.DeleteCurrentVehicle
Automatically deletes the current vehicle before spawning a new one.
Delete unauthorized vehicles
Config.DeleteVehicles
Deletes vehicles if the player does not have permission for the category.
Custom keybind
Config.Keybind
Change which key opens the spawner menu.
Usage
Press F6 (or configured key) to open the vehicle menu.
Select a category.
Select a vehicle.
Vehicle spawns at your current location.
Unauthorized vehicles will be deleted if configured.
Customization Tips
Add more categories to organize vehicles by type or roleplay function.
Use ACE permissions to restrict premium or roleplay-specific vehicles.
Adjust
DeleteCurrentVehicleto allow multiple vehicles per player if desired.
Last updated