gameevent
gameevent
This library extents gmod's original gameevent library.
Methods
boolean gameevent.AddClientListener( ClientArg(CBaseClient or Player or number) ply, string gameevent )
Adds the given player to listen to the given event.
Was removed/disabled since it was broken.
Blocks/Unblocks the creation of the specified gameevent.
Creates the given gameevent and returns it.
Duplicates the given event
boolean gameevent.FireClientEvent( IGameEvent event, ClientArg(CBaseClient or Player or number) ply )
Fires the given gameevent only for the specific player
Fires the given gameevent and networks it to all players.
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.
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.
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.
If not given a eventName, it will return a table containing all events and listener numbers.
Registers a listener for the given game event, so it can be caught using hook.Add with the event's name.
This function only exists inside HolyLib's separate holylua interface, since that interface doesn't have the normal gamemode hook system set up.
Inside the normal gamemode state, this will be GMod's original gameevent.Listen function.
This function only exists inside HolyLib's separate holylua interface, since that interface doesn't have the normal gamemode hook system set up.
Inside the normal gamemode state, this will be GMod's original gameevent.Listen function.
boolean gameevent.RemoveClientListener( ClientArg(CBaseClient or Player or number) 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.
If the given gameevent is nil it will remove the player from all gameevents.
Removes the Lua gameevent listener from the specific gameevent.