Hello guys, my game is crashing when I am using this cleo mode:
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: is_samp_available
// CLEO STARTS WHEN SAMPFUNCS HAS LOADED.
WHILE TRUE
WAIT 0
0AC8: 0@ = allocate_memory_size 260 // Allocate memory to string.
0AB1: @GETCHATENTRYTEXT 1 id 99 to 0@ // Stores last chat line to 0@.
IF
0C29: 1@ = stristr string1 0@ string2 "100.000"
THEN
0AF8: samp add_message_to_chat "100.000 found in chat!" color -1
END
0AC9: free_allocated_memory 0@ // FREE THE MEMORY
END
:getChatEntryText
0AF7: samp 1@ = get_base
1@ += 0x212A6C
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 // size of stChatEntry
005A: 1@ += 0@ // (int)
1@ += 28
0AB2: 1 1@
I want this cleo to find in chat 100.000 and then say 100.000 found in chat!
I found on forum this line: 0C29: 1@ = stristr string1 0@ string2 "100.000" the guy who gave it said that I can use it to make my cleo find "100.000" even if in last line is something like : "blabla 100.000 blabla" and I don't have to write exact line from chat to make this cleo work. Sorry for my bad english, thanks for help!
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: is_samp_available
// CLEO STARTS WHEN SAMPFUNCS HAS LOADED.
WHILE TRUE
WAIT 0
0AC8: 0@ = allocate_memory_size 260 // Allocate memory to string.
0AB1: @GETCHATENTRYTEXT 1 id 99 to 0@ // Stores last chat line to 0@.
IF
0C29: 1@ = stristr string1 0@ string2 "100.000"
THEN
0AF8: samp add_message_to_chat "100.000 found in chat!" color -1
END
0AC9: free_allocated_memory 0@ // FREE THE MEMORY
END
:getChatEntryText
0AF7: samp 1@ = get_base
1@ += 0x212A6C
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 // size of stChatEntry
005A: 1@ += 0@ // (int)
1@ += 28
0AB2: 1 1@
I want this cleo to find in chat 100.000 and then say 100.000 found in chat!
I found on forum this line: 0C29: 1@ = stristr string1 0@ string2 "100.000" the guy who gave it said that I can use it to make my cleo find "100.000" even if in last line is something like : "blabla 100.000 blabla" and I don't have to write exact line from chat to make this cleo work. Sorry for my bad english, thanks for help!