Item Support

Please note that your resource folder should be named 'smartclamp' for our exports to work properly

vRP Item Support

Add the following line of code into your vrp/cfg/items.lua file:

local trackerReload = {}
local trackerItem = {}
 
useChainClamp["Load"] = {function(player,choice)
  local user_id = vRP.getUserId(player)
  if user_id ~= nil then
     TriggerEvent("Server:ClampWithItem", player, "locker_chain")
  end
end}
 
useWheelClamp["Use"] = {function(player,choice)
  local user_id = vRP.getUserId(player)
  if user_id ~= nil then
     TriggerEvent("Server:ClampWithItem", player, "locker_wheel")
  end
end}

useLockPick["Use"] = {function(player,choice)
  local user_id = vRP.getUserId(player)
  if user_id ~= nil then
 TriggerEvent("Server:LockPickInventory", player)
  end
end}
 
["locker_chain"] = {"Chain Clamp","Chain Clamp",function(args) return useClampChain end,0.1}
["locker_wheel"] = {"Wheel CLamp","Wheel Clamp",function(args) return useWheelClamp end,0.1}
["clamp_lockpick"] = {"Clamp Lockpick","Clamp Lockpick",function(args) return useLockPick end,0.1}

ESX Item Support

Run the following SQL into your ESX database to add the item:

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('locker_chain', 'Chain Clamp', 1, 0, 1),
('locker_wheel', 'Wheel Clamp', 1, 0, 1);
('clamp_lockpick', 'Clamp Lockpick', 1, 0, 1);

QBCore Item Support

Add the following lines of code into your qb-core/shared/items.lua file:

locker_chain   = {
    name = 'locker_chain',                             
    label = 'Chain Clamp',              
    weight = 1500,         
    type = 'item',         
    image = nil,                   
    unique = false,         
    useable = true,     
    shouldClose = true,      
    combinable = nil,   
    description = 'Chain Clamp'
}, 
locker_wheel   = {
    name = 'locker_wheel',                             
    label = 'Wheel Clamp',              
    weight = 1500,         
    type = 'item',         
    image = nil,                   
    unique = false,         
    useable = true,     
    shouldClose = true,      
    combinable = nil,   
    description = 'Wheel Clamp'
},
clamp_lockpick   = {
    name = 'clamp_lockpick',                             
    label = 'Clamp Lockpick',              
    weight = 1500,         
    type = 'item',         
    image = nil,                   
    unique = false,         
    useable = true,     
    shouldClose = true,      
    combinable = nil,   
    description = 'Clamp Lockpick'
}, 

Feel free to adjust the various item settings depending on your server requirements!

Ox_Inventory

Please note that your resource folder should be named 'smartclamp' for our exports to work properly

The following code needs to be added into ox_inventory/data/items.lua within your OX_Inventory resource:

['locker_chain'] = {
        label = 'Chain Clamp',
        weight = 220,
        server = {
            export = 'smartclamp.useClamp',
        },
},
['locker_wheel'] = {
        label = 'Wheel Clamp',
        weight = 220,
        server = {
            export = 'smartclamp.useClamp',
        },
},
['clamp_lockpick] = {
        label = 'Clamp Lockpick',
        weight = 220,
        server = {
            export = 'smartclamp.useClampLockpick',
        },
},

Core Inventory

Register the items within your inventory as necessary, with the exports seen below in the Quasar Inventory section.

Quasar Inventory

Add the following items to Quasar Inventory:

['locker_chain'] = {
    name = 'Chain Clamp',
    label = 'Chain Clamp',
    weight = 5,
    type = 'item',
    unique = true,
    useable = true,
    description = 'Chain Clamp',
    client = {
        export = 'smartclamp.inventoryInstallChainClamp',
        removeAfterUse = true,
    },
},
['locker_wheel'] = {
    name = 'Wheel Clamp',
    label = 'Wheel Clamp',
    weight = 5,
    type = 'item',
    unique = true,
    useable = true,
    description = 'Wheel Clamp',
    client = {
        export = 'smartclamp.inventoryInstallWheelClamp',
        removeAfterUse = true,
    },
},
['clamp_lockpick'] = {
    name = 'Clamp Lock Pick',
    label = 'Clamp Lock Pick',
    weight = 5,
    type = 'item',
    unique = true,
    useable = true,
    description = 'Clamp Lock Pick',
    client = {
        export = 'smartclamp.inventoryUseLockPick',
        removeAfterUse = true,
    },
}

Last updated

Was this helpful?