Hey, I've been working on making a results html display in PMA at the end of a match, but so far I'm having trouble getting a local file to display in the VGUI.
Here's the code I'm using:
Code:
void cMessages::SendVGUIMsg(int index, const char * vguitype, const char *url, const char *title)
{
MRecipientFilter mrf;
mrf.AddRecipient(index);
bf_write *pWrite;
pWrite = pmaEngine->UserMessageBegin( (IRecipientFilter *) &mrf, GetMsgNum("VGUIMenu"));
pWrite->WriteString("info");
pWrite->WriteByte(1);
pWrite->WriteByte(3);
pWrite->WriteString("type");
pWrite->WriteString(vguitype); // 0 = text | 1 = local file | 2 = url
pWrite->WriteString("title");
pWrite->WriteString(title);
pWrite->WriteString("msg");
pWrite->WriteString(url);
pmaEngine->MessageEnd();
}
With the following inputs:
Messages->SendVGUIMessage(1, "2", "http://preds-match-admin.co.uk/", "Match Admin Results");
// Working perfectly
Messages->SendVGUIMessage(1, "1", "motd", "Match Admin Results");
// displays the motd text file in cstrike
Messages->SendVGUIMessage(1, "1", "addons/results.html", "Match Admin Results");
Messages->SendVGUIMessage(1, "1", "../addons/results.html", "Match Admin Results");
Messages->SendVGUIMessage(1, "1", "../cstrike/addons/results.html", "Match Admin Results");
Messages->SendVGUIMessage(1, "1", "C:\CSS\css\cstrike\addons\results.html", "Match Admin Results");
Messages->SendVGUIMessage(1, "1", "../results.html", "Match Admin Results");
Messages->SendVGUIMessage(1, "1", "results.html", "Match Admin Results");
// all displays a blank page
I have tried many different local files and many different paths even using the complete path on the drive, it always shows me a blank page when using 1 with the exception of motd.
I don't quote understand why it's not able to display the results page, I've got cl_disabledhtmlmotd set to 0 so that isn't the problem :/
If anyone has any examples of experience using this it would be great if you could inform me how to overcome this issue! Spent the whole of today trying to fix it >.<
Thanks
- Edd