k Im trying to make this function in delphi and have tryed converting C++ source but failed, So could someone please explain the PushToConsole for me?
Questions:
* Do we need to hook DX9 to use PushToConsole(looking at what I have seen it only a pointer to an address which is then called, So i would'nt think DX9 needs to be hooked)
* I noticed on a lot of source that the "command" are repeatedly send to PushToConsole method, most do it in renderframe or endscene which is a DX9 hook, is there a reason for this or can it be sent just once when enabling it or disabling it?
* is there an alternative (for example instead of pushing a command to console can we write some bytes to an address? if so are these address's static or do I need to searcha pattern to patch?)
* can someone provide as much info as possible to help me get this working?
* Does anyone even code in Delphi on this forum ???
You do need to realise PTC is an engine hack(writing bytes to addresses is another story). You wont HAVE to hook in directx but you still can, otherwise you still still require some type of detour for the scan "Gordon" has found in cshell. Also, there to much information about detouring this/bypassing but they do scans as well after every game and before games they do checks for any memory changes, so thats why you see people having to turn off and on there hacks ingame. You're second question is rather hard for me to understand.I'm still a rookie at coding let alone C++. If you provide an example of code you found someone can glady help you.
* Do we need to hook DX9 to use PushToConsole(looking at what I have seen it only a pointer to an address which is then called, So i would'nt think DX9 needs to be hooked)
-- No.
* I noticed on a lot of source that the "command" are repeatedly send to PushToConsole method, most do it in renderframe or endscene which is a DX9 hook, is there a reason for this or can it be sent just once when enabling it or disabling it?
-- In-game events will change these variables that are set. If you don't re-set them to what your (hacked) value is, it will remain at the game default after it is reset.
* is there an alternative (for example instead of pushing a command to console can we write some bytes to an address? if so are these address's static or do I need to searcha pattern to patch?)
-- Yes, you can patch some bytes. But the console is easier. :L
* can someone provide as much info as possible to help me get this working?
-- Aiight. What do you need?
* Does anyone even code in Delphi on this forum ???
-- Yeah, but only a little.
Originally Posted by Departure
* Does anyone even code in Delphi on this forum ???
most people on this forum code in a language called ctrl+C/
and the rest generally in C++ with a minority in ASM
u are the first I have seen here making a hack in Delphi
keep up the good work
Thanks for the info it was useful, I'll keep trying to make this PushToConsole work, knowing now we dont have to hook the DX9 function and thanks for the info about the game rewritting the values during game play(this means I'll keep smashing the patch value while thread is true)...
In the mean time I think I prefer patching the bytes as an alternative to PushToConsole...
Does anyone have an address example for lets say... "ShowFPS 1" and "ShowFPS 0"?
I have'nt seen this hack in action but I assume it will display a Frames Per Second during the game?
Or is there another PushToConsole command I can use that is easy to find and test during game play?
Originally Posted by Departure
Thanks for the info it was useful, I'll keep trying to make this PushToConsole work, knowing now we dont have to hook the DX9 function and thanks for the info about the game rewritting the values during game play(this means I'll keep smashing the patch value while thread is true)...
In the mean time I think I prefer patching the bytes as an alternative to PushToConsole...
Does anyone have an address example for lets say... "ShowFPS 1" and "ShowFPS 0"?
I have'nt seen this hack in action but I assume it will display a Frames Per Second during the game?
Or is there another PushToConsole command I can use that is easy to find and test during game play?
Thanks for the info it was useful, I'll keep trying to make this PushToConsole work, knowing now we dont have to hook the DX9 function and thanks for the info about the game rewritting the values during game play(this means I'll keep smashing the patch value while thread is true)...
In the mean time I think I prefer patching the bytes as an alternative to PushToConsole...
Does anyone have an address example for lets say... "ShowFPS 1" and "ShowFPS 0"?
I have'nt seen this hack in action but I assume it will display a Frames Per Second during the game?
Or is there another PushToConsole command I can use that is easy to find and test during game play?
DirectX is used for visual interfaces, and hacks such as chams (chams via. zbuffer).
"ShowFPS" displays a counter at the top-left of the game.
The link that AVGN posted [ http://www.mpgh.net/forum/207-combat...und-today.html ] may not work, but try it. I think those might just be the addresses where the strings are located - I haven't tried (don't have Combat Arms), but yeahs, don't be surprised if they don't work.
The "PushToConsole" method is simply a proxy method of calling the internal "PushToConsole" command (original function name is RunConsoleCommand) - part of the ILTClient class of the Jupiter Engine - which executes whatever command you've given it. Since you don't have direct access to it, you use proxy methods. There are many and various, as long as you reach the function in the end, it is all good.
If you need more help I can try, but yeahs.
Good luck !
thanks for replys,
Yes they are just Resource Strings and wont do anything.. except they get pushed to stack before calling the actual function, Weird thing is I tryed writting the function in assembly(delphi supports inline assembly) to given address I seen on this forum but without success, I dont know why
Code:
function PushIt(command: PChar):boolean;cdecl;
var
dwAddress: Dword;
begin
dwAddress:= $00484BC0;
asm
mov eax,command
push eax
push $08003f0
call dwAddress
add esp,8
end;
result := true;
end;
As you can see its the exact same as in the Engine.exe