sh-vehiclespawner: ACE-Gated Vehicle Spawner for FiveM
sh-vehiclespawner is a categorized vehicle spawner menu with ACE permissions, per-category access control, and an optional global vehicle whitelist.
sh-vehiclespawner gives your server staff a clean, WarMenu-based in-game menu for spawning vehicles organized into named categories. Every category is gated behind its own ACE permission node, so you can give VIP players access to civilian cars while keeping bikes or emergency vehicles locked to staff. Version 1.0.4 also ships an optional global whitelist that intercepts the entityCreating server-side event and cancels any unauthorized spawn — including spawns triggered by vMenu or other third-party spawner resources.
sh-vehiclespawner depends on warmenu. Ensure warmenu is started beforesh-vehiclespawner in your server.cfg.
Do not rename the resource folder. The resource name must remain sh-vehiclespawner exactly. Renaming it breaks internal asset references and the global whitelist enforcement logic.
The table below covers the top-level options in config.lua. All values shown are the shipped defaults.
config.lua
Config.Debug = false -- Enable debug prints to server consoleConfig.Keybind = 'F7'Config.MenuTitle = 'Vehicle Spawner'-- Menu appearance (RGBA; set to nil to use WarMenu defaults)Config.MenuBackgroundColor = {r=0, g=0, b=0, a=160}Config.MenuTitleColor = {r=255, g=255, b=255, a=255}Config.MenuTitleBackgroundColor = nil -- Set nil when MenuTitleBackgroundImage is usedConfig.MenuTitleBackgroundImage = {td = 'vehiclespawnmenu', name = 'menubg'}Config.MenuTextColor = {r=255, g=255, b=255, a=255}Config.MenuFocusColor = {r=255, g=255, b=255, a=100}Config.MenuFocusTextColor = {r=0, g=0, b=0, a=255}Config.MenuWidth = nil -- 0.0–1.0, nil = WarMenu default (~0.23)Config.MenuX = 0.77 -- 0.0 = left edge, 1.0 = right edgeConfig.CloseMenuOnVehicleSpawn = true -- Auto-close the menu after spawningConfig.ReplacePreviousVehicle = true -- Delete the last spawned vehicle before spawning a new oneConfig.SpawnInsideVehicle = true -- Warp the player into the driver seat on spawnConfig.SpawnOffset = {x = 0.0, y = 5.0, z = 0.0}Config.SpawnHeadingOffset = 0.0 -- Additional heading offset in degreesConfig.MaxSpawnDistance = 50.0 -- Cancel spawn if player moved more than this distance (0 = disabled)Config.AllowCustomMods = true -- Apply mod definitions from Config.Vehicles on spawnConfig.EnableGlobalWhitelist = true -- Block whitelisted vehicles spawned from ANY resource-- Notification systemConfig.NotifySystem = 'sh-notify' -- 'mythic_notify' | 'ox_lib' | 'sh-notify' | nil (print fallback)Config.NotifyType = 'error'Config.DenyMessage = "No permission to open menu! Check permissions."
Set Config.MaxSpawnDistance to a non-zero value on public or semi-public servers to prevent players from queuing a spawn, moving to a restricted area, and exploiting the teleport.
The menu opens with the F7 key by default. Players can remap this in the GTA V pause menu under Settings → Key Bindings → FiveM.
Enable permission checking and define which ACE node controls each category. Setting a category’s permission to nil makes that category open to anyone who can open the menu.
config.lua
Config.EnablePermissions = trueConfig.OpenPermission = 'vehiclespawner.open'Config.AllCategoriesPermission = 'vehiclespawner.all'Config.CategoryPermissions = { cars = nil, -- No permission required for this category bikes = 'vehiclespawner.bikes', -- Requires this ACE node -- Add entries for any additional categories you define}
Grant nodes to the relevant groups in server.cfg. The example below gives admins full access and VIP players access to the cars category only.
server.cfg
add_ace group.admin vehiclespawner.open allowadd_ace group.admin vehiclespawner.all allowadd_ace group.vip vehiclespawner.open allow# cars has nil permission — no extra node needed for VIP to see cars
vehiclespawner.all overrides all category-level permission checks. Grant it only to trusted staff who should see every category regardless of individual category nodes.
Vehicles are organized in Config.Vehicles as a list of category objects. Each category has a name (used as the permission key in Config.CategoryPermissions) and a list of vehicle entries. The category name must match its key in Config.CategoryPermissions exactly, or permission checks will not work.
When Config.EnableGlobalWhitelist = true, sh-vehiclespawner registers a server-side entityCreating hook. Any time a vehicle entity is about to be created, the hook checks whether the spawning player holds the required ACE permission for that vehicle model. If they do not, the spawn is cancelled — regardless of which resource triggered it.This means a player with vMenu, a custom spawner, or a Lua executor cannot bypass your whitelist simply by using a different menu.
The global whitelist applies to all resources on the server, not just sh-vehiclespawner. Test your other vehicle-related scripts (mechanic shops, job vehicles, etc.) after enabling this feature to ensure those spawns carry the correct principal or are explicitly excluded in config.
sh-vehiclespawner supports four notification backends. Set Config.NotifySystem to one of the following strings, or nil to fall back to a console print.