Handles player connection logic and creating the utils user accounts required by the commands system.
Functions
get_users
Use the following to retrieve all connected users.
--- Utils object
local users = utils.connections.get_users()
if users then print('Users:', json.encode(users)) end
--- Direct export
exports.boii_utils:get_users()
get_user
Use the following to retrieve a specific user by their server id.
--- Utils object
local user = utils.connections.get_user(source)
if user then print('User:', json.encode(user)) end
--- Direct export
exports.boii_utils:get_user(source)
get_identifier
Use the following to retrieve a players identifier by their source id.
--- Utils object
local license = utils.connections.get_identifier(source, 'license')
if license then print('License:', license)) end
--- Direct export
exports.boii_utils:get_identifier(source, 'license')
get_unique_id
Use the following to retrieve the players unique user id by their license.
This is not the same as the characters/players unique id, this is entirely unique to their user account.
--- Retrieve players license
local license = utils.connections.get_identifier(source, 'license')
--- Utils object
local unique_id = utils.connections.get_unique_id(license)
if unique_id then print('Unique ID:', unique_id)) end
--- Direct export
exports.boii_utils:get_unique_id(license)