Advanced Police Shield
Resource folder:
gs_policeshield
Installation Instructions for Advanced Police Shield
Follow these steps to install and configure
gs_policeshield on your FiveM server.
-
Download the Resource
- Go to portal.cfx.re
-
Navigate to Assets > Granted Assets >
gs_policeshield - Download the resource
-
Extract the Files
-
Open the downloaded
.zipfile -
Inside, you'll find a folder named
gs_policeshield -
Move the entire
gs_policeshieldfolder into your desired server resources folder (e.g.,/resources/[scripts])
-
Open the downloaded
-
Add to Server Configuration
- Open your
server.cfg -
Add the following line:
ensure gs_policeshield
- Open your
-
Restart the Server
- Restart your FiveM server (Important!)
-
Configure the Script (Optional)
- Navigate to
gs_policeshield/config.lua - Edit the configuration options to fit your server's needs
- Navigate to
Additional documentation
ox-inventory
If you want to add the items to ox_inventory. You can use the following configuration for your items:
['ballistic_shield'] = {
label = 'Ballistic Shield',
weight = 250,
consume = 0,
allowArmed = true,
server = {
export = 'gs_policeshield.ballistic_shield',
}
},
['riot_shield'] = {
label = 'Riot Shield',
weight = 250,
consume = 0,
allowArmed = true,
server = {
export = 'gs_policeshield.riot_shield',
}
},
qb-core
If you want to add the items to qb-core. You can use the following configuration for your shared/items.lua:
ballistic_shield = { name = 'ballistic_shield', label = 'Ballistic Shield', weight = 1000, type = 'item', image = 'ballistic_shield.png', unique = true, useable = true, shouldClose = true, description = 'A ballistic shield' },
riot_shield = { name = 'riot_shield', label = 'Riot Shield', weight = 1000, type = 'item', image = 'riot_shield.png', unique = true, useable = true, shouldClose = true, description = 'A riot shield' },
Item image
An image for the ballistic_shield is provided with the files, we do not have a seperate image for the riot_shield.
What does Police Shield require to run?
ox_lib is required and must start before gs_policeshield. ox_target or qb-target is required for dropping and picking up shields from the ground. ESX, QBCore, Qbox, and standalone are supported with bridge adjustments.
Does it work with ox_inventory?
Yes. It was developed and tested with ox_inventory. Follow the readme for item and export setup.
Can I change shield models and textures on the encrypted version?
Yes. Props, models, and textures are editable even in the encrypted version. The open-source version gives full code access on top of that.
The shield item is in inventory but will not equip
Check these common causes:
- Item
server.exportmust match config item names (for examplegs_policeshield.ballisticshield, not justballistic_shield). - Set
enableItems = truein config. - You must have an allowed weapon equipped before using the item.
- For ox_inventory, set
allowArmed = trueif you use a weapon and item together.
Why does it say I cannot use this weapon?
The shield requires a configured sidearm equipped. It cannot be used without a weapon because of animation dependencies. Also verify weapon hashes in config use backticks, not single quotes.
My addon pistol clips through the shield when aiming
Add an entry in weaponanimations.meta for each addon weapon. Copy an existing pistol entry and change the weapon name to match your addon.
How do I disable job restrictions?
Set jobs = nil on each shield entry in Config.shields. An empty table {} does not disable the check. You can also simplify Functions.CanUseShield in the server bridge to always return true.
I am on standalone and `/shield` does nothing
Install the prebuilt ox_lib release (not the source zip) and start it before gs_policeshield. Disable item and job checks in config. Hold a configured weapon (for example WEAPON_PISTOL) when using the command. Drop and place on the ground requires a target system and is disabled without one.
Can NPCs use the shield?
No. The shield is for players only.
Other players cannot see my shield
This is often network or streaming related (packet loss, prop streaming). Test without emote scripts. The stream folder contains modified props with adjusted collision and view range. Try testing with stream files temporarily removed to isolate the issue.
My custom shield model is invisible
Verify the prop spawns correctly on its own without the script. Invisible shields usually mean an invalid or broken model. Update modelHash in config once the prop works standalone.
Can I use custom department textures?
Yes. Overwrite the GTA texture files for the ballistic shield (prop_cs_ld_police2) or riot shield (prop_riot_shield+hidr.ytd) in the game's prop texture folder.
I get "Unable to load UI" from ox_lib
Download the prebuilt ox_lib release, not the source build. Ensure ox_lib starts before gs_policeshield. Update ox_lib and your target resource to recent versions.
The command works but the inventory item does not
Test step by step: disable item and job checks, confirm a weapon is equipped, and verify export names match config item names exactly.
I use tgiann-inventory and get "No such export ballistic_shield"
tgiann-inventory is not supported out of the box. Use the client export instead: exports.gs_policeshield:ActivateShield('ballistic') or 'riot'. You can also adapt Functions.RegisterItem in the server bridge.
Can I trigger the shield from a vehicle trunk or vMenu?
Yes. Disable the item or command in config and use exports: ActivateShield, StopShield, DropShield, PlaceShield, and PickupShield. Pass 'ballistic' or 'riot' to ActivateShield.
My weapon fires twice when aiming with the shield
This is a known GTA/FiveM limitation with weapon animation overrides. It cannot be fixed inside the shield script.
Are there separate inventory images for ballistic and riot shields?
No. One shared shield image is provided for both types.