-
Notifications
You must be signed in to change notification settings - Fork 3
Client Object
Konijima edited this page Jul 11, 2022
·
1 revision
To access the client object you must require it in your file.
local Client = require 'MyModName/Client';Client.Config -- Contains your config
Client.Utils -- Contains your utility functions
Client.Data -- Contains your GlobalModData tables
Client.Modules -- Contains your modules
Client.Commands -- Contains your server command handlers
Client.TimedActions -- Contains your timed actions
Client.UI -- Contains your UIsClient.Log(str) -- Log a message with your mod name as prefix
Client.SendCommand(command, data) -- Send a command with data to the server
Client.AddEvent(eventName, callback) -- Add a callback to a custom event
Client.RemoveEvent(eventName, callback) -- Remove a callback from a custom event
Client.TriggerEvent(eventName, ...) -- Trigger a custom event with up to 8 parameters