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. Los Santos Tuners
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

      1. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

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

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

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

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. 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. Design Your Own Mission
      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
    1. Announcements

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

GTA San Andreas Mobile Modding


_CP_
 Share

Recommended Posts

On 5/3/2019 at 8:29 AM, XMDS said:

Android can't use CLEO4's Opcode, you can't directly use 0AF0-0AF5 to read and write the ini file.Android can only use the of the original Opcode+Android new Opcode:

0DD0=2,%1d% = get_label_addr %2p% ; android
0DD1=2,%1d% = get_func_addr_by_cstr_name %2d% ; android
0DD2=1,context_call_func %1d% ; android
0DD3=2,context_set_reg %1d% value %2d% ; android
0DD4=2,%1d% = context_get_reg %2d% ; android
0DD6=1,%1d% = get_game_version ; android
0DD7=1,%1d% = get_image_base ; android
0DD8=4,%1d% = read_mem_addr %2d% size %3d% add_ib %4d% ; android
0DD9=5,write_mem_addr %1d% value %2d% size %3d% add_ib %4d% protect %5d% ; android
0DDC=2,set_mutex_var %1d% to %2d% ; android
0DDD=2,%1d% = get_mutex_var %2d% ; android
0DE0=3,%1d% = get_touch_point_state %2d% mintime %3d% ; android
0DE1=5,%1d% = get_touch_slide_state from %2d% to %3d% mintime %4d% maxtime %5d% ; android
0DE2=1,%1d% = get_menu_button_state ; read opcode info before using ; android
0DE3=2,%1d% = get_menu_button_pressed mintime %2d% ; read opcode info before using ; android

 

If you want to read and write in the Android configuration ini file, you can use the function:

Use OpenFile to open the ini file

char CFileMgr::OpenFile(const char *path, const char *mode)

_ZN8CFileMgr8OpenFileEPKcS1_

 

Use ReadLine to read each line of the ini file:

char CFileMgr::ReadLine(FILESTREAM file, char *str, int num)

_ZN8CFileMgr8ReadLineEiPci

 

Use sscanf to read data:

int sscanf (const char *str, const char *format, ...);

 

Use strcasecmp to compare the key names in the ini file:

int strcasecmp (const char *s1, const char *s2);

 

Finally close the ini file:

int CFileMgr::CloseFile(FILESTREAM file)

 

 

You can use 0DD0-0DD1 to get the name of the function and get the address of the function.

Call this function with 0DD2, 0DD3 fills in the parameters, and 0DD4 accepts the return value of the function for judging

anyon please give me call ini scorce code

Link to post
Share on other sites

  • 2 weeks later...
Dr.  Prakamya Khare
On 12/17/2020 at 8:07 AM, Manithjaat said:

anyon please give me call ini scorce code

AS XMDS said , you need to understand Opcode 0DD0,0DD1,0DD3,0DD4 etc.

For example:-

 

char CFileMgr::OpenFile(const char *path, const char *mode)

 

 

this one is a hex string which is usually use to call functions from Shared object lib(.so) files.

 

_ZN8CFileMgr8OpenFileEPKcS1_

So we can use 0DD0 and 0DD1 to call function name:-

OpenFile("Name\\Example.ini","r")

 

After setting these parameters ,this function will read file "Example.ini" from folder "Name" which will be created inside the files folder.

 

Therefore, by encoding this Open file("Name\\Example.ini","r") into low level language (CLEO) we get

 the following opcodes:-

 

0DD0: [email protected] = get_lable @_ZN8CFileMgr8OpenFileEPKcS1_

0DD1: [email protected] = get_function [email protected]

 

:_ZN8CFileMgr8OpenFileEPKcS1_

hex

"_ZN8CFileMgr8OpenFileEPKcS1_" 00

end

 

 

Now , you have to set the parameters of the function which is file name and it's path, and read mode; 

Opcode 0DD3 is use to set the parameters of the functions and opcode 0DD2 is use to call a function after setting it's parameters.

 

Opcode 0DD4 is use to get a pointer to the function or we say return value.

 

After all our code will look like this:-

 

0DD0: [email protected] = get_lable @FileName

