CLEO Help Help cleo mode

CLEO related
Status
Not open for further replies.

JrJunioru

Member
Joined
Apr 7, 2017
Messages
14
Reaction score
0
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!
 

Krc

Active member
Joined
Mar 30, 2018
Messages
193
Reaction score
25
Location
Lithuania
Code:
 {$CLEO .cs}
0000: NOP
REPEAT
Wait 0
Until 0AFA: is_samp_structures_available

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

:TEXT
0AF7: samp 1@ = get_base
1@ += 0x21A0E4
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 
005A: 1@ += 0@ 
1@ += 28
0AB2: 1 1@
 

JrJunioru

Member
Joined
Apr 7, 2017
Messages
14
Reaction score
0
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..
 

Krc

Active member
Joined
Mar 30, 2018
Messages
193
Reaction score
25
Location
Lithuania
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
 

Krc

Active member
Joined
Mar 30, 2018
Messages
193
Reaction score
25
Location
Lithuania
JrJunioru said:
I am playing on R2 server.. and sf is working for some cleos.

Rly man? Instal samp 0.3.7 and use this files...
 

Attachments

  • SAMP 0.3.7 R1-R2.zip
    1.7 MB · Views: 9

JrJunioru

Member
Joined
Apr 7, 2017
Messages
14
Reaction score
0
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.
 
Status
Not open for further replies.
Top