CLEO Help AutoScroll

CLEO related
Status
Not open for further replies.

Dtkyss

Member
Joined
Oct 22, 2016
Messages
20
Reaction score
0
Dear forumers!
I have an AutoScroll script, i want to make it enable-disable.
Like, if I press F8, this is enabling, and scrolling automatic, disable like F8 too.
(0AB0: 2 - I dont want to change this!!!)
code:

Code:
{$CLEO}

wait 0

repeat
   wait 0
until Player.Defined(0)

while true
   wait 0
   if and
       not Actor.Driving($PLAYER_ACTOR)
       8818: not actor $PLAYER_ACTOR in_air
       0AB0: 2 //2 // RBM
   then
       if 0AB0: 2
       then
           while 0AB0: 2
               wait 0
           end

           1@ = 0

           /* 1@ = -1
           for 0@ = 22 to 32 step 1 // List guns
               if or
                   1@ == 25
                   1@ == 26
                   1@ == 27
               then continue
               end
       
               if 02D8: actor $PLAYER_ACTOR current_weapon == 0@
               then
                   1@ = 0
                   break
               end
           end */

           if 1@ <> -1
           then
               0470: 0@ = actor $PLAYER_ACTOR current_weapon
               while true
                   wait 0
                   01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0
                   wait 20 //// Here autoscrolll speed now is 500 mili sec   - [ 1000ms = 1second ]
                   0470: 1@ = actor $PLAYER_ACTOR current_weapon
                   if or
                       1@ == 0
                       1@ == 1
                   then break
                   end
               end
       
               01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0@
           end
       end
   end
end              
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Should be something like that

Code:
//ini part

0B34: samp register_client_command "cmd" to_label @command
20@ = 0

while true

if and //main statements
20@ == 1
//other statements
then
//rest of code
end

end

:command
0B12: 20@ = 20@ XOR 1
0B43: samp cmd_ret
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Dtkyss said:
I tried, but I cant. :S

You haven't tried enough if you're still asking me to add this code to your script, since my example should've at least tell you on which parts you did mistake during your "trying"
And I wonder how much time you've tried tho
 
Status
Not open for further replies.
Top