Installation Guide

Follow these steps for flawless instalation:

  1. Download the script from your keymaster.

  2. Place the script into your server resource folder: FXServer\server-data\resources\fivecode_camping

  3. Write the script into your server.cfg: ensure fivecode_camping

  4. Setup your inventory:

ox

Add the following into: ox_inventory\data\items.lua

['campfire'] = {
    label = 'Campfire',
    weight = 1,
    stack = true,
    close = true,
    description = 'Campfire in witch you can cook.'
},

['campingchair'] = {
    label = 'Chair',
    weight = 1,
    stack = true,
    close = true,
    description = 'Camping chair in which you can sit.'
},

['campingtent'] = {
    label = 'Tent',
    weight = 1,
    stack = true,
    close = true,
    description = 'Camping tent in which you can store items or hide.'
},

['campingsleepingbag'] = {
    label = 'Sleeping Bag',
    weight = 1,
    stack = true,
    close = true,
    description = 'Camping sleeping bag in which you can sleep.'
},

['campingshower'] = {
    label = 'Shower',
    weight = 1,
    stack = true,
    close = true,
    description = 'Camping shower in which you can clean yourself.'
},

['campingcooler'] = {
    label = 'Cooler',
    weight = 1,
    stack = true,
    close = true,
    description = 'Camping cooler in which you can keep your drinks cold.'
},

['campingbeerbarrel'] = {
    label = 'Beer Barrel',
    weight = 1,
    stack = true,
    close = true,
    description = 'Camping beer barrel from which you can fill your cup.'
},

-- Optional Items (If you decide to not use them change them in config.lua)

['rawmeat'] = {
    label = 'Raw Meat',
    weight = 1,
    stack = true,
    close = true,
    description = 'Raw meat that you can cook on an campfire.'
},

['cookedmeat'] = {
    label = 'Cooked Meat',
    weight = 1,
    stack = true,
    close = true,
    description = 'Cooked meat.'
},

['smores'] = {
    label = 'Smores',
    weight = 1,
    stack = true,
    close = true,
    description = 'Smores.'
},

['cookedsmores'] = {
    label = 'Cooked Smores',
    weight = 1,
    stack = true,
    close = true,
    description = 'Cooked smores.'
},

['emptybeercup'] = {
    label = 'Empty Cup',
    weight = 1,
    stack = true,
    close = true,
    description = 'Empty beer cup.'
},

['fullbeercup'] = {
    label = 'Full Cup',
    weight = 1,
    stack = true,
    close = true,
    description = 'Full beer cup.'
},

['matches'] = {
    label = 'Matches',
    weight = 1,
    stack = true,
    close = true,
    description = 'Matches for lighting up an campfire.'
},

['lighter'] = {
    label = 'Lighter',
    weight = 1,
    stack = true,
    close = true,
    description = 'Lighter for lighting up an campfire.'
},

and this into: ox_inventory\modules\items\client.lua

Item('campfire', function(data, slot)
    TriggerEvent('fivecode_camping:place', data.name)
end)

Item('campingchair', function(data, slot)
    TriggerEvent('fivecode_camping:place', data.name)
end)

Item('campingtent', function(data, slot)
    TriggerEvent('fivecode_camping:place', data.name)
end)

Item('campingsleepingbag', function(data, slot)
    TriggerEvent('fivecode_camping:place', data.name)
end)

Item('campingshower', function(data, slot)
    TriggerEvent('fivecode_camping:place', data.name)
end)

Item('campingcooler', function(data, slot)
    TriggerEvent('fivecode_camping:place', data.name)
end)

Item('campingbeerbarrel', function(data, slot)
    TriggerEvent('fivecode_camping:place', data.name)
end)
qb

Add the following into: qb-core\shared\items.lua

campfire = {
    name = 'campfire',
    label = 'Campfire',
    weight = 1,
    type = 'item',
    image = 'campfire.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Campfire in witch you can cook.'
},

campingchair = {
    name = 'campingchair',
    label = 'Chair',
    weight = 1,
    type = 'item',
    image = 'campingchair.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping chair in which you can sit.'
},

campingtent = {
    name = 'campingtent',
    label = 'Tent',
    weight = 1,
    type = 'item',
    image = 'campingtent.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping tent in which you can store items or hide.'
},

