// // The plugin is a static singleton that is exported as an interface // CEmptyServerPlugin g_EmtpyServerPlugin; EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CEmptyServerPlugin, IServerPluginCallbacks, INTERFACEVERSION_ISERVERPLUGINCALLBACKS, g_EmtpyServerPlugin );
//--------------------------------------------------------------------------------- // Purpose: called when the plugin is loaded, load the interface we need from the engine //--------------------------------------------------------------------------------- boolCEmptyServerPlugin::Load( CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory ) { returntrue; }
//--------------------------------------------------------------------------------- // Purpose: called when the plugin is unloaded (turned off) //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::Unload( void ) { }
//--------------------------------------------------------------------------------- // Purpose: called when the plugin is paused (i.e should stop running but isn't unloaded) //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::Pause( void ) { }
//--------------------------------------------------------------------------------- // Purpose: called when the plugin is unpaused (i.e should start executing again) //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::UnPause( void ) { }
//--------------------------------------------------------------------------------- // Purpose: the name of this plugin, returned in "plugin_print" command //--------------------------------------------------------------------------------- constchar *CEmptyServerPlugin::GetPluginDescription( void ) { return"Plugin Made by Yourself"; }
//--------------------------------------------------------------------------------- // Purpose: called on level start //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::LevelInit( charconst *pMapName ) {
}
//--------------------------------------------------------------------------------- // Purpose: called on level start, when the server is ready to accept client connections // edictCount is the number of entities in the level, clientMax is the max client count //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::ServerActivate( edict_t *pEdictList, int edictCount, int clientMax ) {
}
//--------------------------------------------------------------------------------- // Purpose: called once per server frame, do recurring work here (like checking for timeouts) //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::GameFrame( bool simulating ) { }
//--------------------------------------------------------------------------------- // Purpose: called on level end (as the server is shutting down or going to a new map) //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::LevelShutdown( void )// !!!!this can get called multiple times per map change {
}
//--------------------------------------------------------------------------------- // Purpose: called when a client spawns into a server (i.e as they begin to play) //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::ClientActive( edict_t *pEntity ) {
}
//--------------------------------------------------------------------------------- // Purpose: called when a client leaves a server (or is timed out) //--------------------------------------------------------------------------------- voidCEmptyServerPlugin::ClientDisconnect( edict_t *pEntity ) { }