Garry's Mod Wiki

Revision Difference

gameevent.Listen#551135

<function name="Listen" parent="gameevent" type="libraryfunc"> <description> Adds a [game event](gameevent) listener, creating a new hook using the <page>hook</page> library, which can be listened to via <page>hook.Add</page> with the given `eventName` as event. ⤶ List of valid events (with examples) can be found [here](gameevent).⤶ <note> All gameevents are called in the **Menu State**, but if you want to use them you need to use some DLL(like [this](https://github.com/RaphaelIT7/gmod-gameevent) one) or you need to create your own. </note> </description> <realm>Shared</realm> <args> <arg name="eventName" type="string">The event to listen to.</arg> <arg name="eventName" type="string">The event to listen to. List of valid events (with examples) can be found [here](gameevent).</arg> </args> </function>