campingsleepingbag = {
    name = 'campingsleepingbag',
    label = 'Sleeping Bag',
    weight = 1,
    type = 'item',
    image = 'campingsleepingbag.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping sleeping bag in which you can sleep.'
},

campingshower = {
    name = 'campingshower',
    label = 'Shower',
    weight = 1,
    type = 'item',
    image = 'campingshower.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping shower in which you can clean yourself.'
},

campingcooler = {
    name = 'campingcooler',
    label = 'Cooler',
    weight = 1,
    type = 'item',
    image = 'campingcooler.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping cooler in which you can keep your drinks cold.'
},

campingbeerbarrel = {
    name = 'campingbeerbarrel',
    label = 'Beer Barrel',
    weight = 1,
    type = 'item',
    image = 'campingbeerbarrel.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping beer barrel from which you can fill your cup.'
},

-- Optional Items (If you decide to not use them change them in config.lua)

rawmeat = {
    name = 'rawmeat',
    label = 'Raw Meat',
    weight = 1,
    type = 'item',
    image = 'rawmeat.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Raw meat that you can cook on an campfire.'
},

cookedmeat = {
    name = 'cookedmeat',
    label = 'Cooked Meat',
    weight = 1,
    type = 'item',
    image = 'cookedmeat.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Cooked meat.'
},

smores = {
    name = 'smores',
    label = 'Smores',
    weight = 1,
    type = 'item',
    image = 'smores.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Smores.'
},

cookedsmores = {
    name = 'cookedsmores',
    label = 'Cooked Smores',
    weight = 1,
    type = 'item',
    image = 'cookedsmores.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Cooked smores.'
},

emptybeercup = {
    name = 'emptybeercup',
    label = 'Empty Cup',
    weight = 1,
    type = 'item',
    image = 'emptybeercup.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Empty Beer Cup.'
},

fullbeercup = {
    name = 'fullbeercup',
    label = 'Full Cup',
    weight = 1,
    type = 'item',
    image = 'fullbeercup.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Full Beer Cup.'
},

matches = {
    name = 'matches',
    label = 'Matches',
    weight = 1,
    type = 'item',
    image = 'matches.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Matches for lighting up an campfire.'
},

lighter = {
    name = 'lighter',
    label = 'Lighter',
    weight = 1,
    type = 'item',
    image = 'lighter.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Lighter for lighting up an campfire.'
},
qs

Add the following into: qs-inventory\shared\items.lua

['campfire'] = {
    ['name'] = 'campfire',
    ['label'] = 'Campfire',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'campfire.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Campfire in which you can cook.'
},

['campingchair'] = {
    ['name'] = 'campingchair',
    ['label'] = 'Chair',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'campingchair.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Camping chair in which you can sit.'
},

['campingtent'] = {
    ['name'] = 'campingtent',
    ['label'] = 'Tent',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'campingtent.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Camping tent in which you can store items or hide.'
},

['campingsleepingbag'] = {
    ['name'] = 'campingsleepingbag',
    ['label'] = 'Sleeping Bag',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'campingsleepingbag.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Camping sleeping bag in which you can sleep.'
},

['campingshower'] = {
    ['name'] = 'campingshower',
    ['label'] = 'Shower',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'campingshower.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Camping shower in which you can clean yourself.'
},

['campingcooler'] = {
    ['name'] = 'campingcooler',
    ['label'] = 'Cooler',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'campingcooler.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Camping cooler in which you can keep your drinks cold.'
},

['campingbeerbarrel'] = {
    ['name'] = 'campingbeerbarrel',
    ['label'] = 'Beer Barrel',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'campingbeerbarrel.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Camping beer barrel from which you can fill your cup.'
},

-- Optional Items (If you decide to not use them change them in config.lua)

['rawmeat'] = {
    ['name'] = 'rawmeat',
    ['label'] = 'Raw Meat',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'rawmeat.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Raw meat that you can cook on a campfire.'
},

['cookedmeat'] = {
    ['name'] = 'cookedmeat',
    ['label'] = 'Cooked Meat',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'cookedmeat.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Cooked meat.'
},

['smores'] = {
    ['name'] = 'smores',
    ['label'] = 'Smores',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'smores.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Smores.'
},

['cookedsmores'] = {
    ['name'] = 'cookedsmores',
    ['label'] = 'Cooked Smores',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'cookedsmores.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Cooked smores.'
},

['emptybeercup'] = {
    ['name'] = 'emptybeercup',
    ['label'] = 'Empty Cup',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'emptybeercup.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Empty Beer Cup.'
},

