> For the complete documentation index, see [llms.txt](https://akequ.gitbook.io/scp-classified-site-plugin-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://akequ.gitbook.io/scp-classified-site-plugin-api/ids/hook-id.md).

# Hook ID

{% hint style="warning" %}
Under work, some information can be inaccurate
{% endhint %}

## Usage

Hooks can be called on Server or Client if they exist on Server/Client side.\
If you want to call hook, then you must use **HookManager.Run(string hookName, params object\[] args)**.\
If you want to bind your function to hook, then you must use **HookManager.Add(GameObject gameObject, string hookName, System.Action\<object\[]> func)**.

### Alpha Warhead

\[<mark style="color:blue;">SERVER</mark>] onAWPanelPress() - called when red button pressed.

\[<mark style="color:blue;">SERVER</mark>] onAWLeverFlip(bool state) - called when lever flipped in HC\_Nuke room.

\[<mark style="color:blue;">SERVER</mark>] onAPAWState(bool state) - called when admin panel request to disable/enable warhead.

\[<mark style="color:blue;">SERVER</mark>] onAPAWDetonate() - called when admin panel called to instantly detonate warhead.

\[<mark style="color:blue;">SERVER</mark>] onAWDetonate() - called when alpha warhead detonated, not called after onAPAWDetonate hook.

\[<mark style="color:blue;">SERVER</mark>] onAWReady() - called when warhead was restarted.

\[<mark style="color:blue;">SERVER</mark>] onAWResume(float time) - called when warhead was resumed.

\[<mark style="color:blue;">SERVER</mark>] onAWStart(float time) - called when warhead was started, not resumed.

\[<mark style="color:blue;">SERVER</mark>] onAWCancel() - called when warhead detonation was canceled.

### Door

\[<mark style="color:blue;">SERVER</mark>] LockDoors() - called when admin panel request to lock doors.

\[<mark style="color:blue;">SERVER</mark>] UnlockDoors() - called when admin panel request to unlock doors.

### Elevator

\[<mark style="color:blue;">SERVER</mark>] onElevatorTeleport(Elevator caller, Player teleported) - called when elevator(caller) teleport player(teleported).

\[<mark style="color:blue;">SERVER</mark>] onElevatorUse(string elevatorID) - called when player request elevator to change floor.

### LCZ Decontamination

\[<mark style="color:blue;">SERVER</mark>] onLCZDecontPrepare() - called when LCZ prepare decontamination.

\[<mark style="color:blue;">SERVER</mark>] onLCZDecontStart() - called when LCZ start decontamination timer.

\[<mark style="color:blue;">SERVER</mark>] onLCZDecontTick(float time) - called when when LCZ Decontamination reaches a certain period of time(10,5,1... mins).

\[<mark style="color:blue;">SERVER</mark>] onLCZDecontEvac() - called when when LCZ start evacuation procedure.

\[<mark style="color:blue;">SERVER</mark>] onLCZDecontBegun() - called when when LCZ locked down.

\[<mark style="color:blue;">SERVER</mark>] onAPLCZClose() - called when admin panel request to lock down LCZ.

### HCZ Power Generator

\[<mark style="color:blue;">SERVER</mark>] onPowerGeneratorEnabled() - called when power generator enabled.

### Round Canvas

\[<mark style="color:blue;">SERVER</mark>] startRoundPanel() - called when admin panel requested to start round.

\[<mark style="color:blue;">SERVER</mark>] startRound() - called after round start timer reaches zero.

### Round Manager

\[<mark style="color:blue;">SERVER</mark>] onRoundEnd() - called when round was ended.

\[<mark style="color:blue;">SERVER</mark>] NRServer() - called when server prepare fast restart(config "**use\_fast\_restart**" must be enabled).

\[<mark style="color:blue;">SERVER</mark>] onRoundStart() - called when round was started.

\[<mark style="color:blue;">SERVER</mark>] RestartRoundAP() - called when admin panel request to restart round.

### Support Manager

\[<mark style="color:blue;">SERVER</mark>] onSupportRequest(string type) - called when support spawn was requested, type can be "MTF" or "CI".

\[<mark style="color:blue;">SERVER</mark>] onSupportSpawned(string type) - called when support spawned, type can be "MTF" or "CI".

\[<mark style="color:blue;">SERVER</mark>] onSupportDeclined() - called when support request declined.

\[<mark style="color:blue;">SERVER</mark>] onSupportApproved(float time) - called when support request approved, return time after which support will be spawned.

### Player Classes

\[<mark style="color:blue;">SERVER</mark>] onClassDEscape(Player caller) - called when player escapes from facility as Class-D.

\[<mark style="color:blue;">SERVER</mark>] onScientistEscape(Player caller) - called when player escapes from facility as Scientist.

### Network Manager

\[<mark style="color:green;">CLIENT</mark>] onServerDisconnect() - called when player disconnects from server.

\[<mark style="color:blue;">SERVER</mark>] onPlayerConnected(NetworkConnectionToPlayer connection) - called when player connects to server.

\[<mark style="color:blue;">SERVER</mark>] onPlayerDisconnected(NetworkConnectionToPlayer connection) - called when player disconnects to server.

### Room

\[<mark style="color:green;">CLIENT</mark>] onRoomEntered(GameObject room, GameObject connectedRooms) - called when player enters to room.

### Network Manager

\[<mark style="color:blue;">SERVER</mark>] onPlayerCreated(Player player) - called when player object created.

\[<mark style="color:blue;">SERVER</mark>] onPlayerSetClass(Player player) - called when player change player class.

\[<mark style="color:blue;">SERVER</mark>] onPlayerDeath(Player player, DamageHandler damage) - called when player dies.

\[<mark style="color:blue;">SERVER</mark>/<mark style="color:green;">CLIENT</mark>] onPlayerTeleported(Player player) - called when player teleports.