0DD0: [email protected] = get_lable @Mode

0DD3: set_parameter 0 value [email protected]

0DD3: set_parameter 1 value [email protected]

0DD2: call_function [email protected]

0DD4: [email protected] = get_pointer_at 0 // File ptr

 

 

:FileName

hex

"Name\\Example.ini" 00

end

 

:Mode

hex

"r" 00

end

 

Finally, after combining all steps our code will look  like this :-

 

{$CLEO .csa}

0000: NOP

 

// Function for opening the File

 

:OpenFile

0DD0: [email protected] = get_lable @_ZN8CFileMgr8OpenFileEPKcS1_

0DD1: [email protected] = get_function [email protected]

0DD0: [email protected] = get_lable @FileName

0DD0: [email protected] = get_lable @Mode

0DD3: set_parameter 0 value [email protected]

0DD3: set_parameter 1 value [email protected]

0DD2: call_function [email protected]

0DD4: [email protected] = get_pointer_at 0 // File pointer

if [email protected] == 0 // means file  or folder is not there

 end_thread

 

 

 

 

:_ZN8CFileMgr8OpenFileEPKcS1_

hex

"_ZN8CFileMgr8OpenFileEPKcS1_" 00

end

 

:FileName

hex

"Name\\Example.ini" 00

end

 

:Mode

hex

"r" 00

end

 

 

Apologies for my bad English! :).

Edited by Dr. Prakamya Khare
Link to post
Share on other sites

18 hours ago, Dr. Prakamya Khare said:

 

 

0DD0: [email protected] = get_lable @_ZN8CFileMgr8OpenFileEPKcS1_

0DD1: [email protected] = get_function [email protected]

 

:_ZN8CFileMgr8OpenFileEPKcS1_

hex

"_ZN8CFileMgr8OpenFileEPKcS1_" 00

end

 

I no longer recommend using the game's CFile class to manipulate file reading and writing.  In version 2.0 of the SA game, some CFile function names have been changed, such as "i" changed to "j".  Although the version judgment can solve this problem.  But I recommend using the standard functions fopen, fgets, and fclose in the C language to read and write files.  In addition, this method is still not the most effective way to read ini files.

 

In addition, in terms of understanding, I do not recommend that you modify the English descriptors of 0DD3 and 0DD4.  Because the parameter reg represents a register.  In addition, in Android GTA we can only call functions with 4 or less parameters.  Since the Android cleo library made by alex did not fully implement the 0DD2 OP, if you want to use a function with more than 4 parameters, you can use my 0DD2 repair script:

https://github.com/XMDS/OP_0DD2FixAsm_call.git

 

Edit:

I have some new research.  For example, add some new OP opcodes.  Since I have not installed the Android library, I will not write plugins.  Maybe I like cleo better.  Wesser boss often uses assembly code to add some OP in PC version of cleo.  This gave me inspiration, because I found that Android GTA has some blank spaces where new OPs can be added, injected through cleo assembly code

Edited by XMDS
  • Like 1
Link to post
Share on other sites

Dr.  Prakamya Khare
20 minutes ago, XMDS said:

I no longer recommend using the game's CFile class to manipulate file reading and writing.  In version 2.0 of the SA game, some CFile function names have been changed, such as "i" changed to "j".  Although the version judgment can solve this problem.  But I recommend using the standard functions fopen, fgets, and fclose in the C language to read and write files.  In addition, this method is still not the most effective way to read ini files.

 

In addition, in terms of understanding, I do not recommend that you modify the English descriptors of 0DD3 and 0DD4.  Because the parameter reg represents a register.  In addition, in Android GTA we can only call functions with 4 or less parameters.  Since the Android cleo library made by alex did not fully implement the 0DD2 OP, if you want to use a function with more than 4 parameters, you can use my 0DD2 repair script:

https://github.com/XMDS/OP_0DD2FixAsm_call.git

 

Edit:

I have some new research.  For example, add some new OP opcodes.  Since I have not installed the Android library, I will not write plugins.  Maybe I like cleo better.  Wesser boss often uses assembly code to add some OP in PC version of cleo.  This gave me inspiration, because I found that Android GTA has some blank spaces where new OPs can be added, injected through cleo assembly code

