HolyLib Wiki

gameevent

gameevent

This library extents gmod's original gameevent library.

Methods

boolean gameevent.AddClientListener( Player ply, string gameevent )
Adds the given player to listen to the given event. Was removed/disabled since it was broken.
gameevent.BlockCreation( string gameevent, boolean blockCreation = false )
Blocks/Unblocks the creation of the specified gameevent.
IGameEvent gameevent.Create( string gameevent, boolean force = false )
Creates the given gameevent and returns it.
Duplicates the given event
boolean gameevent.FireClientEvent( IGameEvent event, Player ply )
Fires the given gameevent only for the specific player
boolean gameevent.FireEvent( IGameEvent event, boolean dontBroadcast = false )
Fires the given gameevent and networks it to all players.
table gameevent.GetClientListeners( Player ply = nil )
Returns a table containing all gameevents the specific client is listening to.
If not given a valid player, it will return a table containing all players as a key and all gameevents their listening to as the value.
number gameevent.GetListeners( string eventName = nil )
Returns the number of Listeners a specific gameevent has.
If not given a eventName, it will return a table containing all events and listener numbers.
boolean gameevent.RemoveClientListener( Player ply, string gameevent = nil )
Removes the player from listening to the given gameevent.
If the given gameevent is nil it will remove the player from all gameevents.
boolean gameevent.RemoveListener( string gameevent = nil )
Removes the Lua gameevent listener from the specific gameevent.