Quantcast

Jump to content

» «
Photo

Move Radar

5 replies to this topic
direstraits
  • direstraits

  • Members
  • Joined: 08 Mar 2011
  • Portugal

#1

Posted 21 August 2013 - 11:20 PM

Hi.

Is there a way to move the radar position using a cleo script? For San Andreas.

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#2

Posted 22 August 2013 - 02:11 AM

Remember to relocate a value to new location stored in CLEO script and replacing references to this value.

0x858A10 [float] - X position, radar left corner of map part, relative to left side of screen
0x866B70 [float] - Y position, radar top corner of map part, relative to bottom of screen

As already written - relocate references to point into new location of CLEO script memory where is your value, you have to do it.

direstraits
  • direstraits

  • Members
  • Joined: 08 Mar 2011
  • Portugal

#3

Posted 22 August 2013 - 11:45 AM

Thanks for the reply and the memory address, but I'm not a good cleo scripter. Can you show a script? Because I only know the most basic things in cleo.

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#4

Posted 22 August 2013 - 11:59 AM

Sorry, i can't. I have no access to my primary PC at the moment.
Use IDA Pro and IDB to find where are pointers to these 2 float values and point them to CLEO script

CODE
:Radar_Pos_X
hex
00 00 00 00
end
:Radar_Pos_Y
hex
00 00 00 00
end


Can't you simply use Interface Editor made by Alexander Blade?

Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer.

  • Feroci Racing
  • Joined: 19 Aug 2006
  • Unknown

#5

Posted 22 August 2013 - 12:39 PM Edited by Wesser, 22 August 2013 - 12:43 PM.

If you don't know how to practicing what fastman stated, take this script which enables you to move all the related radar components:
CODE

{$CLEO}

0000: NOP

const
   fRadarLeft                        = 1@
   fRadarTop                         = 2@
   fRadarWidth                       = 3@
   fRadarHeight                      = 4@
   fRadarRingPlaneHorzPad            = 5@
   fRadarRingPlaneVertPad            = 6@
   fAltimeterRadarLeft               = 7@
   fAltimeterRadarTop                = 8@
   fAltimeterRadarHeight             = 9@
   fAltimeterVertBarLeftMostRadarPos = 10@
   fAltimeterVertBarLeftRadarPos     = 11@
   fAltimeterHorzBarLeftMostRadarPos = 12@
   fAltimeterHorzBarLeftRadarPos     = 13@
   fAltimeterHorzBarHeight           = 14@
   fRadarDiscHorzMargin              = 15@
   fRadarDiscVertMargin              = 16@
end

0A9F: 0@ = current_thread_pointer
0@ += 0x10 // CScriptThread.m_iBaseAddress
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0@ -= @HudRadarAndComponentsCoords
0085: fRadarLeft = 0@
0A8E: fRadarTop = 0@ + 0x04
0A8E: fRadarWidth = 0@ + 0x08
0A8E: fRadarHeight = 0@ + 0x0C
0A8E: fRadarRingPlaneHorzPad = 0@ + 0x10
0A8E: fRadarRingPlaneVertPad = 0@ + 0x14
0A8E: fAltimeterRadarLeft = 0@ + 0x18
0A8E: fAltimeterRadarTop = 0@ + 0x1C
0A8E: fAltimeterRadarHeight = 0@ + 0x20
0A8E: fAltimeterVertBarLeftMostRadarPos = 0@ + 0x24
0A8E: fAltimeterVertBarLeftRadarPos = 0@ + 0x28
0A8E: fAltimeterHorzBarLeftMostRadarPos = 0@ + 0x2C
0A8E: fAltimeterHorzBarLeftRadarPos = 0@ + 0x30
0A8E: fAltimeterHorzBarHeight = 0@ + 0x34
0A8E: fRadarDiscHorzMargin = 0@ + 0x38
0A8E: fRadarDiscVertMargin = 0@ + 0x3C

