Skip to main content

ConCommandAttribute

Namespace: DeadworksManaged.Api

Marks a method as a console command handler. The method must have signature void Handler(ConCommandContext ctx).


ConCommandContext

Namespace: DeadworksManaged.Api

Context passed to [ConCommand] and [ConVar] handlers.

Properties

PropertyDescription
CallerSlotPlayer slot of the caller, or -1 if invoked from server console.
CommandThe command name that was typed (args[0]).
ArgsAll arguments including the command name at index 0.
ArgStringThe argument string after the command name. Empty if no args.
IsServerCommandTrue when invoked from server console (no player).
ControllerThe player controller, or null if invoked from server console.

ConVarAttribute

Namespace: DeadworksManaged.Api

Marks a property as a console variable. Supports int, float, bool, and string. Typing the name in console prints the current value; typing with an argument sets it.