Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Answered MF-Inventory Help

masnyscala

Bronze Elite
Joined
Jan 20, 2022
Messages
6
Solutions
1
Reaction score
5
Points
156
Location
Brazil
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've tried to get the player identifier to generate the house id "local id" but when i run the script nothing happens.
================= SERVER SIDE =================
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:

KingTM

Silver Elite
Joined
Jul 7, 2021
Messages
27
Reaction score
64
Points
221
1646256949198.png
 
Top