View Single Post
Author Message
Backup
Senior Member
Join Date: Jul 2010
Location: Česká Republika
Old 02-06-2018 , 18:02   OnQueryCvarValueFinished never gets called
Reply With Quote #1

Hi,
I'm writing an extension and I'm trying to get client's cvar.
When I called engine->GetClientConVarValue(...), I got empty string. I've expected this since the cvar is quite unusual.
Now I'm calling engine->StartQueryCvarValue(...), I get valid cookie, but OnQueryCvarValueFinished never gets called!
I have it hooked the same way as sourcemod does it:
Code:
SH_DECL_HOOK5_void(IServerGameDLL, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, edict_t *, EQueryCvarValueStatus, const char *, const char *);

bool CExtension::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late) {
	SH_ADD_HOOK(IServerGameDLL, OnQueryCvarValueFinished, gamedll, SH_MEMBER(this, &CExtension::OnQueryCvarValueFinished), false);
}
I've tried different cvars without any luck. I'm testing this in csgo.

Have you encountered such issue?

Thanks!
__________________
Sorry for my english.
Backup is offline