-
Notifications
You must be signed in to change notification settings - Fork 4
Admin Control
The admin control interface allows plugins to execute administrative actions given a player who has the right to perform them.
Reserved slots allow you to make a number of slots in the server's list of players reserved. When all non-reserved slots have been filled, any players connecting will only be allowed to continue connecting if they pass a check performed by the CanPlayerUseReservedSlot
hook.
This hook has the following syntax:
HookReturnCode CanPlayerUseReservedSlot( edict_t@ pEntity, const string& in szPlayerName, const string& in szIPAddress, bool& out bCanJoin )
Plugins implementing this hook can reject players by setting bCanJoin
to false, and allow them to continue joining by setting it to true. This argument defaults to false, so you must set it to true explicitly if you want to allow them to join.
These methods affect players. There are variants to automatically verify the admin level of the invoking player, and variants to simply execute the action without any verification.
Kill the target player. Can optionally specify a custom respawn time.
Kick the target player from the server. The player is also temporarily banned. Can either specify a custom ban time (in minutes), or the mp_kickbantime
cvar is used.
Bans the target player from the server. The player is also kicked from the server. Can either specify a custom ban time (in minutes), or the mp_bantime
cvar is used.
Slaps the target player. Can specify how much damage is applied. Can optionally specify slap direction and velocity and damage type(s).