Defines

Holds some defines used on both client and server.

Summary
DefinesHolds some defines used on both client and server.
Umsg HelpersThese are ids for the ULib umsg functions, so the client knows what they’re getting.
HooksThese are the hooks that ULib has created that other modders are free to make use of.
Hooks
UCLAuthedCalled on both server and client when a player has been (re)authenticated by UCL.
UCLChangedCalled on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes.
ULibReplicatedCvarChangedCalled on both client and server when a replicated cvar changes or is created.
ULibLocalPlayerReadyCalled on both client and server when a player entity is created.
ULibCommandCalledCalled on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow.
ULibPlayerTargetCalled whenever one player is about to target another player.
ULibPlayerTargetsCalled whenever one player is about to target another set of players.
ULibPostTranslatedCommandServer hook.
ULibPlayerNameChangedCalled within one second of a player changing their name.
UCL HelpersThese defines are server-only, to help with UCL.

Umsg Helpers

These are ids for the ULib umsg functions, so the client knows what they’re getting.

Hooks

These are the hooks that ULib has created that other modders are free to make use of.

Summary
Hooks
UCLAuthedCalled on both server and client when a player has been (re)authenticated by UCL.
UCLChangedCalled on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes.
ULibReplicatedCvarChangedCalled on both client and server when a replicated cvar changes or is created.
ULibLocalPlayerReadyCalled on both client and server when a player entity is created.
ULibCommandCalledCalled on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow.
ULibPlayerTargetCalled whenever one player is about to target another player.
ULibPlayerTargetsCalled whenever one player is about to target another set of players.
ULibPostTranslatedCommandServer hook.
ULibPlayerNameChangedCalled within one second of a player changing their name.

Hooks

UCLAuthed

Called on both server and client when a player has been (re)authenticated by UCL.  Called for ALL players, regardless of access.

Parameters passed to callback

plyThe player that got (re)authenticated.

Revisions

v2.40Initial

UCLChanged

Called on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes.  No parameters are passed to callbacks.

Revisions

v2.40Initial

ULibReplicatedCvarChanged

Called on both client and server when a replicated cvar changes or is created.

Parameters passed to callback

sv_cvarThe name of the server-side cvar.
cl_cvarThe name of the client-side cvar.
plyThe player changing the cvar or nil on initial value.  ALWAYS nil client side.
old_valueThe previous value of the cvar, nil if this call is to set the initial value.
new_valueThe new value of the cvar.

Revisions

v2.40Initial

ULibLocalPlayerReady

Called on both client and server when a player entity is created.  (can now run commands).  Only works for local player on the client side.

Parameters passed to callback

plyThe player that’s ready (local player on client side).

Revisions

v2.40Initial

ULibCommandCalled

Called on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow.

Parameters passed to callback

plyThe player attempting to execute the command.
commandNameThe command that’s being executed.
argsThe table of args for the command.

Revisions

v2.40Initial

ULibPlayerTarget

Called whenever one player is about to target another player.  Called BEFORE any other validation takes place.  Return false and error message to disallow target completely, return true to override any other validation logic and allow the target to take place, return a player to force the target to be the specified player.

Parameters passed to callback

plyThe player attempting to execute the command.
commandNameThe command that’s being executed.
targetThe proposed target of the command before any other validation logic takes place.

Revisions

v2.40Initial

ULibPlayerTargets

Called whenever one player is about to target another set of players.  Called BEFORE any other validation takes place.  Return false and error message to disallow target completely, return true to override any other validation logic and allow the target to take place, return a table of players to force the targets to be the specified players.

Parameters passed to callback

plyThe player attempting to execute the command.
commandNameThe command that’s being executed.
targetsThe proposed targets of the command before any other validation logic takes place.

Revisions

v2.40Initial

ULibPostTranslatedCommand

Server hook.  Called after a translated command (ULib.cmds.TranslatedCommand) has been successfully verified.  This hook directly follows the callback for the command itself.

Parameters passed to callback

plyThe player that executed the command.
commandNameThe command that’s being executed.
translated_argsA table of the translated arguments, as passed into the callback function itself.

Revisions

v2.40Initial

ULibPlayerNameChanged

Called within one second of a player changing their name.

Parameters passed to callback

plyThe player that changed names.
oldNameThe player’s old name, before the change.
newNameThe player’s new name, after the change.

Revisions

v2.40Initial

UCL Helpers

These defines are server-only, to help with UCL.

Close