loadRooms
exports["RiP-Hotels"]:loadRooms(hotelID)
This function returns all registered rooms. If the hotel (business) is owned all unlocked rooms are registered, otherwise all booked rooms
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
hotelID | Integer | No | Hotel id |
Returned Table
Name | Type | Explenation |
---|---|---|
room | Integer | Room id |
status | Integer | 1 = free, 2 = booked |
Object key = room
Example
local registeredRooms = exports["RiP-Hotels"]:loadRooms(1)
print(json.encode(registeredRooms))
print("room 1 is "..(registeredRooms[1] and "registered" or "not registered"))