mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Move check out the loop.
This commit is contained in:
parent
2c4e99fe8d
commit
8cef1af95d
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user