Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      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. Grand Theft Auto Series

      1. Bugs*
      2. 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. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. 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. Red Dead Redemption 2

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

    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

    2. Forum Support

    3. Suggestions

trainer, mod menu base for gta sa + gta vc for modmakers


Sanmodder
 Share

Recommended Posts

Hello

I see a lot of interest in my previous menu enter of 180 people

I've decided to do one, but less complicated this time

benefits
very easy base
100%, stable
works on smaller versions of cleo
works on 2 gta sa and gta vc games

note the options you need to write in the fxt file as you want to use in gta vc
because cleo for gta vc does not support 0adf: opcode unless

easy see

#fxt for test menu

ite1 menu test
item1 option 1
item2 option 2
item3 option 3
item4 option 4
item5 option 5

note, the menu is on 5 options
options are added from line 0146 to line 0166 in the editor eg sanny builder
but this is just info for novices

attention
base, not tested in gta vc because I have no way to check
but you have guarantees that 100% works in gta sa
I can only tell you that I compile easily on gta vc

and find this error if compiled on gta vc
because i dont have gta vc ;(

00000256 & 1: [033F] SET_TEXT_SCALE 0.3 0.8
00000268 & 1: [033E] DISPLAY_TEXT 23.0 80.0 "đ ÷"

033E: text_draw 32.0 302.0 'HOTR_19' // vc

033E: set_draw_text_position 320.0 180.333 GXT 'BJ_PUSH' // sa

033F: set_text_draw_letter_size 0.3 0.8
hex
  02 00 49 54 45 31 00 00 73 5F <- error
end

dont worries see gta vc and gta sa have the same opcode on draw text
it will work for you

if you find text bugs in gta vc add this opcodes

0341: set_text_draw_align_justify 1
0342: set_text_draw_centered 0
0343: set_text_linewidth 500.0
0348: set_text_draw_proportional 1
03E4: set_text_draw_align_right 0
in gta sa work
without this opcodes

see photo 100% real

49592421_367638070729240_858308063164943

source

{$CLEO .cs}

//-------------MAIN---------------
0000:  
 
const
items   = 1@
pos_y   = 2@
pos_x   = 3@
spacing = 4@
count   = 0@
pad_x   = 5@
pad_y   = 6@
pad_sx  = 7@
pad_sy  = 8@
catch   = 9@
r       = 10@
g       = 11@
b       = 12@
a       = 13@
fstate  = 14@
end
var 
count:int
items:int
pos_y:float
spacing:float   
end

:start
repeat
repeat
wait 0 
until if Player.Defined($PLAYER_CHAR)
until if 00E1:   player 0 pressed_button 7 // pad r1 pc E
Player.CanMove($PLAYER_CHAR) = False
items = 1 //first items
fstate = false //pulse state


while true
    wait 0
    pos_y = 80.0 //screen position y up or down
    pos_x = 23.0 //screen position x left or right
    spacing = 10.0 //screen text spacing 10.0 min 
    r = 200 //option selector red
    g = 0 //option selector green
    b = 0 //option selector blue
    for count = 0 to 5 step 1
        //pulse selector func
        if fstate == false
        then
            if not a >= 255 //alpha
            then a += 1
            else fstate = true
            end
        end
        if fstate == true
        then
            if a > 1         
            then a -= 1         
            else fstate = false
            end                 
        end
        //logo                                                         
        if count == 0                                                                 
        then                                                                       
            033F: set_text_draw_letter_width_height 0.3 0.8                        
            033E: text_draw pos_x pos_y 'ite1'                                        
        end
        //selector func
        0340: set_text_draw_color 255 255 255 255 //text color white
        if count == items
        then 0340: set_text_draw_color r g b a //mark actual options 
        end
        //options info                                                                        
        if count == 1                                                                 
        then                                                                       
            033F: set_text_draw_letter_width_height 0.3 0.8
            033E: text_draw pos_x pos_y 'item1'
        end                                                                        
        if count == 2                                                                 
        then                                                                       
                                        
            033F: set_text_draw_letter_width_height 0.3 0.8                        
            033E: text_draw pos_x pos_y 'item2'                                         
        end                                                                        
        if count == 3                                                                 
        then                                                                       
                                    
            033F: set_text_draw_letter_width_height 0.3 0.8                        
            033E: text_draw pos_x pos_y 'item3'                                         
        end                                                                        
        if count == 4                                                                 
        then                                                                       
                                 
            033F: set_text_draw_letter_width_height 0.3 0.8                        
            033E: text_draw pos_x pos_y 'item4'                                        
        end                                                                        
        if count == 5                                                                 
        then                                                                       
                                     
            033F: set_text_draw_letter_width_height 0.3 0.8                        
            033E: text_draw pos_x pos_y 'item5'                                        
        end
        pos_y += spacing                                                                        
    end                                                                            
    03F0: enable_text_draw 0                                                       
    0494: get_joystick 0 data_to pad_x pad_y pad_sx pad_sy
    //scroll dpad down                                       
    if and                                                                         
      pad_y > 0 // integer values                                                     
    80E1:   not player 0 pressed_button 16
    catch == false                                         
    then catch = true                                                                            
        if items >= 5                                                                  
        then items = 1                                                                
        else items++                                                                  
            018C: play_sound 16 at 0.0 0.0 0.0 //scroll audio                                         
        end                                                                        
    end
    //scroll dpad up                                                                             
    if and                                                                         
      0 > pad_y // integer values                                                     
    80E1:   not player 0 pressed_button 16
    catch == false                                            
    then catch = true                                                                          
        if 1 >= items                                                                  
        then items = 5                                                                
        else items--                                                                  
            018C: play_sound 16 at 0.0 0.0 0.0 //scroll audio                                    
        end                                                                        
    end
    //exit menu                                                                            
    if 00E1:   player 0 pressed_button 15                                          
    then                                                                           
        Player.CanMove($PLAYER_CHAR) = True                                        
        03F0: enable_text_draw 0
        goto @start                                                   
    end
    //command func                                                                            
    if and
        00E1:   player 0 pressed_button 16 //accept options
        catch == false                                           
    then catch = true
        ///case                                                                            
        if items == 1                                                                 
        then                                                                       
            
        end                                                                        
        if items == 2                                                                 
        then                                                                       
                                                                                   
        end                                                                        
        if items == 3                                                                 
        then                                                                       
                                                                                   
        end                                                                        
        if items == 4                                                                 
        then                                                                       
                                                                                   
        end                                                                        
        if items == 5                                                                 
        then                                                                       
                                                                                   
        end
        //key state 
        else if and
            80E1:   not player 0 pressed_button 16
            not 0 > pad_y // integer values 
            not pad_y > 0 // integer values   
        then catch = false
        end                                                                         
    end                                                                            
end

understand

have fun :happy:
welcome comments

Edited by Sanmodder
added info
Link to comment
Share on other sites

Kucing.Bertelur

 

{$CLEO .csi}
     jump @Const
     0000:
     :_ZN15CTouchInterface14m_vecCachedPosE 
     hex
       "_ZN15CTouchInterface14m_vecCachedPosE" 00
     end          
     :_Z18OS_ScreenGetInchesv
     hex
       "_Z18OS_ScreenGetInchesv" 00
     end          
     :_Z17OS_ScreenGetWidthv
     hex
       "_Z17OS_ScreenGetWidthv" 00
     end
     :_Z18OS_ScreenGetHeightv 
     hex
       "_Z18OS_ScreenGetHeightv" 00        
     end               
         :Const
            const
               0GetAddr            =  [email protected]
               PositionBix_X       =  [email protected]
               PositionBix_Y       =  [email protected]
               SizeBox_X           =  [email protected]
               SizeBox_Y           =  [email protected]
               GetSCRWidth_        =  [email protected]
               GetSCRHeight_       =  [email protected]
            end
     :Menu
     while true
     wait 0
     gosub @Mutex
     gosub @BOX
     gosub @Text_DrawSCR
        if 0043:   [email protected] == 5.0
        then
         //   jump @Spawn
        end
        if 0043:   [email protected] == 6.0
        then
          // jump @codePerintah1
        end
        if 0043:   [email protected] == 7.0
        then
         //  jump @codePerintah2
        end
        if 0043:   [email protected] == 8.0
        then
        //   jump @codePerintah3
        end 
        :End
        0DDD: [email protected] = get_mutex_var 0x51
        if [email protected] == 0
        jf @Menu
        0DDC: set_mutex_var 0 to 0
        0792: disembark_instantly_actor $3
        Camera.Restore_WithJumpCut()
        camera.Restore()
        end_Thread
        
                
     :TouchScreen
     0DD0: [email protected] = get_label_addr @_Z17OS_ScreenGetWidthv
     0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]
     0DD2: context_call_func [email protected]
     0DD4: [email protected] = context_get_reg 0
     0093: int_to_float+ [email protected] [email protected]
     0087: [email protected] = [email protected] // (float) 
     0073: [email protected] /= [email protected] // (float) 
     0DD0: [email protected] = get_label_addr @_ZN15CTouchInterface14m_vecCachedPosE
     0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]
     0DD8: [email protected] = read_mem_addr [email protected] size 4 fix_ib 0
     [email protected] /= 2.3
     006B: [email protected] *= [email protected] // (float)
     if and
        0031:   [email protected] >= 117.0 
        0033:   330.0 >= [email protected] 
     then 
     [email protected] += 4
     0DD8: [email protected] = read_mem_addr [email protected] size 4 fix_ib 0 
     end
     Return
     :Text_DrawSCR     
      gosub @Text 
      033E: set_draw_text_position [email protected] 137.0 GXT "ITEM0"  // Push
      gosub @Text
      033E: set_draw_text_position [email protected] 176.0 GXT "ITEM1"  // Push
      gosub @Text
      033E: set_draw_text_position [email protected] 219.0 GXT "ITEM2"  // Push
      gosub @Text
      033E: set_draw_text_position [email protected] 262.0 GXT "ITEM3"  // Push
     return
     
     :Text
      03F0: enable_text_draw 1 
      0342: set_text_draw_centered 1 
      0343: set_text_draw_linewidth 640.0 
      033F: set_text_draw_letter_size 3.3 2.0
      return
      :Mutex
      if not actor.Dead($3)
     then
     0DDC: set_mutex_var 0 to 1
     0159: camera_on_ped $3 mode 4 switchstyle 1 
     0812: AS_actor $3 perform_animation "IDLE_HBHB" IFP "PED"  1.0 0 0 0 1 time -1 
     end
     Return
     
     :BOX
     if not actor.Driving($3)
     then
     0DD0: [email protected] = get_label_addr @_Z18OS_ScreenGetInchesv
     0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]
     0DD0: [email protected] = get_label_addr @_Z17OS_ScreenGetWidthv
     0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]
     0DD0: [email protected] = get_label_addr @_Z18OS_ScreenGetHeightv
     0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]
     end
     0DD2: context_call_func [email protected]
     0DD4: [email protected] = context_get_reg 0
     0DD2: context_call_func [email protected]
     0DD4: [email protected] = context_get_reg 0
     0DD2: context_call_func [email protected]
     0DD4: [email protected] = context_get_reg 0          
     0093: int_to_float+ [email protected] [email protected]
     0093: int_to_float+ [email protected] [email protected]
     0087: [email protected] = [email protected] // (float) 
     0087: [email protected] = [email protected] // (float) 
     [email protected] = 640.0        // ScreenX
     [email protected] = 448.0
     0073: [email protected] /= [email protected] // (float)  
     [email protected] += 220.0
     0073: [email protected] /= [email protected] // (float)
     [email protected] += 87.0
     [email protected]  *= 85.0 
     038E: draw_box_position [email protected] [email protected] size [email protected] 60.0 RGBA 0 0 0 255
     [email protected] += 140.0
     038E: draw_box_position [email protected] [email protected] size [email protected] 219.0 RGBA 0 0 0 100  
     [email protected] -= 150.0
     [email protected] -= 79.0
     03F0: enable_text_draw 1 
     0343: set_text_draw_linewidth 640.0 
     0341: set_text_draw_align_justify 0 
     0349: set_text_draw_font 3
     033F: set_text_draw_letter_size 2.3 2.55 
     0340: set_text_draw_RGBA 180 180 180 255
     0345: enable_text_draw_background 0  
     033E: set_draw_text_position [email protected] [email protected] GXT "WMA" 
     0DD0: [email protected] = get_label_addr @_ZN15CTouchInterface14m_vecCachedPosE
     0DD1: [email protected] = get_func_addr_by_cstr_name [email protected]          
     Gosub @TouchScreen
     0087: [email protected] = [email protected] // (float) 
     0092: float_to_int+ [email protected] [email protected]
     [email protected] /= 40   
     0093: int_to_float+ [email protected] [email protected]
     if  0033:   5.0 >= [email protected] 
     then   
     [email protected] = 5.0
     end  
     if 0031:   [email protected] >= 8.0 
     then
     [email protected] = 8.0
     end 
     if 0043:   [email protected] == 5.0
     then
     [email protected] = 137.0
     end 
     if 0043:   [email protected] == 6.0
     then
     [email protected] = 176.0
     end 
     if 0043:   [email protected] == 7.0
     then
     [email protected] = 219.0
     end
     if 0043:   [email protected] == 8.0
     then
     [email protected] = 262.0
     end
     [email protected] += 80.0
     038E: draw_box_position [email protected] [email protected] size [email protected] 40.0 RGBA 255 255 255 155
     return
     
     
     
     
            

Link to comment
Share on other sites

Kucing.Bertelur

thanks bro for the source I have to help you?
Did you give me this source?
I do not write codes on android
but something out of this interesting code will be drawn out

Link to comment
Share on other sites

Kucing.Bertelur

I just want to share the knowledge of Cleo script with you: D, can you teach me IDA Pro to look for Memory Addres? :D😋

:D

Link to comment
Share on other sites

4 minutes ago, Kucing.Bertelur said:

I just want to share the knowledge of Cleo script with you: D, can you teach me IDA Pro to look for Memory Addres? :D😋

:D

I would also like to know that
but my computer is too bad to runs ida pro
once
I found the entire ida file, open source txt
on mixmods com br
but I do not remember what topic

:(

Link to comment
Share on other sites

2 minutes ago, Kucing.Bertelur said:

do you still have the file related to function and memory?😕

Well, somewhere I got lost on pc
go to the mixmods website

there you will find
  maybe someone else will help you

:/

Link to comment
Share on other sites

Kucing.Bertelur

okay bro, bro can you teach me a little about the trainer menu that you make a lot? I often make a trainer menu for Android but it's still very simple. and I want us to be friends bro, I'm from Indonesia.😊😊😊😊😊😊

Link to comment
Share on other sites

1 hour ago, Kucing.Bertelur said:

okay bro, bro can you teach me a little about the trainer menu that you make a lot? I often make a trainer menu for Android but it's still very simple. and I want us to be friends bro, I'm from Indonesia.<span> 😊😊😊😊😊😊

hey bro depends what you want to learn about my trainer bases ;)
your code is more complicated than you know about it
:)

 

