Under Door Camera (Snake Cam / Mirror Gun)
Resource folder:
gs_doorcam
Installation Instructions for Under Door Camera (Snake Cam / Mirror Gun)
Follow these steps to install and configure
gs_doorcam on your FiveM server.
-
Download the Resource
- Go to portal.cfx.re
-
Navigate to Assets > Granted Assets >
gs_doorcam - Download the resource
-
Extract the Files
-
Open the downloaded
.zipfile -
Inside, you'll find a folder named
gs_doorcam -
Move the entire
gs_doorcamfolder 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_doorcam
- Open your
-
Restart the Server
- Restart your FiveM server (Important!)
-
Configure the Script (Optional)
- Navigate to
gs_doorcam/config.lua - Edit the configuration options to fit your server's needs
- Navigate to
Add the following items to your ox_inventory/data/items.lua
file:
['doorcamera'] = {
label = 'Door Camera',
weight = 500,
server = {
export = 'gs_doorcam.doorcamera',
},
},
Execute the following SQL query to add the items to the database:
INSERT INTO
`items` (`name`, `label`, `weight`, `rare`, `can_remove`)
VALUES
('doorcamera', 'Door Camera', 1, 0, 1);
Add the following items to your qb-core/shared/items.lua
file:
['doorcamera'] = {
['name'] = 'doorcamera',
['label'] = 'Door Camera',
['weight'] = 500,
['type'] = 'item',
['image'] = 'doorcamera.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
},
What does the doorcam script do?
Players use a handheld under-door camera to peek inside nearby rooms. The script plays a placement animation, applies a camera effect, and limits how far the view can move. Some doors can be blocked from use.
The item works from a command but not from inventory
If the command works but the inventory item does nothing, the item is probably not registered correctly. For ox_inventory, follow the item setup on the official docs and make sure the export name matches your configured item name exactly.
I see "No such export" errors in the server console
This usually means the ox_inventory export does not match the item name in your doorcam config. If your item is named snakecam, the export must be gs_doorcam.snakecam, not a default name like gs_doorcam.doorcamera.
The item does nothing with Quasar Inventory (qs-inventory)
Remove any client or server export block from the inventory item definition. Register the usable item through the doorcam bridge instead, using your inventory's CreateUsableItem API. The item name in config must match the inventory item name.
Does the doorcam need a specific framework?
The script works with common FiveM frameworks through the bridge files. Inventory integration is the most common setup step. Match your inventory item name and export to what is configured in the doorcam config.
Can I rename the inventory item?
Yes, as long as the item name, ox_inventory export, and doorcam config all use the same name. A mismatch between those three is the most common reason the item fails silently.