|
楼主 |
发表于 2004-7-16 12:58:50
|
显示全部楼层
来自 中国–福建–龙岩
看看csstats_0.97的源代码,对大家会有帮助。 :14:
如下:
void ServerDeactivate() {
for(int i = 1;i<=gpGlobals->maxClients; ++i){
CPlayer *pPlayer = GET_PLAYER_POINTER_I(i);
if (pPlayer->rank) pPlayer->Disconnect();
}
g_grenades.clear();
if ( (g_rank.getRankNum() < (int)csstats_maxsize->value) &&
((int)csstats_reset->value == 0) )
{
g_rank.saveRank( BUILD_PATHNAME("%s",
get_localinfo("csstats","addons/amx/csstats.dat") ) );
}
else
{
g_rank.clear();
CVAR_SET_FLOAT("csstats_reset",0.0);
}
RETURN_META(MRES_IGNORED);
}
:21: |
|