Garry's Mod Wiki

gameevent.Listen

  gameevent.Listen( string eventName )

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.

All gameevents are called in the Menu State, but if you want to use them you need to use some DLL(like this one) or you need to create your own.

Arguments

1 string eventName
The event to listen to. List of valid events (with examples) can be found here.