CLEO Help get word in chat samp ?

CLEO related
Status
Not open for further replies.

kakaka

Active member
Joined
Jun 7, 2014
Messages
59
Reaction score
0
how to get 1 word in chat samp ?
Example : when have "word" in a chat samp,execute a code.
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
4
Code:
{$CLEO}

0000: NOP

const
SAMP_CHAT_INFO_OFFSET = 0x212A6C //0.3z
end

:A
wait 0
if
0AB0: // vk key
jf @A
0AB1: call @getChatEntryText 1 id 99 to 1@
if
0AD4: $not_used = 1@ format "WORD" $not_used2
jf @A
// do shit
goto @A

:getChatEntryText
wait 500
0AB1: call @GetSampBase 0 1@
1@ += SAMP_CHAT_INFO_OFFSET
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 // size of stChatEntry
005A: 1@ += 0@ // (int)
1@ += 28
0AB2: ret 1 1@

:GetSampBase
0AA2: 31@ = load_library "kernel32.dll" // IF and SET
0AA4: 30@ = get_proc_address "GetModuleHandleA" library 31@ // IF and SET
0AA7: call_function 30@ num_params 1 pop 0 "samp.dll" 0@
0ab2: ret 1 0@
 

kakaka

Active member
Joined
Jun 7, 2014
Messages
59
Reaction score
0
TH3RM4L link said:
Code:
{$CLEO}

0000: NOP

const
SAMP_CHAT_INFO_OFFSET = 0x212A6C //0.3z
end

:A
wait 0
if
0AB0: // vk key
jf @A
0AB1: call @getChatEntryText 1 id 99 to 1@
if
0AD4: $not_used = 1@ format "WORD" $not_used2
jf @A
// do shit
goto @A

:getChatEntryText
wait 500
0AB1: call @GetSampBase 0 1@
1@ += SAMP_CHAT_INFO_OFFSET
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 // size of stChatEntry
005A: 1@ += 0@ // (int)
1@ += 28
0AB2: ret 1 1@

:GetSampBase
0AA2: 31@ = load_library "kernel32.dll" // IF and SET
0AA4: 30@ = get_proc_address "GetModuleHandleA" library 31@ // IF and SET
0AA7: call_function 30@ num_params 1 pop 0 "samp.dll" 0@
0ab2: ret 1 0@

thanks i love ou again =D
 
Status
Not open for further replies.
Top