gameevent.Listen
Description
Adds a game event listener, creating a new hook using the hook library, which can be listened to via hook.Add with the given eventName
as event.
List of valid events can be found here.
Arguments
Example
Announce to everyone that a player has connected.
Example
This is a basic template for creating game_event listeners/hooks with the purpose of including all arguments / table variables for each game-event to make it easily known which values can be accessed and when: player_connect. player_connect is triggered at the exact moment they join the server.
Example
This is a basic template for creating game_event listeners/hooks with the purpose of including all arguments / table variables for each game-event to make it easily known which values can be accessed and when: player_disconnect. player_disconnect is triggered at the exact moment they disconnect from the server and will ALWAYS trigger regardless of whether they time-out, are kick/banned, client crashes, they click the X, they type quit in console, etc...
Example
This is a basic template for creating game_event listeners/hooks with the purpose of including all arguments / table variables for each game-event to make it easily known which values can be accessed and when: player_spawn. player_spawn is triggered when the player initially spawns, or respawns.
Example
This is a basic template for creating game_event listeners/hooks with the purpose of including all arguments / table variables for each game-event to make it easily known which values can be accessed and when: player_hurt. player_hurt is triggered when the player is injured or dies.
The SERVER receives 1 extra value - Priority.
Example
This is a basic template for creating game_event listeners/hooks with the purpose of including all arguments / table variables for each game-event to make it easily known which values can be accessed and when: player_hurt. player_hurt is triggered when the player is injured or dies.
The SERVER receives 1 extra value - Priority.
Example
This is a basic template for creating game_event listeners/hooks with the purpose of including all arguments / table variables for each game-event to make it easily known which values can be accessed and when: entity_killed. entity_killed is triggered when the player or entity dies.