Skip to main content

findHotelStorage

exports["RiP-Hotels"]:findHotelStorage(hotelID, roomID, itemName, extendedData) 

This function fetches a certain item in room's storage

Arguments

NameTypeOptionalExplenation
hotelIDIntegerNoHotel id
roomIDIntegerNoHotel room id
itemNameStringNoItem name to fetch
extendedDataBooleanYesReturns storage object if enabled

Returned Object

Returns false if item couldn't be fetched or the object on success

NameTypeExplenation
nameStringItem name
countIntegerStorage count

Example

local storageItem = exports["RiP-Hotels"]:findHotelStorage(1, 101, 'bread', true) 

if storageItem then
print("item found", json.encode(storageItem))
end