🧩Exports and Events
You need specific Exports or Events for your Scripts? Here is your way to go!
Open a Stash Inventory
exports["S-Inventory"]:OpenStashInventory(uniqueid, stashid)
-- Uniqueid: A group for the Stash
-- Stashid: A unique ID for the StashReturn/Open Player Inventory
exports["S-Inventory"]:ReturnToInventory()Lock the Inventory for a Person
exports["S-Inventory"]:LockInventory(locked)
-- Locked: Whether the inventory of the person should be lockedLock the Drop of Items (Preventing Duping in FFA's and Gangwars)
exports["S-Inventory"]:LockDropofItem(locked)
-- Locked: Whether the drop function of the inventory should be lockedOpen a Players Inventory
exports["S-Inventory"]:ReturnToPlayerInventory(playerId)
-- PlayerID: The ID of the person which inventory should be openedReturn/Open to a Trunk
exports["S-Inventory"]:ReturnToTrunk(vehicle, glovebox)
-- Vehicle: The Vehicle where the Trunk should be opened
-- glovebox: boolean / true = Opens Glovebox / false = Opens TrunkSearch a Player (Selects the nearest Player)
TriggerEvent("SService:Server:SearchPlayer")
TriggerClientEvent("SService:Server:SearchPlayer", targetsrc)Register a Stash
exports["S-Inventory"]:RegisterStash(stashid, name, maxweight, uniqueid)
-- StashID: The group ID for the stash
-- Name: Stash name
-- Maxweight: Max allowed weight in the stash
-- UniqueID: A unique ID for the StashOpen a Stash Inventory
exports["S-Inventory"]:OpenStashInventory(targetsrc, uniqueid, stashid)
-- TargetSrc: The PlayerID where the stash should be opened
-- UniqueID: The unique ID of a registrated stash
-- StashID: The group stash nameDelete a Stash
exports["S-Inventory"]:DeleteStash(stashid)Check if a Stash has Place for Items
exports["S-Inventory"]:CheckIfStashFree(uniqueid, stashid, itemadd, amountadd)Delete a Item from the Stash
exports["S-Inventory"]:DeleteItem(uniqueid, stashid, itemname)Add an Item into the Stash
exports["S-Inventory"]:InsertNewItemInStash(uniqueid, typeofdata, itemname, itemcount, itemlabel)Check if a item Exists in the Stash
exports["S-Inventory"]:CheckIfItemExists(uniqueid, stashid, itemname)Get data from Stash
exports["S-Inventory"]:GetDataFromStash(uniqueid, stashid)Remove all Items from Stash
exports["S-Inventory"]:DeleteAllItems(uniqueid, stashid)Get item data from a Stash
exports["S-Inventory"]:GetDataFromStashItems(uniqueid, stashid)Get Weight of a Player
exports["S-Inventory"]:GetWeight(items)Get Items of a Player
exports["S-Inventory"]:GetItems(targetsrc)Transfer / Give a Item to a Player
exports["S-Inventory"]:TransferItem(xPlayer, xNewPlayer, item, amount)Use item
exports["S-Inventory"]:UseItem(targetsrc, item, amount)Check if a Player has Enough items
exports["S-Inventory"]:CheckIfPlayerHasEnoughItems(targetsrc, item, amount)Get Weight of item
exports["S-Inventory"]:GetWeightOfItem(itemname, amount)Search a Player by ID
TriggerEvent("SService:Server:SearchPlayer", targetsrc)
TriggerServerEvent("SService:Server:SearchPlayer", targetsrc)    Add an item into a Stash with checks for double
TriggerEvent("SService:Server:InsertItemsIntoStash", data, uniqueid, stashinv)
TriggerServerEvent("SService:Server:InsertItemsIntoStash", targetsrc, data, uniqueid, stashinv)
-- data has to be a table
-- data = {name: "bread", anzahl: 1}Last updated
