Holds some defines used on both client and server.
| Defines | Holds some defines used on both client and server. |
| 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. |
| Hooks | |
| UCLAuthed | Called on both server and client when a player has been (re)authenticated by UCL. |
| UCLChanged | Called on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes. |
| ULibReplicatedCvarChanged | Called on both client and server when a replicated cvar changes or is created. |
| ULibLocalPlayerReady | Called on both client and server when a player entity is created. |
| ULibCommandCalled | Called on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow. |
| ULibPlayerTarget | Called whenever one player is about to target another player. |
| ULibPlayerTargets | Called whenever one player is about to target another set of players. |
| ULibPostTranslatedCommand | Server hook. |
| ULibPlayerNameChanged | Called within one second of a player changing their name. |
| UCL Helpers | These defines are server-only, to help with UCL. |
These are the hooks that ULib has created that other modders are free to make use of.
| Hooks | |
| UCLAuthed | Called on both server and client when a player has been (re)authenticated by UCL. |
| UCLChanged | Called on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes. |
| ULibReplicatedCvarChanged | Called on both client and server when a replicated cvar changes or is created. |
| ULibLocalPlayerReady | Called on both client and server when a player entity is created. |
| ULibCommandCalled | Called on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow. |
| ULibPlayerTarget | Called whenever one player is about to target another player. |
| ULibPlayerTargets | Called whenever one player is about to target another set of players. |
| ULibPostTranslatedCommand | Server hook. |
| ULibPlayerNameChanged | Called within one second of a player changing their name. |
Called on both client and server when a replicated cvar changes or is created.
| sv_cvar | The name of the server-side cvar. |
| cl_cvar | The name of the client-side cvar. |
| ply | The player changing the cvar or nil on initial value. ALWAYS nil client side. |
| old_value | The previous value of the cvar, nil if this call is to set the initial value. |
| new_value | The new value of the cvar. |
| v2.40 | Initial |
Called on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow.
| ply | The player attempting to execute the command. |
| commandName | The command that’s being executed. |
| args | The table of args for the command. |
| v2.40 | Initial |
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.
| ply | The player attempting to execute the command. |
| commandName | The command that’s being executed. |
| target | The proposed target of the command before any other validation logic takes place. |
| v2.40 | Initial |
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.
| ply | The player attempting to execute the command. |
| commandName | The command that’s being executed. |
| targets | The proposed targets of the command before any other validation logic takes place. |
| v2.40 | Initial |
Server hook. Called after a translated command (ULib.cmds.TranslatedCommand) has been successfully verified. This hook directly follows the callback for the command itself.
| ply | The player that executed the command. |
| commandName | The command that’s being executed. |
| translated_args | A table of the translated arguments, as passed into the callback function itself. |
| v2.40 | Initial |