findHotelStorage
exports["RiP-Hotels"]:findHotelStorage(hotelID, roomID, itemName, extendedData)
This function fetches a certain item in room's storage
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
hotelID | Integer | No | Hotel id |
roomID | Integer | No | Hotel room id |
itemName | String | No | Item name to fetch |
extendedData | Boolean | Yes | Returns storage object if enabled |
Returned Object
Returns false
if item couldn't be fetched or the object on success
Name | Type | Explenation |
---|---|---|
name | String | Item name |
count | Integer | Storage count |
Example
local storageItem = exports["RiP-Hotels"]:findHotelStorage(1, 101, 'bread', true)
if storageItem then
print("item found", json.encode(storageItem))
end