I want it to be able to not even show the VGUIMenu in event scripts upon opening or in the usermsg.hidemotd. I want this feature so I can popup a song URL then close it so my users won't get an annoying motd everything they/admins want to play a song and play it then the MOTD pops up and can ruin their surf or their game.
Thanks Mattie!
Errant told me only you could do this so I really hope you see this/work on it :)
Thanks Mattie!
Errant told me only you could do this so I really hope you see this/work on it :)
Our server has written a script in sourcemod that does this very thing, allows a url to open without any MOTD or panel clientside. I'll paste a snippet of what calls the method, ShowVGUIPanel() and forces it to be hidden:
new Handle:Kv = CreateKeyValues("data");
KvSetString(Kv, "title", "YOU SHOULDNT SEE THIS");
KvSetString(Kv, "type", "2"); //2 for URL
KvSetString(Kv, "msg", buffer);
ShowVGUIPanel(i, "info", Kv, false); //last false sets visible false
CloseHandle(Kv);
Consider this a clarification of what method will allow this and a second request for this feature. Thanks!
new Handle:Kv = CreateKeyValues("data");
KvSetString(Kv, "title", "YOU SHOULDNT SEE THIS");
KvSetString(Kv, "type", "2"); //2 for URL
KvSetString(Kv, "msg", buffer);
ShowVGUIPanel(i, "info", Kv, false); //last false sets visible false
CloseHandle(Kv);
Consider this a clarification of what method will allow this and a second request for this feature. Thanks!
Mattie posted on 2008-05-14 22:06:47
Have you tried using usermsg directly for this? In other words, hacking this code a bit to do what you wanted?
es.usermsg('create','motd','VGUIMenu')
es.usermsg('write','string','motd','info')
# change to 0 here to hide the menu maybe?
es.usermsg('write','byte','motd',0)
es.usermsg('write','byte','motd',3)
es.usermsg('write','string','motd','title')
es.usermsg('write','string','motd',arg2)
es.usermsg('write','string','motd','type')
es.usermsg('write','string','motd',arg1)
es.usermsg('write','string','motd','msg')
es.usermsg('write','string','motd',arg3)
es.usermsg('send','motd',userid)
es.usermsg('delete','motd')
es.usermsg('create','motd','VGUIMenu')
es.usermsg('write','string','motd','info')
# change to 0 here to hide the menu maybe?
es.usermsg('write','byte','motd',0)
es.usermsg('write','byte','motd',3)
es.usermsg('write','string','motd','title')
es.usermsg('write','string','motd',arg2)
es.usermsg('write','string','motd','type')
es.usermsg('write','string','motd',arg1)
es.usermsg('write','string','motd','msg')
es.usermsg('write','string','motd',arg3)
es.usermsg('send','motd',userid)
es.usermsg('delete','motd')




krang posted on 2008-05-11 16:25:39