Skip to content

CanX-Script/cx_SecurityFreeV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cx_camera

⚠️ IMPORTANT

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.


📦 Required Item

Default item name (configurable):

camera

Make sure this item exists in:

  • es_extended items table (ESX)
  • qb-core/shared/items.lua (QBCore)
  • Or your custom inventory system

⚙️ Configuration (config.lua)

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'

🔔 Notification System

This script uses a multi-framework notify system that works on:

  • ESX
  • QBCore
  • Custom / fallback

Server-side usage:

Config.Notify(source, "Camera placed successfully", "success")

Console notify:

Config.Notify(nil, "Camera system loaded")

🧠 Framework Detection

Auto Detect (Recommended)

Config.AutoBaseDetect = true

Supported resources:

  • es_extended
  • qb-core

Manual Select

Config.Framework = 'ESX'

Options:

  • ESX
  • QB
  • CUSTOM

🎒 Inventory Functions

Check Item

HaveItem(source, item, amount)

Example:

if HaveItem(source, 'camera', 1) then
    -- player has item
end

Remove Item

RemoveItem(source, item, amount)

Example:

RemoveItem(source, 'camera', 1)

🆔 Player Identifier

The script automatically fetches a unique identifier:

Priority order:

  1. Steam ID
  2. Rockstar License

Function:

getPlayerIdentifier(source)

🛠 CUSTOM Framework Support

If you are using a custom framework, set:

Config.Framework = 'CUSTOM'

Then implement your logic inside:

  • HaveItem
  • RemoveItem
  • Client notification event

✅ Requirements

  • FiveM Server
  • ESX or QBCore (or custom framework)
  • Inventory system

📌 Notes

  • All inventory functions are server-side
  • Notifications are handled client-side
  • Make sure your framework resource starts before this script

❤️ Credits

CanX Scripts.

Enjoy 🚀


💬 Support & Discord

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published