Since recent csgo updates, it seems like I can't get my motds to display. I'm using a redirect html file and all. Not getting any errors.
Here's a part of the plugin:
PHP Code:
public Action OnCommandShowRules(int client, int args) {
QueryClientConVar(client, "cl_disablehtmlmotd", view_as<ConVarQueryFinished>(ClientConVar), client);
return Plugin_Handled;
}
public ClientConVar(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[]) {
if (IsValidClient(client))
{
if (StrEqual(cvarValue, "1"))
PrintToChat(client, "Your '%s' is set to '%s', please disable it to see the rules", cvarName, cvarValue);
else{
ShowMOTDPanel(client, "Devils Playground - HnS Rules", "http://devilspg.org/HnS/MOTD/rules.html", MOTDPANEL_TYPE_URL);
}
}
}
Here's rules.html
PHP Code:
<html>
<head>
<script type="text/javascript">
window.onload = function(){
<!-- var popup=window.open("http://www.sourcemod.net/sourcemod-site-bounded.png","Test Page :D","height=60,width=393"); -->
var x = screen.width * 0.70;
var y = screen.height * 0.70;
var popup=window.open("http://devilspg.org/HnS/MOTD/index.html","Devils Playground - HnS Rules",'scrollbars=yes,width='+x+',height='+y+',left=0,top=0');
document.write(x+'x'+y);
};
</script>
</head>
<body>
</body>
</html>
Thanks in advance