mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-20 12:46:07 +08:00
[server] Implement CNetGame::LoadAllFilterscripts
This commit is contained in:
@ -182,6 +182,34 @@ CNetGame::~CNetGame()
|
|||||||
RakNetworkFactory::DestroyRakServerInterface(m_pRak);
|
RakNetworkFactory::DestroyRakServerInterface(m_pRak);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------
|
||||||
|
// Loads filterscripts after pools initialisation
|
||||||
|
|
||||||
|
void CNetGame::LoadAllFilterscripts()
|
||||||
|
{
|
||||||
|
logprintf("");
|
||||||
|
logprintf("Filterscripts");
|
||||||
|
logprintf("---------------");
|
||||||
|
int iScriptCount = 0;
|
||||||
|
char* szFilterScript = strtok(pConsole->GetStringVariable("filterscripts"), " ");
|
||||||
|
while (szFilterScript)
|
||||||
|
{
|
||||||
|
logprintf(" Loading filterscript '%s.amx'...", szFilterScript);
|
||||||
|
if (m_pFilterScripts->LoadFilterScript(szFilterScript))
|
||||||
|
{
|
||||||
|
iScriptCount++;
|
||||||
|
} else {
|
||||||
|
logprintf(" Unable to load filterscript '%s.amx'.", szFilterScript);
|
||||||
|
}
|
||||||
|
szFilterScript = strtok(NULL, " ");
|
||||||
|
}
|
||||||
|
logprintf(" Loaded %d filterscripts.\n", iScriptCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CNetGame::Init(BOOL bFirst)
|
void CNetGame::Init(BOOL bFirst)
|
||||||
{
|
{
|
||||||
// TODO: CNetGame::Init W: 0048DE20 L: 080AB7E0
|
// TODO: CNetGame::Init W: 0048DE20 L: 080AB7E0
|
||||||
|
@ -63,6 +63,8 @@ public:
|
|||||||
|
|
||||||
RakServerInterface * GetRakServer() { return m_pRak; };
|
RakServerInterface * GetRakServer() { return m_pRak; };
|
||||||
|
|
||||||
|
void LoadAllFilterscripts();
|
||||||
|
|
||||||
void Process();
|
void Process();
|
||||||
|
|
||||||
void LoadBanList();
|
void LoadBanList();
|
||||||
|
Reference in New Issue
Block a user