Help Help cleo mode

Joined
Apr 7, 2017
Messages
14
Likes
0
Points
1
1
#1
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: [email protected] = allocate_memory_size 260 // Allocate memory to string.
    0AB1: @GETCHATENTRYTEXT 1 id 99 to [email protected] // Stores last chat line to [email protected]   
    IF
    0C29: [email protected] = stristr string1 [email protected] string2 "100.000"
    THEN
        0AF8: samp add_message_to_chat "100.000 found in chat!" color -1
    END   
    0AC9: free_allocated_memory [email protected] // FREE THE MEMORY
END

:getChatEntryText
0AF7: samp [email protected] = get_base
[email protected] += 0x212A6C
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0
[email protected] += 0x136
[email protected] *= 252 // size of stChatEntry
005A: [email protected] += [email protected] // (int)
[email protected] += 28
0AB2: 1 [email protected]

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: [email protected] = stristr string1 [email protected] 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!
 

kazkaS

Well-Known Member
Joined
Mar 30, 2018
Messages
96
Likes
1
Points
8
#3
Code:
 {$CLEO .cs}
0000: NOP
REPEAT
Wait 0
Until 0AFA: is_samp_structures_available

While True
Wait 0
0AC8: [email protected] = allocate_memory_size 260
0AB1: @TEXT 1 id 99 to [email protected]  
   
If
0C29: $NOT_USED = stristr string1 [email protected] string2 "100.000" 
Then
Wait 200
ChatMsg "100.000 found in chat!" -1
Wait 100
end   
0AC9: free_allocated_memory [email protected]
END

:TEXT
0AF7: samp [email protected] = get_base
[email protected] += 0x21A0E4
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0
[email protected] += 0x136
[email protected] *= 252 
005A: [email protected] += [email protected] 
[email protected] += 28
0AB2: 1 [email protected]
 
OP
OP
J
Joined
Apr 7, 2017
Messages
14
Likes
0
Points
1
1
#4
Still crashing with your code.. The game is starting and then I am getting a spam of warnings or something like that and crashing I can't even login to server and my game is dead..
 

kazkaS

Well-Known Member
Joined
Mar 30, 2018
Messages
96
Likes
1
Points
8
#5
JrJunioru said:
Still crashing with your code.. The game is starting and then I am getting a spam of warnings or something like that and crashing I can't even login to server and my game is dead..
Use sampfuns and samp 0.3.7
 
OP
OP
J
Joined
Apr 7, 2017
Messages
14
Likes
0
Points
1
1
#10
Actually the code was working, but i am the biggest retard in the world and i fucking forgot to compile it again by your code.. Sorry for fucking wasting your time.
 
Top