// Map and sprites position relative to the radar rectangle.
0A8C: write_memory 0x005834C2 size 4 value fRadarWidth virtual_protect 1
0A8C: write_memory 0x005834D4 size 4 value fRadarLeft virtual_protect 1
0A8C: write_memory 0x005834F6 size 4 value fRadarHeight virtual_protect 1
0A8C: write_memory 0x00583500 size 4 value fRadarTop virtual_protect 1
// Radar ring plane rectangle.
0A8C: write_memory 0x0058A449 size 4 value fRadarWidth virtual_protect 1
0A8C: write_memory 0x0058A453 size 4 value fRadarRingPlaneHorzPad virtual_protect 1
0A8C: write_memory 0x0058A469 size 4 value fRadarLeft virtual_protect 1
0A8C: write_memory 0x0058A47D size 4 value fRadarHeight virtual_protect 1
0A8C: write_memory 0x0058A489 size 4 value fRadarRingPlaneVertPad virtual_protect 1
0A8C: write_memory 0x0058A499 size 4 value fRadarTop virtual_protect 1
// Altimeter rectangle.
0A8C: write_memory 0x0058A5E2 size 4 value fAltimeterRadarLeft virtual_protect 1
0A8C: write_memory 0x0058A5F0 size 4 value fAltimeterVertBarLeftMostRadarPos virtual_protect 1
0A8C: write_memory 0x0058A60E size 4 value fAltimeterRadarTop virtual_protect 1
0A8C: write_memory 0x0058A620 size 4 value fAltimeterVertBarLeftRadarPos virtual_protect 1
0A8C: write_memory 0x0058A632 size 4 value fAltimeterRadarHeight virtual_protect 1
0A8C: write_memory 0x0058A6E6 size 4 value fAltimeterRadarLeft virtual_protect 1
0A8C: write_memory 0x0058A6F2 size 4 value fAltimeterHorzBarLeftMostRadarPos virtual_protect 1
0A8C: write_memory 0x0058A70E size 4 value fAltimeterRadarHeight virtual_protect 1
0A8C: write_memory 0x0058A71E size 4 value fAltimeterRadarTop virtual_protect 1
0A8C: write_memory 0x0058A759 size 4 value fAltimeterHorzBarLeftRadarPos virtual_protect 1
0A8C: write_memory 0x0058A767 size 4 value fAltimeterHorzBarHeight virtual_protect 1
// Upper-left radar disc rectangle.
0A8C: write_memory 0x0058A79B size 4 value fRadarLeft virtual_protect 1
0A8C: write_memory 0x0058A7A9 size 4 value fRadarDiscHorzMargin virtual_protect 1
0A8C: write_memory 0x0058A7C7 size 4 value fRadarTop virtual_protect 1
0A8C: write_memory 0x0058A7D9 size 4 value fRadarDiscVertMargin virtual_protect 1
0A8C: write_memory 0x0058A7E9 size 4 value fRadarWidth virtual_protect 1
0A8C: write_memory 0x0058A801 size 4 value fRadarHeight virtual_protect 1
// Upper-right radar disc rectangle.
0A8C: write_memory 0x0058A836 size 4 value fRadarLeft virtual_protect 1
0A8C: write_memory 0x0058A840 size 4 value fRadarWidth virtual_protect 1
0A8C: write_memory 0x0058A848 size 4 value fRadarDiscHorzMargin virtual_protect 1
0A8C: write_memory 0x0058A868 size 4 value fRadarTop virtual_protect 1
0A8C: write_memory 0x0058A87A size 4 value fRadarDiscVertMargin virtual_protect 1
0A8C: write_memory 0x0058A8AB size 4 value fRadarHeight virtual_protect 1
// Lower-left radar disc rectangle.
0A8C: write_memory 0x0058A8E9 size 4 value fRadarLeft virtual_protect 1
0A8C: write_memory 0x0058A8F9 size 4 value fRadarDiscHorzMargin virtual_protect 1
0A8C: write_memory 0x0058A913 size 4 value fRadarTop virtual_protect 1
0A8C: write_memory 0x0058A921 size 4 value fRadarHeight virtual_protect 1
0A8C: write_memory 0x0058A92D size 4 value fRadarDiscVertMargin virtual_protect 1
0A8C: write_memory 0x0058A943 size 4 value fRadarWidth virtual_protect 1
// Lower-right radar disc rectangle.
0A8C: write_memory 0x0058A98A size 4 value fRadarLeft virtual_protect 1
0A8C: write_memory 0x0058A99D size 4 value fRadarWidth virtual_protect 1
0A8C: write_memory 0x0058A9AB size 4 value fRadarDiscHorzMargin virtual_protect 1
0A8C: write_memory 0x0058A9C7 size 4 value fRadarTop virtual_protect 1
0A8C: write_memory 0x0058A9D5 size 4 value fRadarHeight virtual_protect 1
0A8C: write_memory 0x0058A9E1 size 4 value fRadarDiscVertMargin virtual_protect 1
// Radar searchlight maximum width?
0A8C: write_memory 0x0058781B size 4 value fRadarWidth virtual_protect 1

0A93: end_custom_thread

:HudRadarAndComponentsCoords
hex
   00002042 // ( 40.0f) fRadarLeft
   0000D042 // (104.0f) fRadarTop
   0000BC42 // ( 94.0f) fRadarWidth
   00009842 // ( 76.0f) fRadarHeight
   00009041 // ( 18.0f) fRadarRingPlaneHorzPad
   00009041 // ( 18.0f) fRadarRingPlaneVertPad
   00002042 // ( 40.0f) fAltimeterRadarLeft
   0000D042 // (104.0f) fAltimeterRadarTop
   00009842 // ( 76.0f) fAltimeterRadarHeight
   0000A041 // ( 20.0f) fAltimeterVertBarLeftMostRadarPos
   00002041 // ( 10.0f) fAltimeterVertBarLeftRadarPos
   0000C841 // ( 25.0f) fAltimeterHorzBarLeftMostRadarPos
   0000A040 // (  5.0f) fAltimeterHorzBarLeftRadarPos     // Unscaled, R* bug.
   00000040 // (  2.0f) fAltimeterHorzBarHeight           // Unscaled, R* bug.
   00008040 // (  4.0f) fRadarDiscHorzMargin
   00008040 // (  4.0f) fRadarDiscVertMargin
end

To convert floating-point values to a 4-byte hexdecimal or viceversa use this online converter and reverse each byte.

direstraits
  • direstraits

  • Members
  • Joined: 08 Mar 2011
  • Portugal

#6

Posted 22 August 2013 - 12:42 PM

Interface Editor is buggy to me, And I don't know how use IDA Pro or IDB.

But thanks for your efforts even when you are away from the main computer. I know you can do this, I never doubted.

EDIT : Wesser replied. LOL




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users