hei bro tergantung pada apa yang perlu Anda pelajari tentang pangkalan pelatih saya;)
kode Anda lebih rumit lho

Edited by Sanmodder
Link to comment
Share on other sites

24 minutes ago, Kucing.Bertelur said:

hi bro, how to used code 0AC6: [email protected] = label @label offset for function _ZNblablalba?

example

see easy

value func

2@ = 100
3@ = 200

//add to memory                                         
0AC6: 0@ = label @cval offset                                                                                                                                  
0@ += 0 //0x0                                                                                                                                                          
0A8C: write_memory 0@ size 4 value 2@ virtual_protect 0                        
0@ += 4 //0x4                                                                                                                                                     
0A8C: write_memory 0@ size 4 value 3@ virtual_protect 0
                                  
while true
    wait 0
    //read from memory
    0AC6: 0@ = label @cval offset     
    0@ += 0 //items offset 0x0                                                                                      
    0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0
    0@ += 4 //items offset 0x4                                                                                       
    0A8D: 3@ = read_memory 0@ size 4 virtual_protect 0
    02FD: show_text_2numbers_lowpriority GXT 'BB_05' numbers 2@ 3@ time 100 flag 1  // ~b~1 Ponto!~s~ Dist™ncia ~1~.~1~m
end

:cval
hex
00 00 00 00 //0x0
00 00 00 00 //0x4
end

