If you have custom code which would otherwise interfere with CheckMeIn, you can connect the two using CheckMeIn's rich API functions.
Warning: Lua knowledge is required to properly use these functions.
You can interact with the CheckMeIn API through Plugins.
You will need to use the premade template to make a plugin:
return{
['Enabled'] = true; -- Is this plugin enabled?
['Function'] = function(API)
-- Your code goes here
end}
Enabled specifies whether the plugin will run or not. You will write your code in the Function value. The function runs at the beginning of the server, and the API can be accessed by using the provided API value, part of the function.
Listed here are all API functions, along with instructions on how to use them.
Description
Opens the CheckMeIn door model specified.
Parameters
door
Type: Door Model
Required
Example
API.Doors.Open:Fire(workspace.CheckMeIn.Doors.Custom.Door)
Description
This event fires when a player is checked in.
Parameters
employee
Type: variable (Player, string or nil)
player
Type: Player (the player who was checked in)
door
Type: Model (room door)
Note
Description
This event fires when a player is checked out.
Parameters
employee
Type: variable (Player, string or nil)
player
Type: Player (the player who was checked in)
door
Type: Model (room door)
Note
Description
Checks in the specified player.
Parameters
player
Type: Player
Required
roomType
Type: String (must be a valid room type, case sensitive)
Required
Description
Checks out the specified player.
Parameters
player
Type: Player
Required
Description
Gets the amount of points of the Player specified.
Parameters
userId
Type: Integer (Player.UserId)
Required
Returns
Points (number) or 0
Description
Rewards the increment amount of points the Player specified.
Increment setting can be found in workspace.CheckMeIn.Configuration.Points
Parameters
userId
Type: Integer (Player.UserId)
Required
amount
Type: Integer
Not required: If amount is not specified, the player will be given Award number of points. This value can be found inside CheckMeIn's configuration folder.
Note
This function only works for players online in the server.
Description
Sets the Points value of the specified player.
WARNING: SetPoints will overwrite any existing data. Please be careful with this command.
Parameters
userId
Type: Integer (Player.UserId)
Required
amount
Type: Integer
Required
Note
This function only works for players online in the server.
Description
Gets the Tutorial State of the Player specified. (whether they've done the tutorial or not)
Parameters
Player
Type: Player
Required
Returns
Boolean Tutorial State. true = complete, false = incomplete
Description
Sends message to your connected Discord server. Only works with an Enterprise license and when the Webhook is enabled.
Parameters
message
Type: String
Required
Note
The Discord webhook is deprecated and does not respect Discord's rate limits. Use it at your own risk.
Copyright © smartTech 2020. Website design by Inovatik