Raised This Month: $ Target: $400
 0% 

MOTD Auto-Close?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mjnichols
Junior Member
Join Date: Dec 2013
Old 12-08-2013 , 20:47   MOTD Auto-Close?
Reply With Quote #1

Hello, I'd like the MOTD on my CS:GO server to automatically close after 30 seconds. How could I go about doing this? Thanks ahead of time.
mjnichols is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-08-2013 , 22:27   Re: MOTD Auto-Close?
Reply With Quote #2

Open a hidden motd in the background and it will close the panel
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
mjnichols
Junior Member
Join Date: Dec 2013
Old 12-09-2013 , 00:20   Re: MOTD Auto-Close?
Reply With Quote #3

Quote:
Originally Posted by friagram View Post
Open a hidden motd in the background and it will close the panel
How would I go about doing this automatically? Would it be done through a script?
mjnichols is offline
mjnichols
Junior Member
Join Date: Dec 2013
Old 12-10-2013 , 04:45   Re: MOTD Auto-Close?
Reply With Quote #4

bump
mjnichols is offline
DJ Data
SourceMod Donor
Join Date: Dec 2012
Location: Switzerland
Old 12-11-2013 , 15:44   Re: MOTD Auto-Close?
Reply With Quote #5

Depends if Javascript is allowed in the MOTD.
__________________
SourcePawn Coding Level: Novice
DJ Data is offline
mjnichols
Junior Member
Join Date: Dec 2013
Old 12-14-2013 , 03:14   Re: MOTD Auto-Close?
Reply With Quote #6

Quote:
Originally Posted by DJ Data View Post
Depends if Javascript is allowed in the MOTD.
I'm still confused on how to incorporate this into the server...
mjnichols is offline
Nuklier
Junior Member
Join Date: Oct 2014
Old 10-07-2014 , 17:34   Re: MOTD Auto-Close?
Reply With Quote #7

up. i want the same thing but dont know how to make it...... Help? Please? ^_^
Nuklier is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 10-07-2014 , 18:29   Re: MOTD Auto-Close?
Reply With Quote #8

Quote:
Originally Posted by friagram View Post
Open a hidden motd in the background and it will close the panel
No, it won't. The motd you're opening is different to the original one - that's the first thing. And second, you can display to the player multiple JS motds.

You can try tricky thing - create html file that will be loading another WWW with JS. Then create a timer that will close the window you've opened. However, idk if its going to work - you can't close window with JS that JS havn't opened.
LambdaLambda is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 10-07-2014 , 18:46   Re: MOTD Auto-Close?
Reply With Quote #9

Quote:
Originally Posted by LambdaLambda View Post
No, it won't. The motd you're opening is different to the original one - that's the first thing. And second, you can display to the player multiple JS motds.

You can try tricky thing - create html file that will be loading another WWW with JS. Then create a timer that will close the window you've opened. However, idk if its going to work - you can't close window with JS that JS havn't opened.
you can just make a webpage that has window.close() on it when it loads and have a HIDDEN motd displayed that page after the timer hits 30 seconds.
best bet is if you have a website then make a javascript timer when the motd loads, for better timing.
Mitchell is offline
Nuklier
Junior Member
Join Date: Oct 2014
Old 10-08-2014 , 04:15   Re: MOTD Auto-Close?
Reply With Quote #10

so i need to make in main motd.txt link to web page and in there exemple
[HTML] <html>
<head>
<title>ble ble</title>
<script>
function close_window(url){
var newWindow = window.open('', '_self', '');
window.close(url);
}
</script>
<h1><img alt="" src="http://something something.jpg" style="width: 420px; height: 315px;" /></h1>


</html>
or i'm getting it wrong? it makes me confused i know that it will not work.... so i'm really getting something wrong... i will add timer later if it just work...

Last edited by Nuklier; 10-08-2014 at 04:16.
Nuklier is offline
Reply



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 04:35.


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