Available Hooks - nZombies-Time/nZombies-Rezzurrection GitHub Wiki

Overview

This page is directed at developers who want to utilize and build mods around nZombies' system. This page contains a list of hooks that is run from nZombies. They are run in addition to all normal Garry's Mod hooks, so be sure you also check the official Garry's Mod Wiki for those. If you feel any hook is missing and should be added, open an issue in the Issues tab.

Shared

Server

Client


Categories


Round


  • OnRoundWaiting

Called when the round enters Waiting State. This is the base state where no game is currently going on, and players need to load a config and ready up to begin. Note: Not called when exiting Creative Mode. For any time the round should change to ROUND_WAITING state, see OnRoundChangeState.


  • OnRoundInit

Called when the game initializes. This happens when all players have readied up, and the 5 second countdown to the game begins.


  • OnRoundPreparation (number round)

Called when the round enters Prepare State. This is when a round ends and the players get a little time to prepare for the next round.


Called when the round enters begins.


  • OnRoundThink

Called every 0.1 seconds while a round is currently going.


  • OnRoundEnd

Called when all players have died and the game has ended. For when a round has ended after all zombies have been killed, see OnRoundPreparation.


  • OnRoundCreative

Called when the game enters Creative Mode. Not called when exited Creative Mode, for that see OnRoundChangeState.


Called whenever the round changes state. States are ROUND_WAITING, ROUND_INIT, ROUND_PROG, ROUND_GO, ROUND_CREATE.


Doors


Called when a door is unlocked. This is only called if the door is registered with the Door system (has been marked with the Door Locker tool).


  • OnAllDoorsLocked

Called when all doors have been locked. This typically happens at the start of a new game where the game resets itself.


Called when a new door link has been created on a map door (prop_door_rotating etc). This is not called when a non-map door has been created, for that see OnPropDoorLinkCreated.


Called when a new door link has been created on a non-map door (props etc). This is not called when a map door has been created, for that see OnMapDoorLinkCreated.


  • OnMapDoorLinkRemoved (Entity door, number map creation ID)

Called when a door link has been removed on a map door (prop_door_rotating etc). This is not called when a non-map door has been removed, for that see OnPropDoorLinkRemoved.


  • OnPropDoorLinkRemoved (Entity door)

Called when a door link has been removed on a non-map door (props etc). This is not called when a map door has been removed, for that see OnMapDoorLinkRemoved.