SetClass command
Command defined in core/commands/sh_setclass.lua
Registers the /SetClass command (aliases /CharSetClass, /ChangeClass), which moves the caller, or for
operators another player, into a class when the class limit and the PlayerCanChangeClass hook allow it.
Summary
Methods
OnRun(player, arguments)shared
Moves a player into a class.
Methods
Moves a player into a class.
With one argument, the class name or ID, the caller changes their own class, which they need access to (see
cw.core:HasObjectAccess); the classes menu uses this form. With two arguments, a player name and the class,
an operator, or a player given access to this command, sets that player's class. Respects the class limit
unless PlayerCanBypassClassLimit allows it, and runs PlayerCanChangeClass.
Parameters
- player
- arguments