Quantcast

Jump to content

» «
Photo

Delphi 7 Trainer

12 replies to this topic
Jarno
  • Jarno

    V2A Converter

  • BUSTED!
  • Joined: 11 Sep 2004

#1

Posted 09 June 2005 - 03:52 PM

Hey guys.

I'm a newly Delphi coder.
But I tried to create a VC/SA trainer.

But nothing worked.
Or sources online.

And here I can't find any example.
Does maybe wants somebody te create a SA Delphi trainer.
En give me the source (Just for example)

And can you guys tell what things like 'pointer' and '1byte' is?

Thanks in advance.

random_download
  • random_download

    :o

  • Members
  • Joined: 07 Mar 2004

#2

Posted 09 June 2005 - 04:40 PM

You may want to take a look at the source for my trainer, it is written in Delphi 7, so you should be able to see how it works etc.. Link in my sig.

Jarno
  • Jarno

    V2A Converter

  • BUSTED!
  • Joined: 11 Sep 2004

#3

Posted 09 June 2005 - 06:36 PM

Tnx but.

But I have a combobox.


CODE
procedure TForm1.ComboGravityChange(Sender: TObject);
var
Value: Single;
begin
case ComboGravity.ItemIndex of
0: Value:= 0.0001;     //very low
1: Value:= 0.001;
2: Value:= 0.008;      //normal
3: Value:= 0.1;
4: Value:= 1.0;        //very high
else
 Value:= 0.008;
end;
WriteMem($863984,Value,SizeOf(Single));
end;


But when I change nothing happend in San Andreas.

This code.

random_download
  • random_download

    :o

  • Members
  • Joined: 07 Mar 2004

#4

Posted 09 June 2005 - 06:43 PM

Yes, that is because the memory addresses are different in San Andreas. My trainer is for Vice City. You can find some addresses here but as SA was only just released, there are not many. You will need to find them youyrself. I think that gravity has been found btw.

Jarno
  • Jarno

    V2A Converter

  • BUSTED!
  • Joined: 11 Sep 2004

#5

Posted 09 June 2005 - 07:05 PM

No...

But I used the adress that from GTASA.

0x863984 there where staying.

random_download
  • random_download

    :o

  • Members
  • Joined: 07 Mar 2004

#6

Posted 09 June 2005 - 08:31 PM

Hmm... did you copy the code to open the process etc. from the readgame function? Also, you will need to change the class name from 'Grand Theft Auto 3' to 'Grand Theft Auto San Andreas' to get the right game.

Jarno
  • Jarno

    V2A Converter

  • BUSTED!
  • Joined: 11 Sep 2004

#7

Posted 10 June 2005 - 05:49 AM

Hmmm this code I now havE:

CODE
unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, XPMan, StdCtrls, ShellAPI;

type
 TForm1 = class(TForm)
   Button1: TButton;
   XPManifest1: TXPManifest;
   ComboGravity: TComboBox;
   Label1: TLabel;
   Label4: TLabel;

   procedure Button1Click(Sender: TObject);
       procedure WriteMem(Offset: Longword; var Value; Size: Integer);
   procedure ComboGravityChange(Sender: TObject);

 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;
hProc: THandle;
card: Cardinal;
 Running: Boolean;

implementation

{$R *.dfm}

procedure TForm1.WriteMem(Offset: Longword; var Value; Size: Integer);
var
PID: integer;
Handle: integer;
Buf: byte;
BytesReadWrite: Cardinal;
begin
GetWindowThreadProcessId(FindWindow('Grand Theft Auto San Andreas', nil), @PID);

Handle := OpenProcess(PROCESS_ALL_ACCESS, false, PID);
WriteProcessMemory(Handle, ptr(Offset), @Value, Size, card);
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
if FileExists('gta_sa.exe') then
ShellExecute(Handle, 'open','gta_sa.exe',nil,nil,SW_SHOWNORMAL)
else MessageDlg('GTA San Andreas exe (gta_sa.exe) not found.' +#13+ 'Or maybe it isnt in the GTASA folder.', mtwarning,[mbOK],0);
end;



procedure TForm1.ComboGravityChange(Sender: TObject);
var
Value: Single;
begin
case ComboGravity.ItemIndex of
0: Value:= 0.0001;     //very low
1: Value:= 0.001;
2: Value:= 0.008;      //normal
3: Value:= 0.1;
4: Value:= 1.0;        //very high
else
 Value:= 0.008;
end;
WriteMem($863984,Value,SizeOf(Single));
end;



end.


But it doesn't work.

Maybe someone here sees the bug.

Stretchnutter
  • Stretchnutter

    Also known as Racer_S

  • Members
  • Joined: 15 Jun 2002

#8

Posted 10 June 2005 - 10:35 AM

This memory address is write protected. You must call VirtualProtectEx() before WriteProcessMemory().


Set it to PAGE_READWRITE (0x4) to succesfully change this.

JernejL
  • JernejL

    Big Homie

  • Members
  • Joined: 11 Mar 2002

#9

Posted 10 June 2005 - 11:39 AM

QUOTE (Jarno @ Jun 9 2005, 16:52)
And can you guys tell what things like 'pointer' and '1byte' is?

please, before you start doing trainers, would you go and learn a bit more on programing itself, if you don't know what pointer is you should rather try ascii art instead (just an example)

Jarno
  • Jarno

    V2A Converter

  • BUSTED!
  • Joined: 11 Sep 2004

#10

Posted 10 June 2005 - 05:16 PM

Sorry...

I'm not a newbie.
I have delphi for 2 years now.

But I'm newly to gamehacking sorry.

J-Fox.GEMM
  • J-Fox.GEMM

    Ello...

  • Members
  • Joined: 31 Aug 2004

#11

Posted 12 June 2005 - 12:09 PM

Pointer sample = read out the player pointer as long (4 bytes) The value u got is the pointer:

dim PlayerPointer as long
dim PosX as single/float

Read(PlayerPointer,RealAdress,4)
Read(RealAdress+52,PosX,4)

and 1 byte is byte... (0 to 255)

like colors or something like that just a mem type rah.gif

JernejL
  • JernejL

    Big Homie

  • Members
  • Joined: 11 Mar 2002

#12

Posted 12 June 2005 - 06:15 PM

QUOTE (Jarno @ Jun 10 2005, 18:16)
Sorry...

I'm not a newbie.
I have delphi for 2 years now.

But I'm newly to gamehacking sorry.

you have delphi for 2 years and don't know what is byte or a pointer?
what were you doing with delphi for all that time then?

Sobeit
  • Sobeit

    mta ninja

  • BUSTED!
  • Joined: 11 May 2004

#13

Posted 13 June 2005 - 02:21 AM

QUOTE (Delfi @ Jun 12 2005, 18:15)
QUOTE (Jarno @ Jun 10 2005, 18:16)
Sorry...

I'm not a newbie.
I have delphi for 2 years now.

But I'm newly to gamehacking sorry.

you have delphi for 2 years and don't know what is byte or a pointer?
what were you doing with delphi for all that time then?

Hello (everywordinthedictionary) biggrin.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users