IGameEventManager: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
} | } | ||
</code> | |||
== Subscribing for Events == | |||
<code> | |||
void Plugin::LevelInit( char const* pMapName ) { | |||
Msg( "Level \"%s\" has been loaded\n", pMapName ); | |||
gameeventmanager->AddListener( this, "player_say", true ); | |||
} | |||
</code> | </code> | ||
Revision as of 13:02, 16 August 2006
Getting an Instance if the IGameEventManager
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 );
}