Help Help me to make on/off for .cs

Joined
Mar 30, 2023
Messages
24
Reaction score
0
can you make on/off for this?


{$CLEO .cs}

0000:

REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY

WHILE TRUE
WAIT 0


IF
0B61: samp is_local_player_spawned
THEN
FOR 0@ = 99 TO 99 // Can be changed to 98 to 99, 97 to 99 - it reads the last amount of lines from the log. In this case, it reads just the last one.
0AC8: 1@ = allocate_memory_size 260
0AC8: 2@ = allocate_memory_size 260
0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
IF
0C29: $NOT_USED = stristr string1 1@ string2 "Hello" // Text to look for in the chat to start the sequence. It will catch anything that has "text" anywhere in the chat.
THEN
0AF9: samp say_msg "Hi" // What you want to say when someone says "text" in the chat.
wait 50
END
END
END

END
 
Joined
Mar 30, 2023
Messages
24
Reaction score
0
can you make on/off for this?

can you make on/off for this?


{$CLEO .cs}

0000:

REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY

WHILE TRUE
WAIT 0


IF
0B61: samp is_local_player_spawned
THEN
FOR 0@ = 99 TO 99 // Can be changed to 98 to 99, 97 to 99 - it reads the last amount of lines from the log. In this case, it reads just the last one.
0AC8: 1@ = allocate_memory_size 260
0AC8: 2@ = allocate_memory_size 260
0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
IF
0C29: $NOT_USED = stristr string1 1@ string2 "Hello" // Text to look for in the chat to start the sequence. It will catch anything that has "text" anywhere in the chat.
THEN
0AF9: samp say_msg "Hi" // What you want to say when someone says "text" in the chat.
wait 50
END
END
END

END


{$CLEO .cs}


0000:


REPEAT

WAIT 0

UNTIL 0AFA: SAMP_IS_READY


WHILE TRUE

WAIT 0



IF

0B61: samp is_local_player_spawned

THEN

FOR 0@ = 99 TO 99

0AC8: 1@ = allocate_memory_size 260

0AC8: 2@ = allocate_memory_size 260

0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@

IF

0C29: $NOT_USED = stristr string1 1@ string2 "Hello"

THEN

0AF9: samp say_msg "Hi"

wait 50

END

END

END


END
 

Attachments

  • help.txt
    632 bytes · Views: 2

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
226
Location
( ͡° ͜ʖ ͡°)
INI:
{$CLEO .cs}
{$USE ini}
{$USE file}
{$USE bitwise}
{$USE clipboard}
{$USE CLEO+}
{$USE newOpcodes}
0000:

REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY


CONST
    KEY_ON = 88
END
0@ = FALSE


WHILE TRUE
    WAIT 0
    IF
    0AB0: KEY_ON
    THEN
        REPEAT
            WAIT 0
        UNTIL 8AB0: KEY_ON
        0B12: 0@ = 0@ XOR TRUE   
    END
    IF
    0@ == TRUE
    THEN
        IF
        0B61:  samp is_local_player_spawned
        THEN
            FOR 10@ = 99 TO 99
                0AC8: 1@ = allocate_memory_size 260
                0AC8: 2@ = allocate_memory_size 260
                0B75: samp get_chat_string 10@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
                IF
                0C29: 33@ = stristr string1 1@ string2 "Hello"
                THEN
                        0AF9: samp say_msg "Hi"
                        wait 50
                END
            END
        END   
    
    END
END

0A93: terminate_this_custom_script
 
Joined
Mar 30, 2023
Messages
24
Reaction score
0
INI:
{$CLEO .cs}
{$USE ini}
{$USE file}
{$USE bitwise}
{$USE clipboard}
{$USE CLEO+}
{$USE newOpcodes}
0000:

REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY


CONST
    KEY_ON = 88
END
0@ = FALSE


WHILE TRUE
    WAIT 0
    IF
    0AB0: KEY_ON
    THEN
        REPEAT
            WAIT 0
        UNTIL 8AB0: KEY_ON
        0B12: 0@ = 0@ XOR TRUE
    END
    IF
    0@ == TRUE
    THEN
        IF
        0B61:  samp is_local_player_spawned
        THEN
            FOR 10@ = 99 TO 99
                0AC8: 1@ = allocate_memory_size 260
                0AC8: 2@ = allocate_memory_size 260
                0B75: samp get_chat_string 10@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
                IF
                0C29: 33@ = stristr string1 1@ string2 "Hello"
                THEN
                        0AF9: samp say_msg "Hi"
                        wait 50
                END
            END
        END
 
    END
END

0A93: terminate_this_custom_script
not work
INI:
{$CLEO .cs}
{$USE ini}
{$USE file}
{$USE bitwise}
{$USE clipboard}
{$USE CLEO+}
{$USE newOpcodes}
0000:

REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY


CONST
    KEY_ON = 88
END
0@ = FALSE


WHILE TRUE
    WAIT 0
    IF
    0AB0: KEY_ON
    THEN
        REPEAT
            WAIT 0
        UNTIL 8AB0: KEY_ON
        0B12: 0@ = 0@ XOR TRUE
    END
    IF
    0@ == TRUE
    THEN
        IF
        0B61:  samp is_local_player_spawned
        THEN
            FOR 10@ = 99 TO 99
                0AC8: 1@ = allocate_memory_size 260
                0AC8: 2@ = allocate_memory_size 260
                0B75: samp get_chat_string 10@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
                IF
                0C29: 33@ = stristr string1 1@ string2 "Hello"
                THEN
                        0AF9: samp say_msg "Hi"
                        wait 50
                END
            END
        END
 
    END
END

0A93: terminate_this_custom_script


not work i press key 88 (X)
bug not work
 
Top