Okay , I changed the cleo definition to explain others  , but how it's affected the system since I have passed all parameters of the function and I think that changing English descriptor will not have any significant affect on the game, however I haven't make any script for GTA SA android for more than six months.

Adding new opcodes to the cleo assembly will requires a lot of calculations , trials and errors. Beside

all this, have you tested it? and is it working or not ? 

Link to post
Share on other sites

13 hours ago, XMDS said:

I no longer recommend using the game's CFile class to manipulate file reading and writing.  In version 2.0 of the SA game, some CFile function names have been changed, such as "i" changed to "j".  Although the version judgment can solve this problem.  But I recommend using the standard functions fopen, fgets, and fclose in the C language to read and write files.  In addition, this method is still not the most effective way to read ini files.

 

In addition, in terms of understanding, I do not recommend that you modify the English descriptors of 0DD3 and 0DD4.  Because the parameter reg represents a register.  In addition, in Android GTA we can only call functions with 4 or less parameters.  Since the Android cleo library made by alex did not fully implement the 0DD2 OP, if you want to use a function with more than 4 parameters, you can use my 0DD2 repair script:

https://github.com/XMDS/OP_0DD2FixAsm_call.git

 

Edit:

I have some new research.  For example, add some new OP opcodes.  Since I have not installed the Android library, I will not write plugins.  Maybe I like cleo better.  Wesser boss often uses assembly code to add some OP in PC version of cleo.  This gave me inspiration, because I found that Android GTA has some blank spaces where new OPs can be added, injected through cleo assembly code

Hi sir please explain this method for use this defined  Cvehicle _ZN6CPools15ms_pVehiclePoolE 

Please please help 

Hi sir please explain this method for use this defined  Cvehicle _ZN6CPools15ms_pVehiclePoolE 

Please please help 
Link to post
Share on other sites

On 1/1/2021 at 3:12 AM, Manithjaat said:

Hi sir please explain this method for use this defined  Cvehicle _ZN6CPools15ms_pVehiclePoolE 

Please please help 

Hi sir please explain this method for use this defined  Cvehicle _ZN6CPools15ms_pVehiclePoolE 

Please please help 

Use the vehicle pool to access the information of all vehicles created in the current game. Its usage is the same as the PC version.

 

For:

 

VehiclePool – Pointer to vehicle pool usage information, which contains:
+0 = Pointer to the first vehicle in the pool
+4 = Pointer to a byte map indicating which vehicles are in use
+8 = [dword] Maximum number of vehicles in the pool
+12 = [dword] Current number of vehicles in the pool

Edited by XMDS
  • Like 2
Link to post
Share on other sites

6 hours ago, XMDS said:

Use the vehicle pool to access the information of all vehicles created in the current game. Its usage is the same as the PC version.

 

For:

 

VehiclePool – Pointer to vehicle pool usage information, which contains:
+0 = Pointer to the first vehicle in the pool
+4 = Pointer to a byte map indicating which vehicles are in use
+8 = [dword] Maximum number of vehicles in the pool
+12 = [dword] Current number of vehicles in the pool

Hi sair please check this method 

I'm test but not work please help

 

Link to post
Share on other sites

6 minutes ago, Manithjaat said:

Hi sair please check this method 

I'm test but not work please help

 

{$CLEO .csi}

0000:
while true
wait 0

0DD0: [email protected] = get_label_addr @VehiclePool
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]
0DD8: [email protected] = read_mem_addr [email protected] size 4 fix_ib 0
000A: [email protected] += 0x4
0DD8: [email protected] = read_mem_addr [email protected] size 4 fix_ib 0
for [email protected] = 0 to 35584 step 0x100
0DD8: [email protected] = read_mem_addr [email protected] size 1 fix_ib 0
000A: [email protected] += 0x1
if and
0029: [email protected] >= 0x00
001B: 0x80 > [email protected]
then
005A: [email protected] += [email protected] // (int)
if
056E: car [email protected] defined
then  
020B: explode_car [email protected]
end
end
end
end // while

