PDA

View Full Version : ConPrint & SetCvar (v1.4) for DLL hacks



Shard
14th May 2004, 21:57
Here they are, for v1.4:

ConPrint


//Globals
typedef void (*type_codConPrint) ( LPSTR lpText, ... );
type_codConPrint codConPrint = (type_codConPrint)0x004369F0;

//Example
codConPrint("7*4563 = %d\n", 7 * 4563);
//This will print to the console: "7*4563 = 31941"
NOTE: You can also use colours
NOTE: Add '\n' at the end to go to the next line

SetCvar

//Globals
typedef void (*type_codSetCvar) ( LPSTR lpCvar, LPSTR lpValue );
type_codSetCvar codSetCvar = (type_codSetCvar)0x0043A920;

//Example
codSetCvar("cg_thirdperson", "1");
//This will set cg_thirdperson to 1
NOTE: The value has to be a string.
NOTE: Cannot change cheat/write protected Cvars

BTW, I haven't tested these so could someone say if they work or not?

BiGmAc
14th May 2004, 22:58
come on IRC bish ;)

btw ill find some values for entity positions/ent names when i get 1.4 installed, maybe right a tut =)_ (fdrunk)

VoN DuTch™
14th May 2004, 23:45
Interesting shard. I'll let you know asap(not @ home). Thanks. :D

cRAZyDESi
15th May 2004, 00:16
nice shard
imma try it for mohss, changing the values of coarse
i need to reinstall cod soon

Shard
15th May 2004, 13:29
I made an error in the code, updated it.

kanuz
15th May 2004, 21:22
hey guys wats the irc channel to join you guys? on wat irc?i got sum questions.

Shard
15th May 2004, 23:15
irc://irc.drlnet.com/mpc