0x32789
Expert
Hi, I'm trying to read the messages which are being sent to me by the server, I want to modify the message/do anything I want, but the problem is, I can't find out which RPC receives messages and what is the read pointer for it.
this is what I have tried so far.
and I'm using SF API 5.3.3
[shcode=cpp]
bool CALLBACK incomingRPC(stRakNetHookParams * params)
{
if (params->packetId == ScriptRPCEnumeration::RPC_ScrClientMessage)
{
char string1[64], string2[64], string3[64];
params->bitStream->ResetReadPointer();
params->bitStream->Read(string1);
params->bitStream->Read(string2);
params->bitStream->Read(string3);
params->bitStream->ResetReadPointer();
AddMessageToChat(D3DCOLOR_XRGB(0, 0XAA, 0), "Read: %s - %s - %s", string1, string2, string3);
}
return true;
}
[/shcode]
any help is greatly appreciated.
if I try RPCEnumeration::RPC_CHAT, it outputs random characters but I think RPC_CHAT is what we send, not we receive also anyways this code I posted above, there is no reading or messages in chat even if I type message in chat, I see it when I join the server but it is random characters too but after that, I never see the message. I don't know alot about RPC's and their reading.
this is what I have tried so far.
and I'm using SF API 5.3.3
[shcode=cpp]
bool CALLBACK incomingRPC(stRakNetHookParams * params)
{
if (params->packetId == ScriptRPCEnumeration::RPC_ScrClientMessage)
{
char string1[64], string2[64], string3[64];
params->bitStream->ResetReadPointer();
params->bitStream->Read(string1);
params->bitStream->Read(string2);
params->bitStream->Read(string3);
params->bitStream->ResetReadPointer();
AddMessageToChat(D3DCOLOR_XRGB(0, 0XAA, 0), "Read: %s - %s - %s", string1, string2, string3);
}
return true;
}
[/shcode]
any help is greatly appreciated.
if I try RPCEnumeration::RPC_CHAT, it outputs random characters but I think RPC_CHAT is what we send, not we receive also anyways this code I posted above, there is no reading or messages in chat even if I type message in chat, I see it when I join the server but it is random characters too but after that, I never see the message. I don't know alot about RPC's and their reading.