['fullbeercup'] = {
    ['name'] = 'fullbeercup',
    ['label'] = 'Full Cup',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'fullbeercup.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Full Beer Cup.'
},

['matches'] = {
    ['name'] = 'matches',
    ['label'] = 'Matches',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'matches.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Matches for lighting up a campfire.'
},

['lighter'] = {
    ['name'] = 'lighter',
    ['label'] = 'Lighter',
    ['weight'] = 1,
    ['type'] = 'item',
    ['image'] = 'lighter.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Lighter for lighting up a campfire.'
}
ps

Add the following into: qb-core\shared\items.lua

campfire = {
    name = 'campfire',
    label = 'Campfire',
    weight = 1,
    type = 'item',
    image = 'campfire.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Campfire in witch you can cook.'
},

campingchair = {
    name = 'campingchair',
    label = 'Chair',
    weight = 1,
    type = 'item',
    image = 'campingchair.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping chair in which you can sit.'
},

campingtent = {
    name = 'campingtent',
    label = 'Tent',
    weight = 1,
    type = 'item',
    image = 'campingtent.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping tent in which you can store items or hide.'
},

campingsleepingbag = {
    name = 'campingsleepingbag',
    label = 'Sleeping Bag',
    weight = 1,
    type = 'item',
    image = 'campingsleepingbag.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping sleeping bag in which you can sleep.'
},

campingshower = {
    name = 'campingshower',
    label = 'Shower',
    weight = 1,
    type = 'item',
    image = 'campingshower.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping shower in which you can clean yourself.'
},

campingcooler = {
    name = 'campingcooler',
    label = 'Cooler',
    weight = 1,
    type = 'item',
    image = 'campingcooler.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping cooler in which you can keep your drinks cold.'
},

campingbeerbarrel = {
    name = 'campingbeerbarrel',
    label = 'Beer Barrel',
    weight = 1,
    type = 'item',
    image = 'campingbeerbarrel.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping beer barrel from which you can fill your cup.'
},

-- Optional Items (If you decide to not use them change them in config.lua)

rawmeat = {
    name = 'rawmeat',
    label = 'Raw Meat',
    weight = 1,
    type = 'item',
    image = 'rawmeat.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Raw meat that you can cook on an campfire.'
},

cookedmeat = {
    name = 'cookedmeat',
    label = 'Cooked Meat',
    weight = 1,
    type = 'item',
    image = 'cookedmeat.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Cooked meat.'
},

smores = {
    name = 'smores',
    label = 'Smores',
    weight = 1,
    type = 'item',
    image = 'smores.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Smores.'
},

cookedsmores = {
    name = 'cookedsmores',
    label = 'Cooked Smores',
    weight = 1,
    type = 'item',
    image = 'cookedsmores.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Cooked smores.'
},

emptybeercup = {
    name = 'emptybeercup',
    label = 'Empty Cup',
    weight = 1,
    type = 'item',
    image = 'emptybeercup.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Empty Beer Cup.'
},

fullbeercup = {
    name = 'fullbeercup',
    label = 'Full Cup',
    weight = 1,
    type = 'item',
    image = 'fullbeercup.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Full Beer Cup.'
},

matches = {
    name = 'matches',
    label = 'Matches',
    weight = 1,
    type = 'item',
    image = 'matches.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Matches for lighting up an campfire.'
},

lighter = {
    name = 'lighter',
    label = 'Lighter',
    weight = 1,
    type = 'item',
    image = 'lighter.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Lighter for lighting up an campfire.'
},
codem

Add the following into: codem-inventory\config\itemlist.lua

campfire = {
    name = 'campfire',
    label = 'Campfire',
    weight = 1,
    type = 'item',
    image = 'campfire.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Campfire in witch you can cook.'
},

campingchair = {
    name = 'campingchair',
    label = 'Chair',
    weight = 1,
    type = 'item',
    image = 'campingchair.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping chair in which you can sit.'
},

campingtent = {
    name = 'campingtent',
    label = 'Tent',
    weight = 1,
    type = 'item',
    image = 'campingtent.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping tent in which you can store items or hide.'
},

campingsleepingbag = {
    name = 'campingsleepingbag',
    label = 'Sleeping Bag',
    weight = 1,
    type = 'item',
    image = 'campingsleepingbag.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping sleeping bag in which you can sleep.'
},

