if (params->packetId == ScriptRPCEnumeration::RPC_ScrShowDialog)
{
stSAMPDialog sampDialog;
BitStream bsData;
params->bitStream->Read(sampDialog.wDialogID);
params->bitStream->Read(sampDialog.bDialogStyle);
params->bitStream->Read(sampDialog.bTitleLength);
params->bitStream->Read(sampDialog.szTitle, sampDialog.bTitleLength);
sampDialog.szTitle[sampDialog.bTitleLength] = 0;
params->bitStream->Read(sampDialog.bButton1Len);
params->bitStream->Read(sampDialog.szButton1, sampDialog.bButton1Len);
sampDialog.szButton1[sampDialog.bButton1Len] = 0;
params->bitStream->Read(sampDialog.bButton2Len);
params->bitStream->Read(sampDialog.szButton2, sampDialog.bButton2Len);
sampDialog.szButton2[sampDialog.bButton2Len] = 0;
SF->getRakNet()->DecodeString(sampDialog.szInfo, 256, params->bitStream);
char buff[64];
sprintf(buff, "%d", sampDialog.wDialogID);
if ((statusinfo == 1) && (sampDialog.wDialogID == 74))
{
statusinfo = 0;
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0xAA, 0), "%s", buff);
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0xAA, 0), sampDialog.szInfo);
}
};
void CALLBACK getdialogtext(std::string param)
{
statusinfo = 1;
SF->getSAMP()->getPlayers()->pLocalPlayer->Say("/mn");
}