CLEO Help Small changes to this fishing cleo

CLEO related

samplover

New member
Joined
Feb 14, 2024
Messages
2
Reaction score
0
Hello, can someone make small changes to this cleo. What i want is currently it is activated by using command /afish .
I want it to be with key F3.
Also all of the add_message_to_chat to be changed with the message on screen , that shows AFish ON and AFish OFF
Here is the code:

CSS:
{$CLEO .cs}

0000: 'Author: Parazitas | UGBASE.EU'

REPEAT
WAIT 0
UNTIL 0AFA:

0B34: samp register_client_command "afish" to_label @CMD

WHILE TRUE
    WAIT 0
   
IF 0256:   player $PLAYER_CHAR defined
THEN
    IF 31@ == TRUE
    THEN
        IF 30@ == FALSE
        THEN
            0C8F: samp process_chat_input "/fish"
            30@ = TRUE
        END
        IF 30@ == TRUE
        THEN
            IF 32@ > 12500 // 12.5 sec
            THEN
                0C8F: samp process_chat_input "/putallback"
                32@ = 0
                30@ = FALSE
            END
        END
    END
END

END



:CMD
IF 31@ == FALSE
THEN
    31@ = TRUE
    0AF8: samp add_message_to_chat  "[Auto Fishing] - {20B61F}ENABLED{00FF00}" color -1
    0AF8: samp add_message_to_chat  "?? ??????? ?? ????? ????, ?? ?? ????? ?????? /afish" color -1
ELSE
    31@ = FALSE
    30@ = FALSE
    0AF8: samp add_message_to_chat  "[Auto Fishing] - {FD3737}OFF{FF0000}" color -1
END
0B43: samp cmd_ret
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,488
Reaction score
231
Location
( ͡° ͜ʖ ͡°)
IDK, try this

Code:
{$CLEO .cs}
{$USE ini}
{$USE file}
{$USE bitwise}
{$USE clipboard}
{$USE CLEO+}
{$USE newOpcodes}
0000:

REPEAT
    WAIT 0
UNTIL 0256:   player $PLAYER_CHAR defined
CONST
    KEY_ON = 114 //f3
END
0@ = FALSE


WHILE TRUE
    WAIT 0
    IF
    0AB0: KEY_ON
    THEN
        REPEAT
            WAIT 0
        UNTIL 8AB0: KEY_ON
        0B12: 31@ = 31@ XOR TRUE
        0AD1: show_formatted_text_highpriority "MOD STATUS: %d" 0@
        IF
        31@ == FALSE
        THEN
            30@ = FALSE
        END   
        
    END
    IF
    31@ == TRUE
    THEN
    
        IF 30@ == FALSE
        THEN
            0C8F: samp process_chat_input "/fish"
            30@ = TRUE
        END
        IF 30@ == TRUE
        THEN
            IF 32@ > 12500 // 12.5 sec
            THEN
                0C8F: samp process_chat_input "/putallback"
                32@ = 0
                30@ = FALSE
            END
        END
        
    
    END
END

0A93: terminate_this_custom_script
 
Top