AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   About QueryClientConVar value (https://forums.alliedmods.net/showthread.php?t=319559)

farawayf 11-08-2019 04:03

About QueryClientConVar value
 
PHP Code:

(..., const char[] cvarvalueany value

which is the best way to get clients convar value ? afaik "char[] cvarvalue" can get only string value, so its bypassable by changing only int value of convar, while string shows different.
About "any value", how to use it, what this does ? Can it get int value or the same as string, or even both int and string ?

Psyk0tik 11-08-2019 18:00

Re: About QueryClientConVar value
 
https://sm.alliedmods.net/new-api/co...ryClientConVar

QueryCookie QueryClientConVar(int client, const char[] cvarName, ConVarQueryFinished callback, any value)

"any value" just allows you to get the value that you passed to the callback function (last parameter above). "const char[] cvarvalue" allows you to get the actual value of the convar. If you're asking how to get different types of values, then you can just use the StringTo* functions on the cvarvalue string.

StringToInt(cvarvalue)
StringToFloat(cvarvalue)

farawayf 11-08-2019 18:51

Re: About QueryClientConVar value
 
I mean that its possible to bypass string value by changing the 4byte type of convar value(some private cheats can do it). So query cvar value will always return like 0 even if 4byte is 1. There is no way to get actual value of convar instead getting string value from client?

Fyren 11-11-2019 01:07

Re: About QueryClientConVar value
 
The engine function that's used to query client convars only provides back a string for the value.


All times are GMT -4. The time now is 19:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.