Other Integrations

Find information on configuring for other resources!

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

ESX Item Support

Firstly, head to the config.lua file and enable ESX in the config. Next, run the following SQL into your ESX database to add the item:

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('rescuecushion', 'Rescue Cushion', 1, 0, 1);

QB-Core Item Support

Firstly, head to the config.lua file and enable QBCore in the config. Next, add the following line of code into your qb-core/shared/items.lua file:

['rescuecushion']   = {
    ['name'] = 'rescuecushion',                             
    ['label'] = 'Rescue Cushion',              
    ['weight'] = 1500,         
    ['type'] = 'item',         
    ['image'] = nil,                   
    ['unique'] = false,         
    ['useable'] = true,     
    ['shouldClose'] = true,      
    ['combinable'] = nil,   
    ['description'] = 'Rescue Cushion'
},

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

vRP Inventory Support

Firstly, head to the config.lua file and enable vRP in the config. Next, add the following line of code into your vrp/cfg/items.lua file:

local cushionOptions = {}
cushionOptions["Use"] = {function(player,choice)
  local user_id = vRP.getUserId(player)
  if user_id ~= nil then
    TriggerEvent("Server:RescueCushionWithItem", player)
  end
end}
 
["rescuecushion"] = {"Rescue Cushion","Rescue Cushion",function(args) return cushionOptions end,0.1}

Quasar Inventory Support

Add the following to Quasar Inventory:

['rescuecushion'] = {
    name = 'rescuecushion',
    label = 'Rescue Cushion',
    weight = 5,
    type = 'item',
    unique = true,
    useable = true,
    description = 'Rescue Cushion',
    client = {
        export = 'rescuecushion.quasarUseCushion',
        removeAfterUse = true,
    },
},

OX Inventory Support

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

['rescuecushion'] = {
        label = 'Rescue Cushion',
        weight = 220,
        server = {
            export = 'rescuecushion.OxUseCushion',
        },
},

Core Inventory Support

Core Inventory support is built into the resource. To start, head to the config.lua file and enable Core Inventory support within the resource.

If you would like to be able to "use" the item, use the export under the Quasar Inventory section.

We've done the rest for you and ensured that our Core Inventory support works for QBCore or ESX servers, so make sure you've also enabled QBCore or ESX within the config.lua file.

Last updated

Was this helpful?