GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
SA Memory Example Topic - Page 2 EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
SA Memory Example Topic - Page 2 EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
SA Memory Example Topic - Page 2 EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
SA Memory Example Topic - Page 2 EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
SA Memory Example Topic - Page 2 EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
SA Memory Example Topic - Page 2 EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
SA Memory Example Topic - Page 2 EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
SA Memory Example Topic - Page 2 EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
SA Memory Example Topic - Page 2 EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



September 2024
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Calendar Calendar


You are not connected. Please login or register

SA Memory Example Topic

5 posters

Go to page : Previous  1, 2

Go down  Message [Page 2 of 2]

26SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Wed May 06, 2009 9:31 am

gtasbigfoot

gtasbigfoot
Admin




This script shows how to create a corona without using the opcode 04D5.


Code:

{$CLEO}
0000:

:Check_01
while 80E1: not  player 0 pressed_key 11
wait 0
end
0006: 32@ = 0
 
 
:Check_02
wait 0
if
  0019: 32@ > 4000
then
    jump @Check_01
end

for 0@ = 0 to 4
    0093: 1@ = integer 0@ to_float
    04C4: store_coords_to 2@ 3@ 4@ from_actor $PLAYER_ACTOR with_offset 0.0 1@ 0.0
    0085: 31@ = 0@ // (int)
    0012: 31@ *= -0x1F
    000A: 31@ += @corona   
    gosub 31@
end

jump @Check_02

:corona
hex
D504030200030300030400060000803F0404040005FF0005FF0005FF005100
D504030200030300030400060000803F0404040005FF0005FF0005FF005100
D504030200030300030400060000803F0404040005FF0005FF0005FF005100
D504030200030300030400060000803F0404040005FF0005FF0005FF005100
D504030200030300030400060000803F0404040005FF0005FF0005FF005100
end


Obtain a vertical angle of the camera





These codes/scripts are used to obtain a vertical angle of the camera, perhaps these codes are a little hard to understand for the newbie scripter's, though if you have much experience then you should able to understand, if you have a long-good look at the codes. These codes are for people who know how to use them, (or want to learn), the codes use the then..else..end, method 1 uses the ATAN mathematics script, the second uses a sub-script.

Method 1:


Code:

068D: get_camera_position_to 0@ 1@ 2@
068E: get_camera_target_point_to 3@ 4@ 5@
0509: 0@ = distance_between_XY 0@ 1@ and_XY 3@ 4@
0063: 5@ -= 2@ // (float)
0087: 1@ = 5@ // (float)
gosub @ATAN
000F: 2@ -= 270.0
//.......
 
:ATAN
0509: 2@ = distance_between_XY 0@ 1@ and_XY 0.0 0.0
0073: 0@ /= 2@ // (float)
0073: 1@ /= 2@ // (float)
0509: 2@ = distance_between_XY 0@ 1@ and_XY 0.0 1.0
for 3@ = 0 to 15
    0017: 2@ /= 2.0
    006B: 2@ *= 2@ // (float)
    0087: 1@ = 2@ // (float)
    0013: 2@ *= -1.0
    000B: 2@ += 1.0
    01FB: 2@ = square_root 2@
    0013: 2@ *= -1.0
    000B: 2@ += 1.0
    006B: 2@ *= 2@ // (float)
    005B: 2@ += 1@ // (float)
    01FB: 2@ = square_root 2@
end
0013: 2@ *= 65536.0
0017: 2@ /= 3.14159265
0013: 2@ *= 180.0
if
0021:  0@ > 0.0
then
    0013: 2@ *= -1.0
    000B: 2@ += 360.0
end
return


Method 2:


Code:

:ATAN                       
wait 3000
068D: get_camera_position_to 10@ 11@ 12@
068E: get_camera_target_point_to 27@ 28@ 29@
050A: 25@ = distance_between_XYZ 10@ 11@ 12@ and_XYZ 27@ 28@ 12@
050A: 24@ = distance_between_XYZ 27@ 28@ 12@ and_XYZ 27@ 28@ 29@
0013: 25@ *= 100.0
0013: 24@ *= 100.0
0073: 24@ /= 25@ // (float)            
0013: 24@ *= 100.0           
008E: 24@ = float 24@ to_integer
if
  0025:  12@ > 29@ // (float)
then
    0012: 24@ *= 0xFFFFFFFF
end 
gosub @SubScript                
045A: draw_text_1number 500.0 90.0 GXT 'NUMBER' number 0@  // degree draw
jump @ATAN


:SubScript 
if
0029:  24@ >= 92
then
    0007: 0@ = 45.0
    jump @SubScript02
end

if and
001B:  92 > 24@
0029:  24@ >= 77
then
    0007: 0@ = 40.0
    jump @SubScript02
end

if and
    001B:  77 > 24@
    0029:  24@ >= 64
then
0007: 0@ = 35.0
jump @SubScript02
end

if and
    001B:  64 > 24@
    0029:  24@ >= 52
then
0007: 0@ = 30.0
jump @SubScript02
end

if and
    001B:  52 > 24@
    0029:  24@ >= 42
then
0007: 0@ = 25.0
jump @SubScript02
end

if and
    001B:  42 > 24@
    0029:  24@ >= 32
then
0007: 0@ = 20.0
jump @SubScript02
end

if and
    001B:  32 > 24@
    0029:  24@ >= 22
then
0007: 0@ = 15.0
jump @SubScript02
end

if and
    001B: 22 > 24@
    0029: 24@ >= 13
then
0007: 0@ = 10.0
jump @SubScript02
end

if and
    001B:  13 > 24@
    0029:  24@ >= 5
then
0007: 0@ = 5.0
jump @SubScript02
end

if and                     
    001B:  5 > 24@
    0029:  24@ >= -5
then
0007: 0@ = 0.0
jump @SubScript02
end

if and
    001B: -5 > 24@
    0029: 24@ >= -13
then
0007: 0@ = -5.0
jump @SubScript02
end

if and
    001B: -13 > 24@
    0029:  24@ >= -22
then
0007: 0@ = -10.0
jump @SubScript02
end

if and
    001B: -22 > 24@
    0029: 24@ >= -32
then
0007: 0@ = -15.0
jump @SubScript02
end

if and
    001B:  -32 > 24@
    0029:  24@ >= -42
then
0007: 0@ = -20.0
jump @SubScript02
end

if and
    001B:  -42 > 24@
    0029:  24@ >= -52
then
0007: 0@ = -25.0
jump @SubScript02
end

if and
    001B:  -52 > 24@
    0029:  24@ >= -64
then
0007: 0@ = -30.0
jump @SubScript02
end

if and
    001B: -64 > 24@
    0029: 24@ >= -77
then
0007: 0@ = -35.0
jump @SubScript02
end

if and
    001B:  -77 > 24@
    0029:  24@ >= -92
then
0007: 0@ = -40.0
jump @SubScript02
end

if and
    001B:  -92 > 24@
    0029:  24@ >= -110
then
0007: 0@ = -45.0
jump @SubScript02
end

if and
    001B:  -110 > 24@
    0029:  24@ >= -131
then
0007: 0@ = -50.0
jump @SubScript02
end

if and
    001B:  -131 > 24@
    0029:  24@ >= -158
then
0007: 0@ = -55.0
jump @SubScript02
end

if and
    001B:  -158 > 24@
    0029:  24@ >= -194
then
0007: 0@ = -60.0
jump @SubScript02
end

if and
    001B:  -194 > 24@
    0029:  24@ >= -244
then
0007: 0@ = -65.0
jump @SubScript02
end

if and
    001B:  -244 > 24@
    0029:  24@ >= -324
then
0007: 0@ = -70.0
jump @SubScript02
end

if and
    001B:  -324 > 24@
    0029:  24@ >= -471
then
0007: 0@ = -75.0
jump @SubScript02
end

if and
    001B:  -471 > 24@
    0029:  24@ >= -860
then
0007: 0@ = -80.0
jump @SubScript02
end

if and
    001B:  -860 > 24@
    0029:  24@ >= -5575
then
0007: 0@ = -85.0
jump @SubScript02
end

if
001B: -5575 > 24@
then
    0007: 0@ = -90.0
jump @SubScript02
end

:SubScript02
if                   
  0023: 0.0 > 0@
then
    000B: 0@ += 360.0
end
008E: 0@ = float 0@ to_integer
return


http://gtamodding.com

27SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Mon Jun 01, 2009 1:52 am

Kotton



what's up big, ya freakn coding lunatic lol - hey, would you mind displaying an example of how we can change certain aspects of car handling via keypress? I'd like to create a manettino switch for my 599 - I've read the topic at gtamodding and know what memory address we use, but I'm still lacking the education I need to pull it off correctly

28SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Mon Jun 01, 2009 6:12 am

gtasbigfoot

gtasbigfoot
Admin



Да, sure I will explain it first, and then give some examples for you to copy.

Usually you can get the struct of the vehicle, and then write a value to it to edit such things. If you finished reading the article on GTAModding.com you should know if you get the start of the pointer (0xC2B9DC) and then add the desired value to this (by using opcode 0a8e). I don't know if I'm explaining it clear enough, but I think you will understand.

This script edits the turn mass of the vehicle when you press the "~Conversation no~" key.


Code:

{$CLEO}
0000:
while true
wait 250
  if
  00DF:  actor $PLAYER_ACTOR driving
  then
      if
          00E1:  player 0 pressed_key 11 // yes
      then
  03C0: 0@ = actor $PLAYER_ACTOR car
  0A97: 1@ = car 0@ struct
  1@ += 144
  0A8C: write_memory 1@ size 4 value 377.48384877 virtual_protect 0
      end
    end
end



This script makes your car very heavy, without editing the handling.cfg (slot 'mass'(B)):


Code:

{$CLEO}
0000:
while true
wait 250
  if
  00DF:  actor $PLAYER_ACTOR driving
  then
      if
          00E1:  player 0 pressed_key 10 // no
      then
  03C0: 0@ = actor $PLAYER_ACTOR car
  0A97: 1@ = car 0@ struct
  1@ += 140
  0A8C: write_memory 1@ size 4 value 40000.0 virtual_protect 0
      end
    end
end


Another example, this script reads the cars nitro state, this may be useful.


Code:

{$CLEO}
0000:

:Nitro_01
while true
wait 250
if
  Player.Defined($PLAYER_CHAR)
then
    if and
        $ONMISSION == 0
        Actor.Driving($PLAYER_ACTOR)
    then
          break
          end
    end
end


:Nitro_02
while true
wait 0
if
  Player.Defined($PLAYER_CHAR)
then
    break
    end
end
077E: get_active_interior_to 0@
    if and
        $ONMISSION == 0
        0@ == 0
        Actor.Driving($PLAYER_ACTOR)
    then
        03C0: 1@ = actor $PLAYER_ACTOR car
        096D: get_car 1@ car_component 8 on_slot 2@ // -- Nitro
    end


if
    8039:  not  2@ == 0xFFFFFFFF
then
    if
        Actor.InCar($PLAYER_ACTOR, 1@)
    then
        0A97: 3@ = car 1@ struct
        000A: 3@ += 2424
        0A8D: 4@ = read_memory 3@ size 1 virtual_protect 0
        03F0: enable_text_draw 1
        045A: text_draw_1number  250.0  40.0 'NUMBER' 4@   
            end
        end
jump @Nitro_02

:Nitro_03
01C3: remove_references_to_car 1@  // Like turning a car into any random car
jump @Nitro_01


While we are speaking of it, there is a useful thing on these kinds of address on a CLEO 3 Wiki it's in Japanese do not know if you can read it or not Grin Smile, if not then I think you can use some kind online-translation tool, though I have been told, there not perfect, I think Google is problay the best one, there machine-made translations, so it can't be perfect.

----

I hope that helped you a little. Peace. Grin Smile

http://gtamodding.com

29SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Mon Jun 01, 2009 9:46 am

Kotton



that helps A LOT, many thanks big- tho 1 thing I don't understand which you've explained is the byte identifier (and I think the Japanese wiki link explains as well) - I see you've used 140 for mass - and 144 for turn mass... but I'm not sure I understand how to do this

152 = CentreOfMass.z

158 = fTractionMultiplier

192 = Suspension lower limit

would this be correct? ..or am I way off base?

30SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Mon Jun 01, 2009 12:53 pm

gtasbigfoot

gtasbigfoot
Admin



Yes, you are indeed (kind of) correct.


