From f2527ecc8613bfd1fd30f26d513d0571b41714c4 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Tue, 6 Sep 2005 16:31:54 +0000 Subject: [PATCH] The query_client_cvar native now checks for a non-zero g_engfuncs.pfnQueryClientCvarValue before proceeding --- amxmodx/amxmodx.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index ebe5564f..fa3634ee 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -2941,6 +2941,12 @@ static cell AMX_NATIVE_CALL query_client_cvar(AMX *amx, cell *params) 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]; if (id < 1 || id > gpGlobals->maxClients) {