API Functions
Listed here are all API functions, along with instructions on how to use them.
Example code currently not implemented.
Service
Tries checking Target into a room. Ignores game pass requirements of the room type.
Arguments:
Player Target
String, Room Type Type
Bool, optional overrideGamepass
when set to true, game pass requirements of the room type are ignored.
Room Number, optional Num
Returns:
Table
of format {true, Instance Room}
or {false, string errorCode}
Room is a folder containing all information about the given room. See Database section for more information.
require(API.Functions.Service):ForceCheckOut(Target)
Tries checking out Player Target
Arguments:
Player Target
Returns:
Bool Success
Doors
require(API.Services.Doors):OpenPlyr(Player, Door)
Sends a request to open a door on behalf of Player Player
. It will close after the Timer for the specified door has elapsed.
Arguments:
Player Player
Instance Door
model found in CheckMeIn.Doors.Rooms or CheckMeIn.Doors.Custom
Note that the door will only open if Player
has permission to open it.
require(API.Services.Doors):Open(Door)
Opens the specified door. It will close after the Timer for the specified door has elapsed.
Arguments:
Instance Door
model found in CheckMeIn.Doors.Rooms or CheckMeIn.Doors.Custom
require(API.Services.Doors):ToggleDnD(Room, newValue)
Sets the Do not Disturb value for room Room
to newValue
.
Arguments:
Instance Room
Bool newValue
require(API.Services.Doors):TogglePM(Room, newValue)
Sets the Private Mode value for room Room
to newValue
.
Arguments:
Instance Room
Bool newValue
Room Database
In this section, Instance Room
is referring to the database entry of a room. To learn more about this, refer to the Database page.
require(API.Services.Database):GetPlayerRoom(Player)
Finds the room of Player Player
.
Arguments:
Player Player
Returns:
Instance Room
or false
if Player is not checked in
Room is a folder containing all information about the given room. See Database section for more information.
require(API.Services.Database):IsRoommate(Player, Room)
Checks whether Player Player
is a roommate of Instance Room
.
Arguments:
Player Player
Instance Room
Room is a folder containing all information about the given room. See Database section for more information.
Returns:
Bool isRoommate
require(API.Services.Database):GetAvailableRooms()
Gets a list of available rooms
Returns:
Table containing a Room
instance for every available room
Room is a folder containing all information about the given room. See Database section for more information.
require(API.Services.Database):GetDatabaseEntry(roomDoor)
Finds the database entry (Room
) from a room door model
Arguments:
Instance roomDoor
this has to be a room door model, located in the Rooms folder.
Returns:
Instance Room
or false
if the specified room door is not valid.
Room is a folder containing all information about the given room. See Database section for more information.
Points System
require(API.Services.Points):AwardPoints(Player, dontRunFunction)
Awards Reward
points to Player Player
. Reward
can be found in the Enterprise options ModuleScript. If dontRunFunction
is true
, the Function
in the Enterprise options ModuleScript will not be fired afterwards.
Arguments:
Player Player
Bool dontRunFunction
optional
Gets the current point value of Player Player
.
require(API.Services.Points):SetPoints(Player, Amount, dontRunFunction)
Sets Player Player
's points value to Amount
. If dontRunFunction
is true
, the Function
in the Enterprise options ModuleScript will not be fired afterwards.
Arguments:
Player Player
Bool dontRunFunction
optional
Tutorial State
require(API.Services.Points):SetTutorialState(Player, newValue)
Sets the tutorial state of Player Player
to newValue.
Arguments:
Player Player
Bool newValue
require(API.Services.Points):GetTutorialState(Player)
Returns the tutorial state of Player Player
.
Arguments:
Player Player
Returns:
Bool completedTutorial
GroupService Cache
CheckMeIn 4.0 uses http requests to get up-to-date player ranks. These results are then cached by the system to limit the amount of http requests used.
Cache entries for individual players are removed automatically when they leave the game.
require(API.Services.Cache):ClearCache()
Removes cached calls that returned false
, meaning players who were not authorized will be checked again after this function runs.
ClearCache() is automatically called by the system every 5 minutes.
require(API.Services.Cache):DeleteCache()
Removes all cached calls, meaning that all players will be checked again, even if they were authorized before.
require(API.Services.Cache):IsReceptionist(Player)
Checks whether Player Player
has receptionist permissions, as set in your Options
ModuleScript.
Arguments:
Player Player
Returns:
Bool isReceptionist
require(API.Services.Cache):IsStaff(Player)
Checks whether Player Player
has staff permissions, as set in your Options
ModuleScript.
Arguments:
Player Player
Returns:
Bool isStaff
require(API.Services.Cache):IsAuthorized(Player, customPermissions)
Checks whether Player Player
is authorized based on the supplied customPermissions
. This function can be used to get up-to-date ranks from players. The result will automatically be cached by CheckMeIn.
Arguments:
Player Player
DictionarycustomPermissions
see custom permissions tab
Returns:
Bool isAuthorized
Last updated