find something in chat

Status
Not open for further replies.

cacapipi69

Member
Joined
Nov 16, 2019
Messages
5
Reaction score
0
Location
comuna fa cu mana
i found this script and modifiy it a little but i still need help, i dont know how to do the thing with %d and %s, to find id's etc. When in the chat appears "Use [/accept licence ID" i want this script to find the id and then write in the chat "/accept licence ID" but i dont know how. Also, i want this script to be every time active, every time when "Use [accept licence ID" appears, every time /accept licence ID not just once and done.
Code:
$CLEO .cs}
0000: NOP

REPEAT
WAIT 0
UNTIL 0AFA:

WHILE TRUE
WAIT 0

if
0B61:  samp is_local_player_spawned
then
    0AC8: 0@ = allocate_memory_size 260
    0AC8: 1@ = allocate_memory_size 260
    0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
    if
    0C29: $NOT_USED = stristr string1 0@ string2 "Use [/accept licence %d"
    then
        0AF9: samp say_msg "/accept licence %s"
    end
end

END


IF something is in plus in this script and don t do anything, please delete it.
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,692
Reaction score
105
Code:
{$CLEO .cs}

0000: NOP

REPEAT
    WAIT 0
UNTIL 0AFA:

WHILE TRUE
    WAIT 0

    IF
        0B61:  samp is_local_player_spawned
    THEN
        0AC8: 0@ = allocate_memory_size 260
        0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
        IF
            0AD4: $NOT_USED = scan_string 0@ format "Use [/accept license %d] to accept license request." 0@ //IF and SET
        THEN
            0AF9: samp say_msg "/accept licence %d" 0@
            WAIT 1000
        END
        free 0@
    END
END
If that doesn't work get the "accept license" chat line and copy and paste it into the 0AD4: opcode string input and replace the number with %d to format for integer.
 
Last edited:
Status
Not open for further replies.
Top