mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 23:05:37 +03:00
The query_client_cvar native now checks for a non-zero g_engfuncs.pfnQueryClientCvarValue before proceeding
This commit is contained in:
parent
66b95f64a5
commit
f2527ecc86
@ -2941,6 +2941,12 @@ static cell AMX_NATIVE_CALL query_client_cvar(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!g_engfuncs.pfnQueryClientCvarValue)
|
||||||
|
{
|
||||||
|
LogError(amx, AMX_ERR_NATIVE, "QueryClientCvarValue engine function not available. Make sure hlds and metamod are up-to-date");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int id = params[1];
|
int id = params[1];
|
||||||
if (id < 1 || id > gpGlobals->maxClients)
|
if (id < 1 || id > gpGlobals->maxClients)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user