enterRoom
exports["RiP-Hotels"]:enterRoom(state, cb, hotelID, roomID, forceEnter)
This function sets the client player enter status to a room.
If room-type is dimension
the player will be teleported, otherwise the doorlock will be used
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
state | Boolean | No | Enter/leave the room |
cb | Function | No | Calback function with a returned boolean |
hotelID | Integer | Yes | Current hotel's id (required if player is not inside a room) |
roomID | Integer | Yes | Hotel's room id (required if player is not inside a room) |
forceEnter | Boolean | Yes | Teleports player instead of doorlock with type mlo|ipl |
Example
exports["RiP-Hotels"]:enterRoom(true, function(callback)
print("player entered room "..(callback and "successful" or "not"))
end, 1, 101, false)