:VehiclePool
hex
"_ZN6CPools15ms_pVehiclePoolE" 00
end
:7
end_thread

Link to post
Share on other sites

19 hours ago, Manithjaat said:

Hi sir thanks to help

 

Edited by Manithjaat
Link to post
Share on other sites

Good afternoon. In the mobile version of GTA SA, there are many references in the code to features that were present in other versions of this game, but were cut out in the mobile version, for example: graininess, blur, etc. I would like to find out (judging by the topic, there are knowledgeable people sitting here) and probably even ask for help: is it possible to use Cleo to return these functions to the game? I will say this: I understand Cleo, but in the case of working with memory addresses, I get lost and practically do not understand anything about it. Please respond to those people who want to help me with this.

 

 

 

P.S. I use a translator, as I am not strong in English.

  • Bruh 1
Link to post
Share on other sites

I would also like to ask: does anyone else still have access to the source code of the SAAExten mod?) Previously, as I know, the code could be viewed in Google+, but now this social network does not exist, and along with this, the code has disappeared without a trace.

  • Bruh 1
Link to post
Share on other sites

On 12/6/2020 at 12:31 PM, Azan sanusi said:

You guys know how to restored removed song in v.1.08 or 2.00

A little earlier, I dealt with the topic of transferring cut songs to new versions of SA (1.08 and 2.00). To be honest, I didn't get any proper results. Radio stations after the return of tracks for some reason start to work incorrectly: the songs may break off, it is illogical to change quickly, or the radio may be completely silent and no longer turn on...

  • Bruh 1
Link to post
Share on other sites

On 1/3/2021 at 6:15 PM, XMDS said:

Wrong use of vehicle variables

Hi sir please help this opcode 0AB1: call_scm_func replase android opcode ? please tell me sir

Link to post
Share on other sites

On 1/3/2021 at 6:15 PM, XMDS said:

Wrong use of vehicle variables

Hi sir please explain call scm func method android ? Please help me

Link to post
Share on other sites

Azan sanusi
On 1/5/2021 at 1:18 PM, Raskul said:

A little earlier, I dealt with the topic of transferring cut songs to new versions of SA (1.08 and 2.00). To be honest, I didn't get any proper results. Radio stations after the return of tracks for some reason start to work incorrectly: the songs may break off, it is illogical to change quickly, or the radio may be completely silent and no longer turn on.

Use cleo, maybe work

Link to post
Share on other sites

On 1/3/2021 at 6:15 PM, XMDS said:

Wrong use of vehicle variables

Hi sir please help this opcode 0AB1: call_scm_func method Android 

Link to post
Share on other sites

@Manithjaat The OP of CLEO4 cannot be used on Android, and there is no OP similar to this command.  Call_scm_func (CLEO_CALl) is a command similar to gosub, but the difference is that it is more convenient than gosub. It jumps to a label for execution and substitutes the parameters into that label. The label is equivalent to a sub-thread, and its code and variables are not  Will affect the main thread.  Generally, it saves the amount of code and local variables, and it is very convenient to use when there is a lot of looping code.

 

For detailed explanation and usage of the OP, please check zaz's CLEO tutorial:

The op is not required. As long as you don't use it, and put the code of the subtag directly after your current code for execution (I said it is similar to the gosub command), but you may need to modify the variable.

In addition.  For CLEO questions, you should post the topic in the forum code area, not here.  And I won't provide you with any code help, because this is very basic.  You only need to view some CLEO tutorials and understand the role of 0AB1 and 0AB2.  You will only make me feel irritated by asking me repeatedly.

Edited by XMDS
Link to post
Share on other sites

On 12/30/2020 at 4:18 PM, Dr. Prakamya Khare said:

AS XMDS said , you need to understand Opcode 0DD0,0DD1,0DD3,0DD4 etc.

For example:-

 

char CFileMgr::OpenFile(const char *path, const char *mode)

 

 

this one is a hex string which is usually use to call functions from Shared object lib(.so) files.

 

_ZN8CFileMgr8OpenFileEPKcS1_

So we can use 0DD0 and 0DD1 to call function name:-

OpenFile("Name\\Example.ini","r")

 

