Raised This Month: $32 Target: $400
 8% 

VGUI Local File


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PMA.Predator
Member
Join Date: Jan 2012
Old 01-15-2012 , 04:15   VGUI Local File
Reply With Quote #1

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
PMA.Predator is offline
API
Veteran Member
Join Date: May 2006
Old 01-23-2012 , 19:35   Re: VGUI Local File
Reply With Quote #2

Try: Messages->SendVGUIMessage(1, "1", "C:\\CSS\\css\\cstrike\\addons\\results.html" , "Match Admin Results");
__________________
API is offline
Send a message via AIM to API
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode