Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

FrannDzs

How to find base memory addresses for samp 0.3.7?

Recommended Posts

FrannDzs
Posted (edited)

Hi, I want to modify the following script that works for samp 0.3dl so that it works on 0.3.7. Parazitas told me that I should only do a memory change but I can't find a way. Could someone help me with this?

 

http://ugbase.eu/index.php?threads/fastmap.14885/post-128263

 

{$CLEO .cs} 

0000: "MAP"

wait 8500 

if 
0AAB:   file_exists "CLEO\map.ini" 
then 
    0AF4: [email protected] = read_string_from_ini_file "cleo\map.ini" section "MAP" key "file" 
    0AF0: [email protected] = get_int_from_ini_file "cleo\map.ini" section "MAP" key "key" 
    0AF0: [email protected] = get_int_from_ini_file "cleo\map.ini" section "MAP" key "alpha" 
end

0390: load_txd_dictionary "MAP" 
038F: load_texture [email protected] as 1 // Load dictionary with 0390 first 
038F: load_texture "pla" as 2 // Load dictionary with 0390 first 
038F: load_texture "MAR" as 3 // Load dictionary with 0390 first 

while true
wait 0 

0AF0: [email protected] = get_int_from_ini_file "cleo\map.ini" section "MAP" key "toggle" 
0AB1: @HideAll 1 Status 0 // 1 - hide , 0 - not hide <<<>>> Hide chat, hud, radar...

if and
[email protected] == 1 // press key once - true 
0AB0: [email protected] 
then
    repeat
    wait 0
    until 8AB0: [email protected] // wait until key not pressed 
    0AB1:  0 [email protected] 
    if 
    [email protected] == 0 
    then
        if
        [email protected] == 0
        then
            [email protected] = 1
        else
            [email protected] = 0
        end
    else
        if 
        [email protected] == 1
        then 
            [email protected] = 0
        end  
    end
end

if and
[email protected] == 1 
[email protected] == 1 
then
    0AB1: @HideAll 1 Status 1 // 1 - hide , 0 - not hide <<<>>> Hide chat, hud, radar... 
    0AB1: @DrawMap 1 _MapTransparentValue: Alpha [email protected] 
else
    if and
    [email protected] == 0  // press key once - false
    0AB0: [email protected] 
    then 
        0AB1:  0 [email protected] 
        if 
        [email protected] == 0 
        then
            0AB1:  @HideAll 1 Status 1 // 1 - hide , 0 - not hide <<<>>> Hide chat, hud, radar... 
            0AB1: @DrawMap 1 _MapTransparentValue: Alpha [email protected] 
        end
    end
end

end

:DrawMap
03F0: enable_text_draw 1 
03E3: set_texture_to_be_drawn_antialiased 1 
038D: draw_texture 1 position 320.0 224.0 size 448.0 448.0 RGBA 255 255 255 [email protected] 
0AB1: @RacingCheckPoint 0 [email protected] [email protected] [email protected] 
if and
not [email protected] == 0.0 
not [email protected] == 0.0 
then
    gosub @Drawbox 
end

0A8D: [email protected] = read_memory 0xC7DEEA size 1 virtual_protect 0  /// is marker active?
if 
[email protected] == 1 
then
    0AB1: @CheckPointOrRedMarker 0 [email protected] [email protected] [email protected] 
    if and
    not [email protected] == 0.0 
    not [email protected] == 0.0 
    then
        gosub @Drawbox  
    end
end

Actor.StorePos($PLAYER_ACTOR, [email protected][email protected][email protected])
[email protected] = Actor.Angle($PLAYER_ACTOR)
[email protected] -= 180.0 
[email protected] *= -1.0 
[email protected] = 2 
gosub @DrawTexture /// my position

if 
0AB6: store_target_marker_coords_to [email protected] [email protected] [email protected] // IF and SET 
then
    [email protected] = 3 
    [email protected] = 0 
    gosub @DrawTexture
end
0AB2: 0 
            
:Drawbox
[email protected] /= 13.4 
[email protected] += 320.0 
[email protected] /= -13.4 
[email protected] += 224.0 
03F0: enable_text_draw 1 
03E3: set_texture_to_be_drawn_antialiased 1 
038E: draw_box_position [email protected] [email protected] size 6.0 6.0 RGBA 0 0 0 255 
038E: draw_box_position [email protected] [email protected] size 5.0 5.0 RGBA 255 0 0 255 
return 

:DrawTexture
[email protected] /= 13.4 
[email protected] += 320.0 
[email protected] /= -13.4 
[email protected] += 224.0 
03F0: enable_text_draw 0 
03E3: set_texture_to_be_drawn_antialiased 1 
074B: draw_texture [email protected] position [email protected] [email protected] scale 10.0 10.0 angle [email protected] color_RGBA 255 255 255 255 
return 

