Hi, I'm having some problems on my serverplugin and i need some help. here are the issues:
1. When i unload my plugin via plugin_unload, it's CON_COMMANDS and cvar are still in place. Is there something I should do in MyPlugin::Unload() to unregister the concommands/cvars? (also the plugin might be still running, i didn't check that) 2. The code below is from the function that is called on plugin load, to populate a struct array "serverPlayers[]" with the currently connected player information. It is called in the constructor so you can unload/load a new version while the map is running and players connected. But it's crashing, take a look: (..snip..) for(int i=0;i<65;i++) { edict_t *pEntity = engine->PEntityOfEntIndex(i); if (!pEntity || pEntity->IsFree()) continue; IPlayerInfo *playerinfo=playerinfomanager->GetPlayerInfo(pEntity); if (!playerinfo) continue; //crashes right here! if (!playerinfo->IsConnected()) continue; // <insert code that fills serverPlayers[i] 's members with player's info> } (..snip..) I'm not a big fan of saving playerList/maxClients that are passed to serverActivate, because it won't be called if the plugin is loaded after the server initialization. My plugin needs to be loadable/unloadable any time (so I can develop without disturbing the server crowd) 3. The code seems to crash if i register more than one CVAR, but i'm still investigating that. Code is like this: static ConVar myp_cvar1("myp_cvar1", "", FCVAR_PLUGIN | FCVAR_PROTECTED, "first cvar"); static ConVar myp_cvar2("myp_cvar2", 1, FCVAR_PLUGIN | FCVAR_PROTECTED, "second cvar"); //crash here! Any suggestions? I'm developing this plugin on Linux. (it took some effort to get it to compile already :p ) It's currently in testing on two of my servers without these three features and it's running without any problems for a few days now. Thanks, -- disq _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders