CLEO Help Ammo Repeat

CLEO related
Status
Not open for further replies.

Olcay

Active member
Joined
Dec 1, 2014
Messages
31
Reaction score
0
Hi everyone

I'm trying to make a cleo that add 3 ammo and then fire weapon. So, I can't make 2 parts of this. How can i fire weapon after added 3 ammo to current weapon and repeat it until has 9000+ ammo?

[shcode=cpp]
{$CLEO .cs}

0000: NOP



repeat
Wait 40
until 0AFA: is_samp_structures_available

while true
wait 0 
    0470: 1@ = actor $PLAYER_ACTOR current_weapon
    041A: 2@ = actor $PLAYER_ACTOR weapon 1@ ammo
if and
    key_down 74
    not SAMP.ChatInputOpened()
then
wait 0
    0114: set_actor $PLAYER_ACTOR weapon 1@ add_ammo 3
    ///// ??????? //////
end    
end
[/shcode]
 

Olcay

Active member
Joined
Dec 1, 2014
Messages
31
Reaction score
0
0x32789 said:
Code:
repeat
    0470: 1@ = actor $PLAYER_ACTOR current_weapon
    0114: set_actor $PLAYER_ACTOR weapon 1@ add_ammo 3
    // fire
until 1@ > 9000

Thanks but I need fire gun when 3 ammo added. Add ammo to current weapon and fire one time finally ammo will increase 2 bullet per key press. So I need it opcode or something.
 

Mila.cs ✅

Well-known member
Joined
Jun 24, 2016
Messages
247
Reaction score
10
Location
̀́̀́
Code:
0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x3 {W}




:FAKE_KEYPRESS
1@ = 0xB73458
005A: 1@ += 0@  // (int)
0A8C: write_memory 1@ size 1 value 255 virtual_protect 0
0AB2: ret 0

{
Offset        Slot     
+ 0x0        Right                        
+ 0x1        Left                            
+ 0x2        Backwards                    
+ 0x3        Forward                        
+ 0x4        Look right                    
+ 0x5        Look left                    
+ 0x6        Look down                        
+ 0x7        Look up                            
+ 0x8        Action            
+ 0xA        Previous weapon/target                
+ 0xC        Aim weapon                    
+ 0xE        Next weapon/target                
+ 0x10        Group CTRL forward                    
+ 0x12        Group CTRL back                        
+ 0x14        Conversation - NO                    
+ 0x16        Conversation - YES                    
+ 0x1A        Change camera                    
+ 0x1C        Jump                            
+ 0x1E        Enter+exit                        
+ 0x20        Sprint                            
+ 0x22        Fire                            
+ 0x24        Crouch                            
+ 0x26        Look behind                        
+ 0x28        Unused                            
+ 0x2A        Walk  

by opcode.exe                          
}
 

Olcay

Active member
Joined
Dec 1, 2014
Messages
31
Reaction score
0
Mila.cs ✅ said:
Code:
0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x3 {W}




:FAKE_KEYPRESS
1@ = 0xB73458
005A: 1@ += 0@  // (int)
0A8C: write_memory 1@ size 1 value 255 virtual_protect 0
0AB2: ret 0

{
Offset        Slot     
+ 0x0        Right                        
+ 0x1        Left                            
+ 0x2        Backwards                    
+ 0x3        Forward                        
+ 0x4        Look right                    
+ 0x5        Look left                    
+ 0x6        Look down                        
+ 0x7        Look up                            
+ 0x8        Action            
+ 0xA        Previous weapon/target                
+ 0xC        Aim weapon                    
+ 0xE        Next weapon/target                
+ 0x10        Group CTRL forward                    
+ 0x12        Group CTRL back                        
+ 0x14        Conversation - NO                    
+ 0x16        Conversation - YES                    
+ 0x1A        Change camera                    
+ 0x1C        Jump                            
+ 0x1E        Enter+exit                        
+ 0x20        Sprint                            
+ 0x22        Fire                            
+ 0x24        Crouch                            
+ 0x26        Look behind                        
+ 0x28        Unused                            
+ 0x2A        Walk  

by opcode.exe                          
}

Thank You.! Moderators can delete or whatever this topic.
 
Status
Not open for further replies.
Top