:RacingCheckPoint
[email protected] = 9999.0
for [email protected] = 0 to 31
    0085: [email protected] = [email protected] // (int) 
    [email protected] *= 0x38
    [email protected] += 0xC7F158 
    [email protected] += 0x10 
    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
    [email protected] += 0x4 
    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
    [email protected] += 0x4 
    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
    Actor.StorePos($PLAYER_ACTOR, [email protected][email protected][email protected])
    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected] 
    if 
    0025:   [email protected] > [email protected] // (float) 
    then
        0087: [email protected] = [email protected] // (float) 
        0087: [email protected] = [email protected] // (float) 
        0087: [email protected] = [email protected] // (float) 
        0087: [email protected] = [email protected] // (float) 
    end
end
0AB2: 3 [email protected] [email protected] [email protected] 

:CheckPointOrRedMarker
[email protected] = 0xC7DD58 
for [email protected] = 0 to 32
    0085: [email protected] = [email protected] // (int) 
    [email protected] *= 0xA0 
    0A8E: [email protected] = [email protected] + [email protected] // int 
    0A8E: [email protected] = [email protected] + 0x30 // int 
    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
    0A8E: [email protected] = [email protected] + 0x34 // int 
    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
    0A8E: [email protected] = [email protected] + 0x38 // int 
    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
    if and
    not [email protected] == 0.0 
    not [email protected] == 0.0 
    then
        if or
        [email protected] == 1099.551 
        [email protected] == 1601.497 
        [email protected] == 11.44687 
        [email protected] == 2695.624 
        [email protected] == -1704.688 
        [email protected] == 10.844 
        then
            BREAK
        end
    end
end
0AB2: 3 [email protected] [email protected] [email protected] 

:HideAll
{    
    0.3.DL 
    Hide chat, hud, radar...
    0AB1: @HideAll 1 status 0 
}
0AA2: [email protected] = "samp.dll" 
[email protected] += 0x2ACA10
0A8D: [email protected] = readMem [email protected] sz 4 vp 0 
[email protected] += 8 
if 
[email protected] == 1 
then
    0A8C: writeMem [email protected] sz 4 vl 0 vp 1 
else
    0A8C: writeMem [email protected] sz 4 vl 2 vp 1 
end
0AB2: 0


{    
    0.3.DL 
    Hide chat, hud, radar...
    0AB1: @ChatOpen 0 [email protected] 
}
0AA2: [email protected] = "samp.dll"
[email protected] += 0x2ACA14
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x14E0
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
0AB2: 1 [email protected] 

Edited by FrannDzs

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)

I don't understand what you are working with, but I have a suggestion that might help you make some progress.

 

0AA2: [email protected] = "samp.dll"
[email protected] += 0x2ACA14
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x14E0
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
0AB2: 1 [email protected] 

First with 0.3dl installed because you have the proper offsets, then try to repeat with 0.3.7.

 

View active process memory with a tool like HxD. Execute a script with just 0AA2: [email protected] = "samp.dll" and display the value or store it someplace where you can read it. Go to that offset in process memory, then go to +0x2ACA14 from that offset, and see if you can figure out the structure of the surrounding data well enough recognize the same data in the updated version. Repeat the process at another +0x14E0. 

If you've got a decompiler or something that can analyse samp.dll in more detail you might be able to find the new offsets without having to figure out what you are looking at in hex.

Edited by OrionSR
  • Like 1

Share this post


Link to post
Share on other sites
FrannDzs
8 hours ago, OrionSR said:

I don't understand what you are working with, but I have a suggestion that might help you make some progress.

 

0AA2: [email protected] = "samp.dll"
[email protected] += 0x2ACA14
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x14E0
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
0AB2: 1 [email protected] 

First with 0.3dl installed because you have the proper offsets, then try to repeat with 0.3.7.

 

View active process memory with a tool like HxD. Execute a script with just 0AA2: [email protected] = "samp.dll" and display the value or store it someplace where you can read it. Go to that offset in process memory, then go to +0x2ACA14 from that offset, and see if you can figure out the structure of the surrounding data well enough recognize the same data in the updated version. Repeat the process at another +0x14E0. 

If you've got a decompiler or something that can analyse samp.dll in more detail you might be able to find the new offsets without having to figure out what you are looking at in hex.

Hi, thanks for your reply and suggestions, I really appreciate them. What I want to do is make it work in 0.3.7, because it is made for 0.3DL, it seems simple, doesn't it? but not for me. I'll try something with what he said, thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.