Skip to main content

frakStorage

local returnedValue = exports["RiP-Fraktion"]:frakStorage(fraktion, action, data) 

Edit and save the fraction storage

Arguments

NameTypeOptionalExplenation
fraktionStringNoFraction name
actionStringNo'add' or 'remove'
dataObjectNoData object

Data Arguments

NameTypeOptionalExplenation
nameStringNoItem name
typeStringNo'item' or 'weapon'
amountIntegerNoAmount of items
labelStringYesItem label

Returned Value

If the function was successful it will return the new fraction storage table. Otherwise it will return false with an error notify or print.

Example

local storage = exports["RiP-Fraktion"]:frakStorage('rip', 'add', { name='water', type='item', amount=1 }) 
if storage then
print("item successfully added")
end