Before using this script, you MUST add the required item to your server inventory system (ESX / QBCore / Custom). If the item does not exist, the script will NOT work correctly.
Default item name (configurable):
camera
Make sure this item exists in:
es_extendeditems table (ESX)qb-core/shared/items.lua(QBCore)- Or your custom inventory system
Config = {}
Config.Framework = 'ESX' -- ESX | QB | CUSTOM
Config.AutoBaseDetect = false -- true = auto detect framework
Config.ObjectName = 'prop_cctv_cam_01a'
Config.ItemName = 'camera'
Config.MaxDistanceToPlaceCameraOrStand = 10
Config.MoveCamForwardDistance = 0.2
Config.OpenMenuCmd = 'camera'This script uses a multi-framework notify system that works on:
- ESX
- QBCore
- Custom / fallback
Config.Notify(source, "Camera placed successfully", "success")Config.Notify(nil, "Camera system loaded")Config.AutoBaseDetect = trueSupported resources:
es_extendedqb-core
Config.Framework = 'ESX'Options:
ESXQBCUSTOM
HaveItem(source, item, amount)Example:
if HaveItem(source, 'camera', 1) then
-- player has item
endRemoveItem(source, item, amount)Example:
RemoveItem(source, 'camera', 1)The script automatically fetches a unique identifier:
Priority order:
- Steam ID
- Rockstar License
Function:
getPlayerIdentifier(source)If you are using a custom framework, set:
Config.Framework = 'CUSTOM'Then implement your logic inside:
HaveItemRemoveItem- Client notification event
- FiveM Server
- ESX or QBCore (or custom framework)
- Inventory system
- All inventory functions are server-side
- Notifications are handled client-side
- Make sure your framework resource starts before this script
CanX Scripts.
Enjoy 🚀
If you encounter any issues or bugs while using this script, please join our Discord server and open a support ticket.
🔗 Discord Invite: https://discord.gg/fW7eX5bQA6