↩ī¸Exports

Client

OpenStorage(key, label?, slotsAmount?)
Example
exports['RxZ_Crates']:OpenStorage(1, 'Personal Storage', 12)

Server

CreateCrate(crate)
Example
local id = exports['RxZ_Crates']:CreateCrate({
    label = 'Ammo Crate',
    prop = "crateammo",
    coords = vector4(3044.5684, -4713.0161, 15.2613, 195.6455),
    slots = 12,
    contents = {
        itemsAmount = math.random(3, 6),
        lootables = { -- Make sure all chances add up to 100
            { item = 'ammo-rifle2', amount = math.random(20, 50), chance = 25 },
            { item = 'ammo-shotgun', amount = math.random(20, 50), chance = 25 },
            { item = 'ammo-9', amount = math.random(20, 50), chance = 25 },
            { item = 'ammo-musket', amount = math.random(20, 50), chance = 25 },
        }
    },
    -- THESE ARE OPTIONAL, THEY HAVE DEFAULTS WHEN U REMOVE THEM
    respawnTime = 1, -- Minutes, set to false to disable respawn
    icon = "fas fa-box-open", -- https://fontawesome.com/icons
    iconColor = "#ff0000",
    hacking = {
        enabled = true,
        time = 1, -- Minutes
        minigame = true,
        item = 'bluekeycard', -- Set to false to disable
    },
})

Last updated