CLEO Help Get text from chat?

CLEO related
Status
Not open for further replies.

Edd004

Active member
Joined
Mar 10, 2013
Messages
155
Reaction score
0
:computer_guy: are there any snippet/tutorial on getting a text from chat?

example "First one type [glow=red,2,300]blabla[/glow]..."  or "/signcheck [glow=red,2,300]6969[/glow]" - I want to get the [glow=red,2,300]text[/glow]  :forever_hurra:
 

ThermaL

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

:LABEL
wait 0
if
SAMP.Available()
jf [member=23507]Label[/member]
0AC8: 1@ = allocate_memory_size 260
0AB1: call @getChatEntryText 1 CHAT_LINE 99 {99 = LAST} to 1@ {1@ = CHAT LINE TEXT}
0AC8: 2@ = allocate_memory_size 260
if
0AD4: $NOT_USED = 1@ format "THERE WAS A %s" 2@ // this checks if the chat line is like what's between the quotes, whatever is instead of %s is stored in 2@
jf [member=23507]Label[/member]
// so now you can do anything with that text
{printf "%s" 1000 2@
0AF9: "%s" 2@}
goto [member=23507]Label[/member]

:getChatEntryText
0AB1: call @GetSampBase 0 1@
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: 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@
 

Edd004

Active member
Joined
Mar 10, 2013
Messages
155
Reaction score
0
TH3RM4L link said:
Code:
{$CLEO}
0000: NOP

:LABEL
wait 0
if
SAMP.Available()
jf [member=23507]Label[/member]
0AC8: 1@ = allocate_memory_size 260
0AB1: call @getChatEntryText 1 CHAT_LINE 99 {99 = LAST} to 1@ {1@ = CHAT LINE TEXT}
0AC8: 2@ = allocate_memory_size 260
if
0AD4: $NOT_USED = 1@ format "THERE WAS A %s" 2@ // this checks if the chat line is like what's between the quotes, whatever is instead of %s is stored in 2@
jf [member=23507]Label[/member]
// so now you can do anything with that text
{printf "%s" 1000 2@
0AF9: "%s" 2@}
goto [member=23507]Label[/member]

:getChatEntryText
0AB1: call @GetSampBase 0 1@
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: 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@

:urtheman: thx bruh

rasol link said:
What this mean?

can you explain?

Thanks

this used to get a string from the chat and use it automatically  :fuck_yea: example the server make something like "First one type huehue will get $69", the snippet will get "huehue" and you can use it to send the text over the chat instantly  :dont_care: sorry for my bad English and shitty explanation
 

rasol

Well-known member
Joined
Aug 3, 2014
Messages
214
Reaction score
0
Edd004 link said:
:urtheman: thx bruh

this used to get a string from the chat and use it automatically  :fuck_yea: example the server make something like "First one type huehue will get $69", the snippet will get "huehue" and you can use it to send the text over the chat instantly  :dont_care: sorry for my bad English and shitty explanation

Thanks For Your Explain
How i can use it ? is it a cmd or anything?

And i can't compile it

The Error Is:Variable member=23507 is not declared as an array.
 

Edd004

Active member
Joined
Mar 10, 2013
Messages
155
Reaction score
0
rasol link said:
Thanks For Your Explain
How i can use it ? is it a cmd or anything?

And i can't compile it

The Error Is:Variable member=23507 is not declared as an array.
:lol: Ctrl+R and then replace
Code:
[member=23507]Label[/member] with [member=23507]Label[/member]
 
at 0AD4: $NOT_USED = 1@ format "THERE WAS A %s" 2@ line
change THERE WAS A %s to what ever u want, example like i said, "First to type %s will get $69", depend on the server you are playing
 

rasol

Well-known member
Joined
Aug 3, 2014
Messages
214
Reaction score
0
Edd004 link said:
:lol: Ctrl+R and then replace
Code:
[member=23507]Label[/member] with [member=23507]Label[/member]
 
at 0AD4: $NOT_USED = 1@ format "THERE WAS A %s" 2@ line
change THERE WAS A %s to what ever u want, example like i said, "First to type %s will get $69", depend on the server you are playing

ok thanks :urtheman:
 
Status
Not open for further replies.
Top