RegisterStash
Creates a new Stash inventory.
- data:
table
->StashInventoryClassCreate
- uniqueID
string
- uniqueID
- xSize
number
- xSize
- ySize
number
- ySize
- maxWeight
number
- maxWeight
- inventoryName
string
- inventoryName
- coordX
number
- coordX
- coordY
number
- coordY
- coordZ
number
- coordZ
- isPublic?
boolean
- isPublic?
- ownerLicense?
string
- ownerLicense?
- groups?
{ [string]: number }
- groups?
- isPermanent?
boolean
If set totrue
then it will not save the items in the sql, and this can be used as loot system.
- isPermanent?
If the isPublic
variable is set to true
then it will ignore who is the ownerLicense
, and the groups
.
exports["grid_inventory"]:RegisterStash(data)
Example
exports["grid_inventory"]:RegisterStash({
uniqueID = "stash-1",
maxWeight = 10000,
inventoryName = "House Safe",
xSize = 7,
ySize = 7,
groups = {
["police"] = 2,
["ambulance"] = 1,
["ballas"] = 3
},
coordX = 2942.91,
coordY = 5308.7,
coordZ = 101.5,
})