CLEO Help Chat String [I'll wait the response like HATIKO]

CLEO related
Status
Not open for further replies.

JaggerJam

Active member
Joined
Sep 14, 2017
Messages
98
Solutions
1
Reaction score
21
Hi everyone, here i've a problem with chat string. The problem consists in that 25@ mb taking and ID from %d, and 26@v it doesn't separate it.

Code:

Code:
{$CLEO}
0000:

repeat
wait 0
until SAMP.Available()



alloc 16@ 105
alloc 1@ 64
alloc 4@ 25
alloc 5@ 260
alloc 25@ 20





WHILE TRUE
wait 0
for 15@ = 2057 to 2058 //search for textdraw ID
    if 0C5D: samp textdraw 15@ is_exists
    then
        0C5A: samp textdraw 15@ get_string_to 16@ // textdraw to string
        if 0C18: 2@ = strstr string1 16@ string2 "Target:"
        then
        0AA5: call 0x8220AD num_params 6 pop 6 params 4@ 3@v 2@v 1@ "~w~Target: ~r~%[^~]~w~(%d)~n~Distance: ~r~%dm ~w~(%[^)])" 16@
        0B75: samp get_chat_string 99 text_to 5@ prefix_to 0 color_to 0 prefix_color_to 0 // get only NickName 1@
          if
             0C18: 18@ = strstr string1 5@ string2 "Dispatch:" // searching for needed string
          then
           0AA5: call 0x8220AD num_params 4 pop 4 26@v 25@ "Dispatch: %s[%d] has commited a crime:" 5@ // get NickNmae and separate ID
                if
                0C14: strcmp string1 1@ string2 25@ // IF 1@ NickName equals with 25@ then
                then  
                        chatmsg  25@ -1 
                end
            end
        end
    end
end
end
 
Status
Not open for further replies.
Top