campingshower = {
    name = 'campingshower',
    label = 'Shower',
    weight = 1,
    type = 'item',
    image = 'campingshower.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping shower in which you can clean yourself.'
},

campingcooler = {
    name = 'campingcooler',
    label = 'Cooler',
    weight = 1,
    type = 'item',
    image = 'campingcooler.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping cooler in which you can keep your drinks cold.'
},

campingbeerbarrel = {
    name = 'campingbeerbarrel',
    label = 'Beer Barrel',
    weight = 1,
    type = 'item',
    image = 'campingbeerbarrel.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Camping beer barrel from which you can fill your cup.'
},

-- Optional Items (If you decide to not use them change them in config.lua)

rawmeat = {
    name = 'rawmeat',
    label = 'Raw Meat',
    weight = 1,
    type = 'item',
    image = 'rawmeat.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Raw meat that you can cook on an campfire.'
},

cookedmeat = {
    name = 'cookedmeat',
    label = 'Cooked Meat',
    weight = 1,
    type = 'item',
    image = 'cookedmeat.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Cooked meat.'
},

smores = {
    name = 'smores',
    label = 'Smores',
    weight = 1,
    type = 'item',
    image = 'smores.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Smores.'
},

cookedsmores = {
    name = 'cookedsmores',
    label = 'Cooked Smores',
    weight = 1,
    type = 'item',
    image = 'cookedsmores.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Cooked smores.'
},

emptybeercup = {
    name = 'emptybeercup',
    label = 'Empty Cup',
    weight = 1,
    type = 'item',
    image = 'emptybeercup.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Empty Beer Cup.'
},

fullbeercup = {
    name = 'fullbeercup',
    label = 'Full Cup',
    weight = 1,
    type = 'item',
    image = 'fullbeercup.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Full Beer Cup.'
},

matches = {
    name = 'matches',
    label = 'Matches',
    weight = 1,
    type = 'item',
    image = 'matches.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Matches for lighting up an campfire.'
},

lighter = {
    name = 'lighter',
    label = 'Lighter',
    weight = 1,
    type = 'item',
    image = 'lighter.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Lighter for lighting up an campfire.'
},
core

Add the following into your database:

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`, `desc`) VALUES
    ('campfire', 'Campfire', 1, 0, 1, NULL),
    ('campingchair', 'Chair', 1, 0, 1, NULL),
    ('campingtent', 'Tent', 1, 0, 1, NULL),
    ('campingsleepingbag', 'Sleeping Bag', 1, 0, 1, NULL),
    ('campingshower', 'Shower', 1, 0, 1, NULL),
    ('campingcooler', 'Cooler', 1, 0, 1, NULL),
    ('campingbeerbarrel', 'Beer Barrel', 1, 0, 1, NULL);

-- Optional Items (If you decide to not use them change them in config.lua)

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`, `desc`) VALUES
    ('rawmeat', 'Raw Meat', 1, 0, 1, NULL),
    ('cookedmeat', 'Cooked Meat', 1, 0, 1, NULL),
    ('smores', 'Smores', 1, 0, 1, NULL),
    ('cookedsmores', 'Cooked Smores', 1, 0, 1, NULL),
    ('emptybeercup', 'Empty Cup', 1, 0, 1, NULL),
    ('fullbeercup', 'Full Cup', 1, 0, 1, NULL),
    ('matches', 'Matches', 1, 0, 1, NULL),
    ('lighter', 'Lighter', 1, 0, 1, NULL);
  1. Configure everything to your liking in Config.lua.

  2. Add the following into your database:

    CREATE TABLE IF NOT EXISTS camping_objects (
        id INT AUTO_INCREMENT PRIMARY KEY,
        item VARCHAR(255) NOT NULL,
        created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        `x` DOUBLE NOT NULL,
        `y` DOUBLE NOT NULL,
        `z` DOUBLE NOT NULL,
        `h` DOUBLE NOT NULL
    )
  3. Restart your inventory script and start fivecode_camping, or restart your server.

  4. Enjoy the script!

  5. [Optional] If you want to have item image in your inventory, place the image bellow here: - ox_inventory\web\images - qb-inventory\html\images - qs-inventory\html\images - ps-inventory\html\images - codem-inventory\html\itemimages - core_inventory\html\img

If you need help with anything else, do not hesitate and open a support ticket in our discord.

Last updated