string func

while true
    wait 0
    03F0: enable_text_draw 0                                        
    //read string from memory                                                                   
    0AC6: 0@ = label @cval offset                                                                                           
    0@ += 0x0                                                                                     
    0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0                                        
    0@ += 0x4                                                             
    0A8D: 3@ = read_memory 0@ size 4 virtual_protect 0                                          
    0@ += 0x8                                                                       
    0A8D: 4@ = read_memory 0@ size 4 virtual_protect 0                                           
    0ADF: add_dynamic_GXT_entry "test" text [email protected]                                                                         
    033E: set_draw_text_position 320.0 180.333 GXT "test"                                       
end

:cval
hex
"abcdefghijklmnop" 00
end

help 😊

Link to comment
Share on other sites

22 minutes ago, Kucing.Bertelur said:

thx bro... how to activate this code ?

 

0AC6: [email protected] = label @string offset
:string
hex
"_ZN9CMessages10AddMessageEPtjt" 00
end 

while true
    wait 0
    03F0: enable_text_draw 0                                        
    //read string from memory                                                                   
    0AC6: 0@ = label @cval offset                                                                                           
    0@ += 0                                                                                     
    0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0                                        
    0@ += 4                                                             
    0A8D: 3@ = read_memory 0@ size 4 virtual_protect 0                                          
    0@ += 4                                                                       
    0A8D: 4@ = read_memory 0@ size 4 virtual_protect 0
    0@ += 4                                                                       
    0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0 
    0@ += 4                                                                      
    0A8D: 6@ = read_memory 0@ size 4 virtual_protect 0
    0@ += 4                                                                       
    0A8D: 7@ = read_memory 0@ size 4 virtual_protect 0 
    0@ += 4                                                                       
    0A8D: 8@ = read_memory 0@ size 4 virtual_protect 0
    0ADF: add_dynamic_GXT_entry "test" text [email protected]                                                                         
    033E: set_draw_text_position 320.0 180.333 GXT "test"                                       