After setting these parameters ,this function will read file "Example.ini" from folder "Name" which will be created inside the files folder.

 

Therefore, by encoding this Open file("Name\\Example.ini","r") into low level language (CLEO) we get

 the following opcodes:-

 

0DD0: [email protected] = get_lable @_ZN8CFileMgr8OpenFileEPKcS1_

0DD1: [email protected] = get_function [email protected]

 

:_ZN8CFileMgr8OpenFileEPKcS1_

hex

"_ZN8CFileMgr8OpenFileEPKcS1_" 00

end

 

 

Now , you have to set the parameters of the function which is file name and it's path, and read mode; 

Opcode 0DD3 is use to set the parameters of the functions and opcode 0DD2 is use to call a function after setting it's parameters.

 

Opcode 0DD4 is use to get a pointer to the function or we say return value.

 

After all our code will look like this:-

 

0DD0: [email protected] = get_lable @FileName

0DD0: [email protected] = get_lable @Mode

0DD3: set_parameter 0 value [email protected]

0DD3: set_parameter 1 value [email protected]

0DD2: call_function [email protected]

0DD4: [email protected] = get_pointer_at 0 // File ptr

 

 

:FileName

hex

"Name\\Example.ini" 00

end

 

:Mode

hex

"r" 00

end

 

Finally, after combining all steps our code will look  like this :-

 

{$CLEO .csa}

0000: NOP

 

// Function for opening the File

 

:OpenFile

0DD0: [email protected] = get_lable @_ZN8CFileMgr8OpenFileEPKcS1_

0DD1: [email protected] = get_function [email protected]

0DD0: [email protected] = get_lable @FileName

0DD0: [email protected] = get_lable @Mode

0DD3: set_parameter 0 value [email protected]

0DD3: set_parameter 1 value [email protected]

0DD2: call_function [email protected]

0DD4: [email protected] = get_pointer_at 0 // File pointer

if [email protected] == 0 // means file  or folder is not there

 end_thread

 

 

 

 

:_ZN8CFileMgr8OpenFileEPKcS1_

hex

"_ZN8CFileMgr8OpenFileEPKcS1_" 00

end

 

:FileName

hex

"Name\\Example.ini" 00

end

 

:Mode

hex

"r" 00

end

 

 

Apologies for my bad English! :).

Hi sir please Chick this cleo please 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com) on 14.12.2013
{$CLEO .csi}

//-------------MAIN---------------

0000: 
wait 5000 
:OpenFile
0DD0: [email protected] = get_lable @Noname_604 // _ZN8CFileMgr8OpenFileEPKcS1_
0DD1: [email protected] = get_function [email protected]
0DD0: [email protected] = get_lable @Noname_633 // FileName
0DD0: [email protected] = get_lable @Noname_648 // Mode
0DD3: set_parameter 1 value [email protected]
0DD3: set_parameter 1 value [email protected]
0DD2: call_function [email protected]
0DD4: [email protected] = get_pointer_at 1 // File pointer
if 
[email protected] == 1 // means file  or folder is not there
jf @Noname_99 
end_thread 

:Noname_99
0DD0: [email protected] = get_label_addr @Noname_876 
gosub @Noname_186 
gosub @Noname_395 
if and
  [email protected] == 0 
  [email protected] == 0 
jf @Noname_311 
0DD8: [email protected] = read_mem_addr [email protected] size 4 add_ib 0 
0DD9: write_mem_addr 3804004 value [email protected] size 4 add_ib 1 protect 1 // ZEROG
//01E5: show_text_1number_highpriority GXT 'LOW_38' number [email protected] time 5000 flag 1  // ~s~You need $~1~ to compete.
wait 5000 
end_thread 

