The query_client_cvar native now checks for a non-zero g_engfuncs.pfnQueryClientCvarValue before proceeding

This commit is contained in:
Pavol Marko 2005-09-06 16:31:54 +00:00
parent 66b95f64a5
commit f2527ecc86

View File

@ -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)
{ {