Raised This Month: $51 Target: $400
 12% 

Access to QueryClientCvarValue() or an analogous function


Post New Thread Reply   
 
Thread Tools Display Modes
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 08-27-2005 , 16:07  
Reply With Quote #11

You laugh now, but I've already proven its possible to hook some things out of the Client dll via this method.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2005 , 16:21  
Reply With Quote #12

wow......truly amazing idea. using Sockets and MM client side.
Freecode is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 08-27-2005 , 17:37  
Reply With Quote #13

Are you talking about cl_metamod again... cause VAC loves that. :-)
Johnny got his gun is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 08-27-2005 , 17:39  
Reply With Quote #14

That idea sounds way too unrealistic, and by the way, I would not connect a server which forces me to use its own client dll...

Back on topic:
I've got a simple implementation done, right now it's failing because metamod does not give me access to newdll functions because the gamedll doesn't export them... Argh.
__________________
hello, i am pm
PM is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 08-27-2005 , 19:05  
Reply With Quote #15

Mwah.

My implementation is in CVS.

I've tested it a VERY small bit on the IOS mod.

Metamod comments claim that metamod is not providing newdll functions to plugins when the gamedll doesn't provide them because it doesn't know the answer for ShouldCollide. However I think that a missing ShouldCollide has the effect of a ShouldCollide always returning 1, and this is what mm's shouldcollide wrapper does anyway if there is no gamedll table and no plugins supercede or whatever, so it should not be a problem. I'm tired so I'm sorry if I'm not making any sense.

Here is what I've done to the official mm source from cvs in order for this to work on ios:
Code:
dllapi.cpp, line ~480:

remove
	if(!GameDLL.funcs.newapi_table)
		return(FALSE);
alter the comment above that

then
mplugin.cpp around line 867, remove that if block around 
	iface_vers=NEW_DLL_FUNCTIONS_VERSION;
	GET_FUNC_TABLE_FROM_PLUGIN(pfnGetNewDLLFunctions, 
			"GetNewDLLFunctions", newapi_table, 
			NEW_DLL_FUNCTIONS_FN, NEW_DLL_FUNCTIONS,
			&iface_vers, iface_vers, NEW_DLL_FUNCTIONS_VERSION);
	iface_vers=NEW_DLL_FUNCTIONS_VERSION;
	GET_FUNC_TABLE_FROM_PLUGIN(pfnGetNewDLLFunctions_Post, 
			"GetNewDLLFunctions_Post", newapi_post_table, 
			NEW_DLL_FUNCTIONS_FN, NEW_DLL_FUNCTIONS,
			&iface_vers, iface_vers, NEW_DLL_FUNCTIONS_VERSION);
Seems to work fine for me.

Here is my test plugin:
Code:
#include <amxmodx> #include <amxmisc> // Hi public plugin_init() {     register_plugin("Test", "0.1", "PM");     register_clcmd("testik", "testik"); } public testik(id) {     log_amx("dispatching three queries for player %d", id);     query_client_cvar(id, "ex_interp", "myresult");     query_client_cvar(id, "ex_extrapmax", "myresult");     query_client_cvar(id, "cl_solid_players", "myresult");         return PLUGIN_HANDLED; } public myresult(id, const cvar[], const result[]) {     log_amx("Query for %d arrived: %s=%s", id, cvar, result); }

Here is the result:
Code:
L 08/28/2005 - 23:51:59: [test.amxx] dispatching three queries for player 1
L 08/28/2005 - 23:51:59: [test.amxx] Query for 1 arrived: ex_interp=0.1
L 08/28/2005 - 23:51:59: [test.amxx] Query for 1 arrived: ex_extrapmax=1.2
L 08/28/2005 - 23:51:59: [test.amxx] Query for 1 arrived: cl_solid_players=1
__________________
hello, i am pm
PM is offline
evilspy
Member
Join Date: Jun 2004
Location: Finland
Old 08-27-2005 , 19:12  
Reply With Quote #16

Could you make stress test to see if order of queries and result change?
__________________
^^ ^^ ^^ ^^
Metamod-P
- http://metamod-p.sf.net/
evilspy is offline
evilspy
Member
Join Date: Jun 2004
Location: Finland
Old 08-27-2005 , 19:18  
Reply With Quote #17

Quote:
Originally Posted by Twilight Suzuka
With a communication system between a client MM and a server MM in place, we could capture and even alter far more things that simple CVARs and such.
HL message system is encrypted. You cannot change anything like that.

Why would all cheats be hooking client, if there would be such an easy way instead?
__________________
^^ ^^ ^^ ^^
Metamod-P
- http://metamod-p.sf.net/
evilspy is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2005 , 19:44  
Reply With Quote #18

Quote:
Originally Posted by ghost of evilspy
Quote:
Originally Posted by Twilight Suzuka
With a communication system between a client MM and a server MM in place, we could capture and even alter far more things that simple CVARs and such.
HL message system is encrypted. You cannot change anything like that.

Why would all cheats be hooking client, if there would be such an easy way instead?
evil you shouldnt even have replide to that. its just really funny
Freecode is offline
BAILOPAN
Join Date: Jan 2004
Old 08-27-2005 , 19:52  
Reply With Quote #19

PM: most likely I'll be changing this to be a global callback

otherwise looks good!
__________________
egg
BAILOPAN is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 08-28-2005 , 05:21  
Reply With Quote #20

Quote:
Originally Posted by BAILOPAN
PM: most likely I'll be changing this to be a global callback

otherwise looks good!
I think that the ability to specify a result function instead of having a global callback is more useful.

About the stress test: I'll try to do it over the next week, if Steam starts without an internet connection
__________________
hello, i am pm
PM is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:17.


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