IGameEventManager: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Getting an Instance if the | == Note on IGameEventManager2 == | ||
With the release of the updated SDK for Ep1 the IGameEventManager was upgraded to version 2. This version allows for registering for only the events that are explicitly desired instead of registering for all events. '''Beware''' of changes in the API for this version. | |||
== Getting an Instance if the IGameEventManager2 == | |||
<pre> | <pre> | ||
Line 16: | Line 20: | ||
} | } | ||
</pre> | </pre> | ||
== See Also == | == See Also == | ||
* {{doxygen|igameevents_8h-source.html igameevents.h on HL2 SDK Doxygen}} | * {{doxygen|igameevents_8h-source.html igameevents.h on HL2 SDK Doxygen}} | ||
[[Category:Programming]][[Category:Interfaces]] | [[Category:Programming]][[Category:Interfaces]] |
Revision as of 13:07, 16 August 2006
Note on IGameEventManager2
With the release of the updated SDK for Ep1 the IGameEventManager was upgraded to version 2. This version allows for registering for only the events that are explicitly desired instead of registering for all events. Beware of changes in the API for this version.
Getting an Instance if the IGameEventManager2
bool Plugin::Load( CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory ) { IGameEventManager2* gameeventmanager = (IGameEventManager2*) interfaceFactory( INTERFACEVERSION_GAMEEVENTSMANAGER2, NULL); }
Subscribing for Events
void Plugin::LevelInit( char const* pMapName ) { Msg( "Level \"%s\" has been loaded\n", pMapName ); gameeventmanager->AddListener( this, "player_say", true ); }