CVehicle+140 = [float] Mass (kg) from handling.cfg
140=0x8Cなので、アドレスに0x8Cを足し、2@に値を格納します。(10進数で書いても問題ありません。)
このときのサイズは

[byte] …1byte 整数
[float]…4byte 少数
[word] …2byte 整数 word = 文字は2byte
[dword]…4byte 整数 double word = 2文字分 2*2=4byte

You see instead of getting the CVehicle address, adding the values to it, and then re-writing them, we can use the CLEO opcode instead, Seemann made these opcodes for this purpose (which is круто Good ).


Code:

0A96: 0@ = actor 1@ struct
0A97: 0@ = car 1@ struct
0A98: 0@ = object 1@ struct


... just make sure you use the correct number addresses, and very thing is OK.

Note: Ones from there GTAModding.com -> Selction #Handling, they do not start with CVehicle (opcode 0a97), 0xC2B9DC is Handling Block Start.

(I am speaking of these:)


0xC2B9DC - Handling Block Start. Each slot has 224 bytes of data.

* +0x0 = [dword] Index/Identifier
* +0x4 = fMass
* +0x8 = 1.0 / fMass
* +0xC = fTurnMass
* +0x10 = fDragMult
* +0x14 = CentreOfMass.x
* +0x18 = CentreOfMass.y
* +0x1C = CentreOfMass.z
* +0x20 = [byte] nPercentSubmerged
* +0x24 = fMass * 8.0000001e-1 / nPercentSubmerged
* +0x28 = fTractionMultiplier
* +0x74 = [byte] TransmissionData.nDriveType
* +0x75 = [byte] TransmissionData.nEngineType
* +0x76 = [byte] TransmissionData.nNumberOfGears
* +0x7C = TransmissionData.fEngineAcceleration (Multiplied by 3.9999999e-4)
* +0x80 = TransmissionData.fEngineInertia
* +0x84 = TransmissionData.fMaxVelocity (Multiplied by 5.5555599e-3)
* +0x94 = fBrakeDeceleration (Multiplied by 3.9999999e-4)
* +0x98 = fBrakeBias
* +0x9C = [byte] bABS
* +0xA0 = fSteeringLock
* +0xA4 = fTractionLoss
* +0xA8 = fTractionBias
* +0xAC = fSuspensionForceLevel
* +0xB0 = fSuspensionDampingLevel
* +0xB4 = fSuspensionHighSpdComDamp
* +0xB8 = Suspension upper limit
* +0xBC= Suspension lower limit
* +0xC0 = Suspension bias between front and rear
* +0xC4 = Suspension anti-dive multiplier
* +0xC8 = fCollisionDamageMultiplier (multiplier not yet found)
* +0xCC = [hex] modelFlags
* +0xD0 = [hex] handlingFlags
* +0xD4 = fSeatOffsetDistance
* +0xD8 = [dword] nMonetaryValue
* +0xDC = [byte] Front lights
* +0xDD = [byte] Rear lights
* +0xDE = [byte] Vehicle anim group

(I can not explain well what I mean.)

So they work differently ... but it's still easy as drinking some Vodka.




Last edited by gtasbigfoot on Tue Jun 02, 2009 10:20 am; edited 1 time in total

http://gtamodding.com

31SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Mon Jun 01, 2009 6:14 pm

Kotton



beautiful, thanks big.. and if I wanted to run a few of them in succession? would the following be correct?

Code:

:TINO_3
wait 250
00D6: if
00E1:  player 0 pressed_key 77
004D: jump_if_false @TINO_3
03C0: 0@ = actor $PLAYER_ACTOR car
0A97: 1@ = car 0@ struct
1@ += 192
0A8C: write_memory 1@ size 4 value 0.08 virtual_protect 0
0A97: 2@ = car 0@ struct
2@ += 152
0A8C: write_memory 2@ size 4 value 0.45 virtual_protect 0
0A97: 3@ = car 0@ struct
3@ += 158
0A8C: write_memory 3@ size 4 value -0.16 virtual_protect 0
gosub @ReadAddress
20@ -= 0xFFFFFD2C  // -- offset -724 (-0x2D4) 0xFFFFFD2C = @text1
gosub @CreateTextBox

32SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Tue Jun 02, 2009 12:50 am

gtasbigfoot

gtasbigfoot
Admin



2Kotton:

