masnyscala
Bronze Elite
Hey, i'm with some problems here..
I'm trying to integrate the mf-inventory to allhousing personal inventorys, but i can't create the command to generate a different inventory sql for each person.
I'm trying to integrate the mf-inventory to allhousing personal inventorys, but i can't create the command to generate a different inventory sql for each person.
================= SERVER SIDE =================I've tried to get the player identifier to generate the house id "local id" but when i run the script nothing happens.
Citizen.CreateThread(function()
if not Config.UsingDiscInventory then
local _source = source
local identifier = GetPlayerIdentifier(_source)
local id = "house"..identifier -- Unique identifier for this inventory.
local inventoryType = "inventory" -- Inventory type. Default is "inventory", other types are "shop" and "recipe".
local inventorySubType = "housing" -- Inventory sub-type, used to modify degrade modifiers by the config table.
local inventoryLabel = "house_storage" -- The inventorys UI label index (which will pull the translation value).
local maxWeight = 250.0 -- Max weight for the inventory.
local maxSlots = 50 -- Max slots for the inventory.
exports["mf-inventory"]:createInventory(id,inventoryType,inventorySubType,inventoryLabel,maxWeight,maxSlots)
end
end)
================= SERVER SIDE =================
================= CLIENT SIDE =================
OpenInventory = function()
local _source = source
local identifier = GetPlayerIdentifier(_source)
local id = "house"..identifier -- Unique identifier for this inventory.
exports["mf-inventory"]openOtherInventory("house"..id)
end
================= CLIENT SIDE =================
Last edited: