CLEO Help Question

CLEO related
Status
Not open for further replies.

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
So i just want know... , possible with rcp detect chat text color and do with it checks... ?
If possible can explane how?

@0B36
@0x32789
@springfield
@Opcode.eXe
@monday
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
RPC_ClientMessage, DWORD color & DWORD strLen & char[] msg

Code:
DWORD color;
DWORD strlen;
char string[256];
params->bitStream->ResetReadPointer();
params->bitStream->Read(color);
params->bitStream->Read(strlen);
params->bitStream->Read(string, strlen);
string[strlen] = '\0';


RPC_SendChat, DWORD respLen & char[] text

Code:
ERROR: The specified RPC doesn't contain color parameter.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
I trying get CLIENT MESSAGE text color, do you know where is problem?

[shcode=cpp]
{$CLEO}
{$INCLUDE SF}
0000:

REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
wait 0
end

:in_rpc
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE
then
0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len

0AC8: 4@ = allocate_memory_size 144
0BE8: raknet bit_stream 1@ read_array 5@ size 2@ // read color
0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message
0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
chatmsg "Text: %s" -1 4@
chatmsg "Color: %x" -1 5@
0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true

[/shcode]
@springfield
 

ini

Well-known member
Joined
Sep 28, 2015
Messages
321
Reaction score
115
If you want to learn more about the rpc's , basically play with the rpc's to understand what info the rpc contains, i recomend you to use http://ugbase.eu/Thread-App-RakSAMP-Lua--15460

The raksamp process the RPC_ClientMessage
where is used for add colors into the web ui chat.
 
Status
Not open for further replies.
Top