end

:cval
hex
"_ZN9CMessages10AddMessageEPtjt" 00
end

//too long string will not be able to display the whole

I do not know about scripts for android

Link to comment
Share on other sites

1 hour ago, Kucing.Bertelur said:

why 0ADF: add_dynamic_GXT_entry "test" text 2 @v uses [email protected]? Why not [email protected]?

And what's the difference if 2 @ v or 3 @ v

under 2 @ is 1 part string taken from memory

     0AC6: 0 @ = label @cval offset
     0 @ + = 0
     0A8D: 2 @ = read_memory 0 @ size 4 virtual_protect 0

under 3 @ is different, offset

 

strings [email protected] or [email protected] longstring

 

you know

Link to comment
Share on other sites

Kucing.Bertelur

thank you bro, I want to ask again what is the meaning of num_params and pop code on this 0AA5: call $ hPROC num_params 1 pop 1 $ param ???????????

Link to comment
Share on other sites

14 minutes ago, Kucing.Bertelur said:

thank you bro, I want to ask again what is the meaning of num_params and pop code on this 0AA5: call $ hPROC num_params 1 pop 1 $ param ??????????? 

num param, how many parameters should he serve
  see example
0AA5: call 0x613A00 {func add ped in car} num_params 6 pop 6 {<--}
{1} driver false
{2} gangPedType 6
{3} seatNumber 2
{4} small false
{5} criminal false
{6} CVehicle 7@

 

Link to comment
Share on other sites

Kucing.Bertelur

what if I change 6 to 1? for example 0AA5: call 0x613A00 {func add ped in car} num_params 1 pop 6 {<-}

Link to comment
Share on other sites

crash game :(

this function needs a vehicle structure
It will not work
and after you reduce the parameters, they will not be all

Link to comment
Share on other sites

Kucing.Bertelur

how do you know what the parameters mean?what if I change 6 to 1? for example 0AA5: call 0x613A00 {func add ped in car} num_params 1 pop 6 {<-}

how do you know what the parameters mean?

Link to comment
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.