Move check out the loop.

This commit is contained in:
Arkshine 2014-07-19 19:54:57 +02:00
parent 2c4e99fe8d
commit 8cef1af95d

View File

@ -70,9 +70,14 @@ static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
char* sName = get_amxstring(amx, params[1], 0, len);
cell ptr;
if (!strcmp(sName, "MaxClients"))
{
return -1;
}
for (CPluginMngr::iterator a = g_plugins.begin(); a ; ++a)
{
if ((*a).isValid() && amx_FindPubVar((*a).getAMX(), sName, &ptr) == AMX_ERR_NONE && strcmp(sName, "MaxClients"))
if ((*a).isValid() && amx_FindPubVar((*a).getAMX(), sName, &ptr) == AMX_ERR_NONE)
return g_xvars.put((*a).getAMX(), get_amxaddr((*a).getAMX(), ptr));
}