killme1st2
Member
- Joined
- May 25, 2013
- Messages
- 15
- Reaction score
- 0
How do I make it so my cleo mod can read a server message in the chat and then say something afterwards?
0B36 said:Get last chat string text, then compare the string with 0AD4 and if it returns true, take action.
0B36 said:[shcode=cpp]
{$CLEO}
THREAD "CHATSHIT"
REPEAT
WAIT 0
UNTIL SAMP.Available()
ALLOC 1@ = 200 // ALLOCATE MEMORY FOR THE CHAT STRING FIRST
WHILE TRUE
WAIT 0
0B75: samp get_chat_string 99 text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@ // CATCH THE LAST CHAT STRING AND SAVE IT FOR COMPARISON
IF
0AD4: 0@ = 1@ "killme1st2 has spawned" // COMPARE THE CHAT STRING WHICH WE CAUGHT, CHANGE IN ACCORDANCE TO THE SERVER
THEN
CHATMSG "FOUND THE CHATSTRING YAY!" -1 // TAKE SOME ACTION HERE
END
END
[/shcode]
Something like that.
0B36 said:Fixed the issue, try your own now.