Yeah, one thing though I can see in the script 0xFFFFFD2C this is now useless, because when I used it before it depends on how big the script is, so now when you compile you script with this is will go to the offset -724, and because it's a different script the text may not be there (at that offset), so change this with the label of the text source.

For example:

Change:


Code:

20@ -= 0xFFFFFD2C


With:


Code:

20@ -= @Text1


Text source:


Code:

:Text1
hex
"Write a message here" 00
end


If you wanna use the hexadecimal offset to the text because it looks cool or whatever, first finish the script, when you like it, decompile it find all the offsets to the texts, and press in Sanny Builder Ctrl+h to coveter to hexadecimal, but Sanny Builder can off covert negative offsets, so put the mouse after the (-) sign, but that will not be the real ID, so what I do is I do it with Hex Workshop to get the real ID.

For example, say we want the offset -802 in its hexadecimal form.



Code:
 
Negative ID = -802
ID 802 in hexadecimal = -0x322
ID -802 in hexadecimal = 0xFFFFFCDE


Perhaps, I am just confusing, but I think you will understand.

http://gtamodding.com

33SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Tue Jun 02, 2009 1:25 am

Kotton



was wondering about that to.. k, I understand- thanks big

34SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Tue Aug 25, 2009 8:32 pm

Deji



No more green triangle when aiming at peds:

Code:
0A8C: write_memory 0x53E212 size 1 value 0x90 virtual_protect 1
0A8C: write_memory 0x53E20E size 4 value 0x90909090 virtual_protect 1

http://gtag.gtagaming.com

35SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Thu Aug 27, 2009 8:43 am

gtasbigfoot

gtasbigfoot
Admin



There is a template, that opens a custom IMG file, and
reads the models, so users can put there own models in with
the same .txd and .dff name.


Code:


{
-  An example of how to open custom IMG achive files to
-  check if models exist so users can put there own model in the file
  ~ Requires CLEO 3 ~
}

const
ArchiveFile = "CLEO\name.IMG"  // replace "name" with you're IMG-file name
end

0A99: chdir 0

if
  8AAB: not file_exists ArchiveFile // does this file exist?
then
    // no it does not
    gosub @GetIPAAddress
    000E: 0@ -= @NotExist
    gosub @CallBlackBox
    0A93: end_custom_thread
end


if
    8A9A: not 30@ = openfile ArchiveFile mode 0x6272 // yes, it does, open file to read
then
      gosub @GetIPAAddress
      000E: 0@ -= @UnableToRead
      gosub @CallBlackBox
      0A93: end_custom_thread
end

0A9D: readfile 30@ size 4 to 1@

// get number of files in the file
0A9D: readfile 30@ size 4 to 3@
0006: 2@ = 0
while true
0A9D: readfile 30@ size 4 to 1@
0A9D: readfile 30@ size 4 to 1@

// get entry`s name
0A9D: readfile 30@ size 16 to 26@
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0xB0
  for 24@ = 0 to 11
0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0
if
  0039: 1@ == 0x2E
then
    0A8C: write_memory 0@ size 4 value 0x00000000 virtual_protect 0
      break
    end
      000A: 0@ += 0xFFFFFFFF
end
if
    8039: not 24@ == 11
then


// open file again to match skins
if
    8A9A: not 31@ = openfile ArchiveFile mode 0x6272 // IF and SET
then
    gosub @GetIPAAddress
    000E: 0@ -= @UnableToRead
    gosub @CallBlackBox
    0A93: end_custom_thread
end

0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
// skip to current position
0006: 24@ = 0xFFFFFFFF
while true
if
  002D: 24@ >= 2@ // (int)
    then
    break
end

0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
000A: 24@ += 1
end

while true
0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
// get entry name
0A9D: readfile 31@ size 16 to 20@
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x98
  for 25@ = 0 to 11
0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0
if
  0039: 1@ == 0x2E
then
    0A8C: write_memory 0@ size 4 value 0x00000000 virtual_protect 0
    break
    end
    000A: 0@ += 0xFFFFFFFF
end
// and both exist?
if and
    003B: 20@ == 26@ // (int)
    003B: 21@ == 27@ // (int)
    003B: 22@ == 28@ // (int)
    003B: 23@ == 29@ // (int)
