IGameEventManager

From Valve Developer Community
Revision as of 13:04, 16 August 2006 by Guurk (talk | contribs)
Jump to navigation Jump to search

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 );
}


See Also