:Noname_186
0DD0: [email protected] = get_label_addr @Noname_650 // _ZN8CFileMgr8ReadLineEiPci
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD0: [email protected] = get_label_addr @Noname_885 
0DD3: set_parameter 2 value 512 
0DD3: set_parameter 1 value [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = get_pointer_at 1
if 
   not [email protected] == 1 
jf @Noname_311 
0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0 
if and
   not [email protected] == 35 
   not [email protected] == 10 
   not [email protected] == 91 
jf @Noname_186 
return 

:Noname_311
0DD0: [email protected] = get_label_addr @Noname_677 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = get_pointer_at 1
if 
  [email protected] == 1
jf @Noname_311 
end_thread 

:Noname_395 //
0DD0: [email protected] = get_label_addr @Noname_812 
0DD0: [email protected] = get_label_addr @Noname_860 //

:Noname_415
0DD0: [email protected] = get_label_addr @Noname_791 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD0: [email protected] = get_label_addr @Noname_798 
0DD0: [email protected] = get_label_addr @Noname_821 
0DD0: [email protected] = get_label_addr @Noname_853 
0DD3: set_parameter 3 value [email protected] 
0DD3: set_parameter 2 value [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD2: context_call_func [email protected] 
0DD3: set_parameter 2 value [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD2: context_call_func [email protected] 
0DD0: [email protected] = get_label_addr @Noname_865 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = get_pointer_at 1
0DD0: [email protected] = get_label_addr @Noname_855 
0DD3: set_parameter 1 value [email protected] 
0DD3: set_parameter 1 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = get_pointer_at 0 File
return 


:Noname_604 
hex
"_ZN8CFileMgr8OpenFileEPKcS1_" 00
end

:Noname_633
hex
"TEST\Config.ini" 00
end

:Noname_648
hex
"r" 00
end
:Noname_876  
hex
"ACTIVATE" 00
end
:Noname_650 
hex
"_ZN8CFileMgr8ReadLineEiPci" 00
end
:Noname_885 
hex
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00
end
:Noname_677 
hex
"_ZN8CFileMgr9CloseFileEi" 00
end
:Noname_812 
hex
"%*s%*s%f" 00
end
:Noname_860 
hex
00 00 00 00 00 // Vallyou
end
:Noname_791 
hex
"sscanf" 00
end
:Noname_798 
hex
"%s%s" 00
end
:Noname_821 
hex
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
end
:Noname_853 
hex
00 00
end
:Noname_865  
hex
00 00 00 
end
:Noname_855 
hex
3D 00
end
 

Link to post
Share on other sites

On 12/30/2020 at 4:18 PM, Dr. Prakamya Khare said:

AS XMDS said , you need to understand Opcode 0DD0,0DD1,0DD3,0DD4 etc.

For example:-

 

char CFileMgr::OpenFile(const char *path, const char *mode)

 

 

this one is a hex string which is usually use to call functions from Shared object lib(.so) files.

 

_ZN8CFileMgr8OpenFileEPKcS1_

So we can use 0DD0 and 0DD1 to call function name:-

OpenFile("Name\\Example.ini","r")

 

After setting these parameters ,this function will read file "Example.ini" from folder "Name" which will be created inside the files folder.

 

Therefore, by encoding this Open file("Name\\Example.ini","r") into low level language (CLEO) we get

 the following opcodes:-

 

0DD0: [email protected] = get_lable @_ZN8CFileMgr8OpenFileEPKcS1_

0DD1: [email protected] = get_function [email protected]

 

:_ZN8CFileMgr8OpenFileEPKcS1_

hex

"_ZN8CFileMgr8OpenFileEPKcS1_" 00

end

 

 

Now , you have to set the parameters of the function which is file name and it's path, and read mode; 

Opcode 0DD3 is use to set the parameters of the functions and opcode 0DD2 is use to call a function after setting it's parameters.

 

Opcode 0DD4 is use to get a pointer to the function or we say return value.

 

After all our code will look like this:-

 

0DD0: [email protected] = get_lable @FileName

0DD0: [email protected] = get_lable @Mode

0DD3: set_parameter 0 value [email protected]

0DD3: set_parameter 1 value [email protected]

0DD2: call_function [email protected]

0DD4: [email protected] = get_pointer_at 0 // File ptr

 

 

:FileName

hex

"Name\\Example.ini" 00

end

 

:Mode

hex

"r" 00

end

 

Finally, after combining all steps our code will look  like this :-

 

{$CLEO .csa}

0000: NOP

 

// Function for opening the File

 

:OpenFile

0DD0: [email protected] = get_lable @_ZN8CFileMgr8OpenFileEPKcS1_

0DD1: [email protected] = get_function [email protected]

0DD0: [email protected] = get_lable @FileName

0DD0: [email protected] = get_lable @Mode

0DD3: set_parameter 0 value [email protected]

0DD3: set_parameter 1 value [email protected]

0DD2: call_function [email protected]

0DD4: [email protected] = get_pointer_at 0 // File pointer

if [email protected] == 0 // means file  or folder is not there

 end_thread

 

 

 

 

:_ZN8CFileMgr8OpenFileEPKcS1_

hex

"_ZN8CFileMgr8OpenFileEPKcS1_" 00

end

 

:FileName

hex

"Name\\Example.ini" 00

end

 

:Mode

hex

"r" 00

end

 

 

Apologies for my bad English! :).

Hi sir please chick this cleo 

{$CLEO .csa}

//-------------MAIN---------------
wait 5000 
wait 5000 
wait 5000 
0DD0: [email protected] = get_label_addr @Noname_604 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD0: [email protected] = get_label_addr @Noname_633 
0DD0: [email protected] = get_label_addr @Noname_648 
0DD3: context_set_reg 1 value [email protected] 
0DD3: context_set_reg 0 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = context_get_reg 0 
if 
  [email protected] == 0 
jf @Noname_99 
end_thread 

:Noname_99
0DD0: [email protected] = get_label_addr @Noname_876 
gosub @Noname_186 
gosub @Noname_395 
if and
  [email protected] == 0 
  [email protected] == 0 
jf @Noname_311 
0DD8: [email protected] = read_mem_addr [email protected] size 4 add_ib 0 
01E5: show_text_1number_highpriority GXT 'LOW_38' number [email protected] time 5000 flag 1  // ~s~You need $~1~ to compete.
wait 5000 
end_thread 

:Noname_186
0DD0: [email protected] = get_label_addr @Noname_650 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD0: [email protected] = get_label_addr @Noname_885 
0DD3: context_set_reg 2 value 512 
0DD3: context_set_reg 1 value [email protected] 
0DD3: context_set_reg 0 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = context_get_reg 0 
if 
   not [email protected] == 0 
jf @Noname_311 
0DD8: [email protected] = read_mem_addr [email protected] size 1 add_ib 0 
if and
   not [email protected] == 35 
   not [email protected] == 10 
   not [email protected] == 91 
jf @Noname_186 
return 

:Noname_311
0DD0: [email protected] = get_label_addr @Noname_677 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD3: context_set_reg 0 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = context_get_reg 0 
if 
  [email protected] == 0 
jf @Noname_311 
end_thread 

:Noname_395
0DD0: [email protected] = get_label_addr @Noname_812 
0DD0: [email protected] = get_label_addr @Noname_860 

:Noname_415
0DD0: [email protected] = get_label_addr @Noname_791 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD0: [email protected] = get_label_addr @Noname_798 
0DD0: [email protected] = get_label_addr @Noname_821 
0DD0: [email protected] = get_label_addr @Noname_853 
0DD3: context_set_reg 3 value [email protected] 
0DD3: context_set_reg 2 value [email protected] 
0DD3: context_set_reg 1 value [email protected] 
0DD3: context_set_reg 0 value [email protected] 
0DD2: context_call_func [email protected] 
0DD3: context_set_reg 2 value [email protected] 
0DD3: context_set_reg 1 value [email protected] 
0DD3: context_set_reg 0 value [email protected] 
0DD2: context_call_func [email protected] 
0DD0: [email protected] = get_label_addr @Noname_865 
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] 
0DD3: context_set_reg 1 value [email protected] 
0DD3: context_set_reg 0 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = context_get_reg 0 
0DD0: [email protected] = get_label_addr @Noname_855 
0DD3: context_set_reg 1 value [email protected] 
0DD3: context_set_reg 0 value [email protected] 
0DD2: context_call_func [email protected] 
0DD4: [email protected] = context_get_reg 0 
return 


:Noname_604 
hex
"_ZN8CFileMgr8OpenFileEPKcS1_" 00
end

:Noname_633
hex
"TEST\Config.ini" 00
end

:Noname_648
hex
"r" 00
end
:Noname_876  
hex
"ACTIVATE" 00
end
:Noname_650 
hex
"_ZN8CFileMgr8ReadLineEiPci" 00
end
:Noname_885 
hex
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00
end
:Noname_677 
hex
"_ZN8CFileMgr9CloseFileEi" 00
end
:Noname_812 
hex
"%*s%*s%f" 00
end
:Noname_860 
hex
00 00 00 00 00
end
:Noname_791 
hex
"sscanf" 00
end
:Noname_798 
hex
"%s%s" 00
end
:Noname_821 
hex
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
end
:Noname_853 
hex
00 00
end
:Noname_865  
hex
00 00 00 
end
:Noname_855 
hex
3D 00
end
Link to post
Share on other sites

BrainDeadRaven

Okay, so for something more in topic....

Android - trying to get a tattoo replaced with a downloaded one

- used Zarchiver to extract :

%\Data\texdb\player

-player.pvr.dat

-player.pvr.tmb

-player.pvr.toc

-player.txt

%\Data\texdb\txd

-everything in that folder

gta3.img

 

I've used TXD Tool to import/replace 6africa in both player.txt and txd.txt and rebuilt both

What am I missing? Why does it hate me?

 

Every time I test it, it still show's the old tattoo. I've tried a new game, same thing. I get it tattood to make sure, but yea, nothings changed.

 

Thank you for any response whatsoever.

 

Link to post
Share on other sites

BrainDeadRaven

Manithjaat,

 

You want someone to check the code, but it's not your code.

 

If your still at the point where your treating a car variable like an Int. then that code is way past what you need to mess with.

 

Baby steps. You, at this stage, have no chance of understanding the code you posted in there.

  • Like 1
Link to post
Share on other sites

3 hours ago, BrainDeadRaven said:

Okay, so for something more in topic....

Android - trying to get a tattoo replaced with a downloaded one

- used Zarchiver to extract :

%\Data\texdb\player

-player.pvr.dat

-player.pvr.tmb

-player.pvr.toc

-player.txt

%\Data\texdb\txd

-everything in that folder

gta3.img

 

I've used TXD Tool to import/replace 6africa in both player.txt and txd.txt and rebuilt both

What am I missing? Why does it hate me?

 

Every time I test it, it still show's the old tattoo. I've tried a new game, same thing. I get it tattood to make sure, but yea, nothings changed.

 

Thank you for any response whatsoever.

 

Try also replacing the "playerhi " cache - this should solve your problem.

Edited by Raskul
  • Like 1
Link to post
Share on other sites

BrainDeadRaven

didn't work...must be my importing settings when I'm doing the replacing, I have no idea what supposed to be checked and not, I'll test some more

Link to post
Share on other sites

17 hours ago, BrainDeadRaven said:

Okay, so for something more in topic....

Android - trying to get a tattoo replaced with a downloaded one

- used Zarchiver to extract :

%\Data\texdb\player

-player.pvr.dat

-player.pvr.tmb

-player.pvr.toc

-player.txt

%\Data\texdb\txd

-everything in that folder

gta3.img

 

I've used TXD Tool to import/replace 6africa in both player.txt and txd.txt and rebuilt both

What am I missing? Why does it hate me?

 

Every time I test it, it still show's the old tattoo. I've tried a new game, same thing. I get it tattood to make sure, but yea, nothings changed.

 

Thank you for any response whatsoever.

 

Brother this name textures for pc 6africa Android  name textures this name 6africa_tattcolor replase this textures same name to import and change textures in game ok

  • Like 1
Link to post
Share on other sites

17 hours ago, BrainDeadRaven said:

Manithjaat,

 

You want someone to check the code, but it's not your code.

 

If your still at the point where your treating a car variable like an Int. then that code is way past what you need to mess with.

 

Baby steps. You, at this stage, have no chance of understanding the code you posted in there.

Bro im allrady solve this problem and work my t'ts  code perfact and I'm new topci  post read ini file please help me this topic  

  • Bruh 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 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.