Rogerio Santos
Member
- Joined
- Jun 4, 2019
- Messages
- 17
- Solutions
- 1
- Reaction score
- 1
I would like to know how I get a game text on screen? in C ++ or C #
Code by y0mike
void GameText(const char* szText, int iTime, signed int iStyle)
{
typedef void(__stdcall* GameText_t)(const char*, int, signed int);
GameText_t pGameText = (GameText_t)(g_dwSAMP + 0x9C2C0);
return pGameText(szText, iTime, iStyle);
}
samp.GameText("~r~You're gay!", 1000, 5);
It’s will be easier to do it on c++ (internal injection of-course),How I do it in c++ or c#?
You can hook the incoming RPC ID 73 and read out the message buffer.
How I do it in c++ or c#?
case RPC_DisplayGameText:
{
BitStream bsData(rpcParams->input, rpcParams->numberOfBitsOfData / 8, false);
char szMessage[400];
int iType, iTime, iLength;
bsData.Read(iType);
bsData.Read(iTime);
bsData.Read(iLength);
if (iLength > 400) return;
bsData.Read(szMessage, iLength);
szMessage[iLength] = '\0';
if (set.test)
{
addMessageToChatWindow("%s", szMessage);
}
break;
}
}
You need to link DirectX-SDK kit to your project...https://prnt.sc/t58jhr
I tried build, but recivied this errors
Thanks It worked, but how do I use these functions in another project, like a dll?You need to link DirectX-SDK kit to your project...
You need to link it to the other project as well, include them and hook into Render and Reset functions.Thanks It worked, but how do I use these functions in another project, like a dll?