Skip to main content

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

NameTypeOptionalExplenation
stateBooleanNoEnter/leave the room
cbFunctionNoCalback function with a returned boolean
hotelIDIntegerYesCurrent hotel's id (required if player is not inside a room)
roomIDIntegerYesHotel's room id (required if player is not inside a room)
forceEnterBooleanYesTeleports 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)