CLEO Help Auto Message Sender after at the message

CLEO related
Status
Not open for further replies.

KillerZ

Active member
Joined
Apr 6, 2014
Messages
73
Reaction score
0
Try this, the compiled version is at the bottom.

[shcode=cpp]
{$CLEO}
{$INCLUDE SF}

0000:

:Load
wait 30 
if
  SAMP.Available
else_jump @Load

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
wait 0
    if and
        8B21: not samp is_chat_opened
        0AB0:   key_pressed 80 //P key
    then
        wait 1000
        0B12: 0@ = 0@ XOR 1
        if
            0@ == 1
        then
            0AF8: samp add_message_to_chat "{27D0F2}Auto capturf {27F227}ENABLED!" color -1
        else
            0AF8: samp add_message_to_chat "{27D0F2}Auto capturf {F22727}DISABLED!" color -1
        end
    end
end

:in_rpc
0BE5: raknet 10@ = get_hook_param PARAM_PACKETID 
if 
    10@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM    
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT 
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT
    
    0AC8: 4@ = allocate_memory_size 145
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@
    0C0D: struct 4@ offset 3@ size 1 = 0
     
    if and
        0@ == 1 
        0C18: 5@ = strstr string1 4@ string2 "You have 5 minutes to sign the check before it becomes invalid." 
    then  
        say "/capturf"
    else
        0BE0: raknet hook_ret true 
    end
end
0BE0: raknet hook_ret true
[/shcode]
 

Attachments

  • AutoCapturf.cs
    18.8 KB · Views: 45

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
[shcode=cpp]
{$CLEO}

THREAD "MSG"

REPEAT
WAIT 0
UNTIL SAMP.AVAILABLE()

0@ = 0

WHILE TRUE
WAIT 0
       IF
           0@ == 1
       THEN
           ALLOC 2@ 200
           0B75: samp get_chat_string 98 text_to 2@ prefix_to 3@ color_to 4@ prefix_color_to 5@
           IF
               0AD4: $FUCK = scan_string 2@ format "You have %d minutes to sign the check before it becomes invalid." 6@
           THEN
               SAY "/capturf"
           END
           FREE 2@
       END
WAIT 0
       IF AND
               0ADC: "P"
               8B21: NOT samp is_chat_opened
       THEN
               IF
                   0@ == 0
               THEN
                   WAIT 100
                   0@ = 1
                   CHATMSG "AUTO CMD SENDER ON" -1
               ELSE
                   WAIT 100
                   0@ = 0
                   CHATMSG "AUTO CMD SENDER OFF" -1
               END            
       END
END
[/shcode]

If it's the last line in chat then change 98 to 99.
 
Status
Not open for further replies.
Top