Getting Chat String

KamikazeSripterul

Well-Known Member
Joined
Jun 30, 2019
Messages
61
Likes
1
Points
8
#1
So I tried to make a script in which when the following is been said, it would say the next things in "" but it doesn't work... Can anyone help me please?
Code:
{$CLEO .cs}               
thread "Auto-Clicker"
0000:


repeat
wait 0
until SAMP.Available()

while true
wait 0
    SAMP.GetChatString([email protected], [email protected], [email protected], [email protected], [email protected])
    alloc [email protected] 260
    if or
    0C18: [email protected] = strstr string1 [email protected] string2 "AFK LA PC"
    0C18: [email protected] = strstr string1 [email protected] string2 "BAN PENTRU"
    0C18: [email protected] = strstr string1 [email protected] string2 "AUTOCLICKER"
    0C18: [email protected] = strstr string1 [email protected] string2 "AUTO-CLICKER"
    0C18: [email protected] = strstr string1 [email protected] string2 "ESTI LA PC"
    then
        say "/stopanim"         
        wait 2000
        say "Da, sunt la PC :<."
        wait 1000
        say "/sleep"
    end
    free [email protected]
end
 
OP
OP
K

KamikazeSripterul

Well-Known Member
Joined
Jun 30, 2019
Messages
61
Likes
1
Points
8
#2
Code:
{$CLEO .cs}               
thread "Auto-Clicker"
0000:


repeat
wait 0
until SAMP.Available()

while true
wait 0
END

:autoclicker
    alloc [email protected] 260
    alloc [email protected] 260
    
    SAMP.GetChatString([email protected], [email protected], [email protected], [email protected], [email protected])
    if or
    0AD4: $NOT_USED = scan_string [email protected] format "AFK LA PC"
    0AD4: $NOT_USED = scan_string [email protected] format "BAN PENTRU"
    0AD4: $NOT_USED = scan_string [email protected] format "AUTOCLICKER"
    0AD4: $NOT_USED = scan_string [email protected] format "AUTO-CLICKER"
    0AD4: $NOT_USED = scan_string [email protected] format "ESTI LA PC"
    then
        chatmsg "merge" -1
    else
        chatmsg "no merge" -1
    end
SAMP.CmdRet()
I tried it this way too, but it still won't work.. Even if the code is in the loop with free [email protected] and free [email protected]
 

Opcode.eXe

Well-Known Member
Joined
Feb 18, 2013
Messages
1,476
Likes
198
Points
113
Location
( ͡° ͜ʖ ͡°)
Website
www.youtube.com
#3
Code:
{$CLEO .cs}               
thread "Auto-Clicker"
0000:


repeat
    wait 0
until SAMP.Available()

while true
wait 0
    alloc [email protected] 260
    0B75: samp get_chat_string 99 text_to [email protected] prefix_to [email protected] color_to [email protected] prefix_color_to [email protected]

    
    if or
    0C18: [email protected] = strstr string1 [email protected] string2 "AFK LA PC"
    0C18: [email protected] = strstr string1 [email protected] string2 "BAN PENTRU"
    0C18: [email protected] = strstr string1 [email protected] string2 "AUTOCLICKER"
    0C18: [email protected] = strstr string1 [email protected] string2 "AUTO-CLICKER"
    0C18: [email protected] = strstr string1 [email protected] string2 "ESTI LA PC"
    then
        say "/stopanim"         
        wait 2000
        say "Da, sunt la PC :<."
        wait 1000
        say "/sleep"
    end
    free [email protected]
end
 
Top