then
// yes, add entry to name list
gosub @GetIPAAddress
000E: 0@ -= @ListNames
  for 25@ = 0 to 15
    0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0
if
    0039: 1@ == 0x00
then
      0A8C: write_memory 0@ size 4 value 26@ virtual_protect 0
      000A: 0@ += 4
      0A8C: write_memory 0@ size 4 value 27@ virtual_protect 0
      000A: 0@ += 4
      0A8C: write_memory 0@ size 4 value 28@ virtual_protect 0
      000A: 0@ += 4
      0A8C: write_memory 0@ size 4 value 29@ virtual_protect 0
      break
    end
      000A: 0@ += 16
        end
    break
end

0A9D: readfile 31@ size 4 to 1@
0A9D: readfile 31@ size 4 to 1@
000A: 24@ += 1
if
    002D: 24@ >= 3@ // (int)
      then
      break
    end
end
    0A9B: closefile 31@
end
0A9D: readfile 30@ size 4 to 1@
0A9D: readfile 30@ size 4 to 1@
000A: 2@ += 1
if
    002D: 2@ >= 3@ // (int)
        then
  break
    end
end
0A9B: closefile 30@

// ... your job to continue now



:GetIPAAddress
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
return

:CallBlackBox
if
    0AA9: is_game_version_original  // v1.0?
then
    0AA5: call 0x00588BE0 num_params 4 pop 4 0 0 0 0@ // Да
else
    0AA5: call 0x005893B0 num_params 4 pop 4 0 0 0 0@ // Нет
end
return

:NotExist
hex
"~r~File \"cleo/myimg.img\" was not found. ~n~ Please check if you put this file in ~n~ your ~p~CLEO ~r~ folder." 00
end

:UnableToRead
hex
"~r~File \"cleo/myimg.img\" unable to read." 00
end


:ListNames
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0900: "____________"
0000: null-terminator




Pickup2Object

See GTAModding.com Article: http://www.gtamodding.com/index.php?title=Pickup_to_object




http://gtamodding.com

36SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Fri Sep 04, 2009 10:11 pm

Deji



Remove Game GUI


I'm not so good at this but I managed to find some ways to remove GUI stuff... There are gaps inbetween each one, though... I don't know what the stuff inbetween does.

Also, some of these don't work very well. 'Tis the best I could manage Razz

Code:
// Remove clock.
0@ = 361128
&0(0@,1i) = 1

Code:
// Remove fist icon.
0@ = 361129
&0(0@,1i) = 0

Code:
// Disable wanted stars.
0@ = 361133
&0(0@,1i) = 0

Code:
// Make weapon icon transparent.
0@ = 361132
&0(0@,1i) = 1

Code:
// Remove money count.
0@ = 361137
&0(0@,1i) = 0

Code:
// Remove health/armour/lung (etc) bars.
0@ = 361141
&0(0@,1i) = 0

Code:
// Makes the text boxes dissapear instantly.
0@ = 361152
&0(0@,1i) = 0

Code:
// Makes the text boxes NEVER show.
0@ = 361157
&0(0@,1i) = 0

Hopefully someone can provide a better list?

http://gtag.gtagaming.com

37SA Memory Example Topic - Page 2 Empty Re: SA Memory Example Topic Wed Sep 30, 2009 3:26 am

Deji



Disable IPL-Placed Stuff


Code:
// Disable IPL Pickups.
0A8C: write_memory 0x5B47B0 size 4 value 0xC3 virtual_protect 1
// Disable Some IPL Cars.
0A8C: write_memory 0x5B4740 size 4 value 0xC3 virtual_protect 1

The two addresses are close together, so if you do some experimenting with addresses around that area I'm sure you can disable more IPL-Created stuff, including the map... Maybe.

http://gtag.gtagaming.com

38SA Memory Example Topic - Page 2 Empty Hmm... Mon Oct 12, 2009 6:22 am

Adler



Does anyone know the addresses for showing text in 1.01 (high priority, text_styled etc)? Neutral

I'd also like to know what the address for the last_mission_passed for 1.0 and 1.01.

Thanks in advance. Very Happy

Sponsored content



Back to top  Message [Page 2 of 2]

Go to page : Previous  1, 2

Permissions in this forum:
You cannot reply to topics in this forum