Edit : Fixed
uintptr_t SendChatPacketAddress = 0x1234AB;
typedef bool ( __thiscall* tSendChatPacket )( void* This, const char* c_szChat, BYTE byType); tSendChatPacket SendChatPacket = ( tSendChatPacket ) SendChatPacketAddress;
SendChatPacket (CPythonNetworkStreamInstance, "Hello World", CHAT_TYPE);
Quote:
Why use inline assembly and call NetworkStream functions by packet structure when you can do this:
Declare and define the address of the game function you want to call
Create a prototype for the function you want to callCode:uintptr_t SendChatPacketAddress = 0x1234AB;
Call itCode:typedef bool ( __thiscall* tSendChatPacket )( void* This, const char* c_szChat, BYTE byType); tSendChatPacket SendChatPacket = ( tSendChatPacket) SendChatPacketAddress;
Do you REALLY need (for some reason) to call the function in the way you've showed? Otherwise, it's much better to make a prototype and call itCode:SendChatPacket (CPythonNetworkStreamInstance, "Hello World", CHAT_TYPE);