CLEO Help Help.

CLEO related
Status
Not open for further replies.

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
Can somebody explane how to make every time presing get different active.

simple explane - not working..
[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
 WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

 
WHILE TRUE
 WAIT 0
 
 IF
 0AB0: 101 {NUM 5}
 THEN
     0@ = TRUE
      IF
      0AB0: 101 {NUM 5}
      THEN
          0@ = FALSE
          1@ = TRUE
           IF
           0AB0: 101 {NUM 5}
           THEN
               1@ = FALSE
               2@ = TRUE
               wait 3000
                IF
                0AB0: 101 {NUM 5}
                THEN
                    2@ = FALSE
                    3@ = TRUE
                    { BREAKE OR SOMTHING LIKE THAT TO BACK IN START - TRY DO RANDOM }
                END
           END
      END
 END
/////////////////////
IF
0@ == TRUE
THEN
     0AF8: "test 1" -1
     wait 1000
END

IF
1@ == TRUE
THEN
     0AF8: "test 2" -1
     wait 1000
END

IF
2@ == TRUE
THEN
     0AF8: "test 3" -1
     wait 1000
END

IF
3@ == TRUE
THEN
     0AF8: "test 4" -1
     wait 1000
END
 
 
END
    


[/shcode]
 

bladero

Active member
Joined
Jan 3, 2017
Messages
73
Reaction score
0
Code:
{$CLEO .cs}
0000:

REPEAT 
WAIT 0
UNTIL 0AFA:

WHILE TRUE
WAIT 0
    IF
    0AB0: 85
    THEN
    0209: 0@ = random_int_in_ranges 1 5 
    END
        IF
        0@ == 1
        THEN
        0AF8: "Cheat 1" -1
        END
        IF 
        0@ == 2
        THEN
        0AF8: "Cheat 2" -1
        END
        IF
        0@ == 3
        THEN
        0AF8: "Cheat 3" -1
        END
        IF  
        0@ == 4
        THEN
        0AF8: "Cheat 4" -1
        END
        IF
        0@ == 5
        THEN
        0AF8: "Cheat 5" -1 
        END
END

[font=Monaco, Consolas, Courier, monospace]You can use 0209: 0@ = random_int_in_ranges to randomize value of the variable and then just check the value and do stuff.[/font]
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
bladero said:
Code:
{$CLEO .cs}
0000:

REPEAT 
WAIT 0
UNTIL 0AFA:

WHILE TRUE
WAIT 0
    IF
    0AB0: 85
    THEN
    0209: 0@ = random_int_in_ranges 1 5 
    END
        IF
        0@ == 1
        THEN
        0AF8: "Cheat 1" -1
        END
        IF 
        0@ == 2
        THEN
        0AF8: "Cheat 2" -1
        END
        IF
        0@ == 3
        THEN
        0AF8: "Cheat 3" -1
        END
        IF  
        0@ == 4
        THEN
        0AF8: "Cheat 4" -1
        END
        IF
        0@ == 5
        THEN
        0AF8: "Cheat 5" -1 
        END
END

[font=Monaco, Consolas, Courier, monospace]You can use 0209: 0@ = random_int_in_ranges to randomize value of the variable and then just check the value and do stuff.[/font]

I KNOW THIS ALREADY.
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
1. Question asked/problem presented
2. Solution posted with a brief explanation
3. I KNOW THIS ALREADY

[img=200x200]http://i0.kym-cdn.com/photos/images/facebook/000/787/356/d6f.jpg[/img]


btw you could also make a sequence of the actions by adding 1 to the variable controlling the flow

[shcode=cpp]

0@ = 0
while true
wait 0

    if key_down 49
    then
    0@ += 1
      
        if 0@ == 1
        then
        chatmsg "something happened 1" -1
        end
        
        if 0@ == 2
        then
        say "something happened 2"
        end
        
        if 0@ == 3
        then
        0AD1: show_formatted_text_highpriority "something happened 3" time 2000  
        0@ = 0  //reset back to 0 so the next will be 1
        end

    wait 700
    end    
end
[/shcode]
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
monday said:
1. Question asked/problem presented
2. Solution posted with a brief explanation
3. I KNOW THIS ALREADY

[img=200x200]http://i0.kym-cdn.com/photos/images/facebook/000/787/356/d6f.jpg[/img]


btw you could also make a sequence of the actions by adding 1 to the variable controlling the flow

[shcode=cpp]

0@ = 0
while true
wait 0

    if key_down 49
    then
    0@ += 1
      
        if 0@ == 1
        then
        chatmsg "something happened 1" -1
        end
        
        if 0@ == 2
        then
        say "something happened 2"
        end
        
        if 0@ == 3
        then
        0AD1: show_formatted_text_highpriority "something happened 3" time 2000  
        0@ = 0  //reset back to 0 so the next will be 1
        end

    wait 700
    end    
end
[/shcode]

Thanks , this me need.
 
Status
Not open for further replies.
Top