CLEO Help ON & OFF button?

CLEO related
Status
Not open for further replies.

kool

Active member
Joined
Jun 4, 2016
Messages
89
Reaction score
0
I've been struggling to make ON and OFF button for this script but it never works...
If can somebody go ahead and explain me how to add ON & OFF button. @springfield @Parazitas 


Code:
//0..640.0  320.0
//0..448.0  224.0   
{$CLEO .cs}
0000:

while not SAMP.Available()
    wait 100
end 

0AB0: 96

while true
    wait 0
    for 31@ = 0 to 1000
        if 0B20: samp 30@ = actor_handle_by_samp_player_id 31@
            then
            0ab1: @getSkinParams 1 30@ | {x,y,w,h} 26@ 27@ 28@ 29@
            0ab1: @shoot 4 26@ 27@ 28@ 29@   
               
        end        
    end
end

:getSkinParams
//0x5E4280
0A96: 15@ = actor 0@ struct

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 22 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 19@ 20@ // 22

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 32 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32

0509: 21@ = distance_between_XY 16@ 17@ 19@ 20@ //21@ - ШИРИНА

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 1 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 19@ 20@ // 22

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 4 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32

0509: 22@ = distance_between_XY 16@ 17@ 19@ 20@ //22@ - ВЫСОТА 

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 3 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32
0ab2: 4 16@ 17@ 21@ 22@

:shoot
0@ -= 320.0
1@ -= 224.0
0097: make 0@ absolute_float
0097: make 1@ absolute_float
2@ /= 2.0
3@ /= 2.0

if and
8035: 0@ <= 2@
8035: 1@ <= 3@
    then
    0B56: set_game_key 17 state 255  
end
0ab2: 0    

:reload
0A92: create_custom_thread "trigger.cs"
0A93: end_custom_thread
0B43: samp cmd_ret
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
do like this this

{$CLEO .cs}
0000:

0@ = 0
WHILE TRUE
WAIT 0
if or
0ADC: TYPING "MOD"
0AB0: 88
then
if
0@ == 0
then
0@ = 1
018C: play_sound 1083 at 0.0 0.0 0.0
0ACD: show_text_highpriority "MOD ENABLED" time 1337
else
0@ = 0
018C: play_sound 1084 at 0.0 0.0 0.0
0ACD: show_text_highpriority "MOD DISABLED" time 1337
end
WAIT 350
end
if
0@ == 1
then
for 31@ = 0 to 1000
if 0B20: samp 30@ = actor_handle_by_samp_player_id 31@
then
0ab1: @getSkinParams 1 30@ | {x,y,w,h} 26@ 27@ 28@ 29@
0ab1: @shoot 4 26@ 27@ 28@ 29@

end
end
end
END
 

kool

Active member
Joined
Jun 4, 2016
Messages
89
Reaction score
0
Opcode.eXe said:
do like this this

{$CLEO .cs}
0000:

0@ = 0
WHILE TRUE
   WAIT 0
   if or
   0ADC: TYPING "MOD"    
   0AB0: 88
   then
       if
       0@ == 0
       then
           0@ = 1
           018C: play_sound 1083 at 0.0 0.0 0.0
           0ACD: show_text_highpriority "MOD ENABLED" time 1337
       else
           0@ = 0
           018C: play_sound 1084 at 0.0 0.0 0.0
           0ACD: show_text_highpriority "MOD DISABLED" time 1337  
       end
       WAIT 350
   end
   if
   0@ == 1
   then    
   for 31@ = 0 to 1000
       if 0B20: samp 30@ = actor_handle_by_samp_player_id 31@
           then
           0ab1: @getSkinParams 1 30@ | {x,y,w,h} 26@ 27@ 28@ 29@
           0ab1: @shoot 4 26@ 27@ 28@ 29@  
             
       end        
   end
   end
END

My game keeps crashing,idk what I'm doing wrong :/


Code:
//0..640.0  320.0
//0..448.0  224.0   
{$CLEO .cs}
0000:

0@ = 0

while not SAMP.Available()
    wait 100
end

while true
    if 
    0AB0: 96
    then
    if
    0@ = 0
    then
    0@ = 1
    018C: play_sound 1083 at 0.0 0.0 0.0
0ACD: show_text_highpriority "on" time 2000
else
0@ = 0
018C: play_sound 1084 at 0.0 0.0 0.0
0ACD: show_text_highpriority "off" time 2000 
end
    wait 0
    if
0@ == 1
then
    for 31@ = 0 to 1000
        if 0B20: samp 30@ = actor_handle_by_samp_player_id 31@
            then
            0ab1: @getSkinParams 1 30@ | {x,y,w,h} 26@ 27@ 28@ 29@
            0ab1: @shoot 4 26@ 27@ 28@ 29@   
               
        end        
    end
end

:getSkinParams
//0x5E4280
0A96: 15@ = actor 0@ struct

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 22 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 19@ 20@ // 22

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 32 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32

0509: 21@ = distance_between_XY 16@ 17@ 19@ 20@ //21@ - ??????

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 1 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 19@ 20@ // 22

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 4 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32

0509: 22@ = distance_between_XY 16@ 17@ 19@ 20@ //22@ - ?????? 

0AC7: 16@ = var 16@ offset
0AA6: call_method 0x5E4280 struct 15@ num_params 3 pop 0 1 3 16@ // 16@ 17@ 18@ x y z
0B55: convert_3D_coords 16@ 17@ 18@ to_screen 16@ 17@
0B5F: convert_window_screen_coords 16@ 17@ to_game_screen_coords 16@ 17@ // 32
0ab2: 4 16@ 17@ 21@ 22@

:shoot
0@ -= 320.0
1@ -= 224.0
0097: make 0@ absolute_float
0097: make 1@ absolute_float
2@ /= 2.0
3@ /= 2.0

if and
8035: 0@ <= 2@
8035: 1@ <= 3@
    then
    0B56: set_game_key 17 state 255  
end
0ab2: 0    

:reload
0A92: create_custom_thread "trigger.cs"
0A93: end_custom_thread
0B43: samp cmd_ret

end
 
Status
Not open for further replies.
Top