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

Youtube MotD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-15-2012 , 19:16   Youtube MotD
Reply With Quote #1

so if a client closes the motd panel I send to him using:
PHP Code:
ShowMOTDPanel(client"Youtube:", <myYoutubeLink>, MOTDPANEL_TYPE_URL); 
the youtube vid keeps playing in the background.. how to prevent that?

edit: and 50% of the time the youtube controls are unclickable... is there any way to fix that as well?

Last edited by Dreamy; 03-15-2012 at 19:21.
Dreamy is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-15-2012 , 20:21   Re: Youtube MotD
Reply With Quote #2

im pretty sure that you can set a panel's okay button to send a command client side, with that you coulkd make it do sm_stopyoutube with would send a hidden url that would stop the youtube video
Mitchell is offline
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-15-2012 , 21:25   Re: Youtube MotD
Reply With Quote #3

ty vm! according to psychonic's dynamic motd plugin you can simply hook "closed_htmlpage".. ill try that out tmr!
Dreamy is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 03-15-2012 , 22:08   Re: Youtube MotD
Reply With Quote #4

ProdigySim's youtube test.html XD
__________________
sorry, for my poor english.

Last edited by mcpan313; 03-15-2012 at 22:08.
mcpan313 is offline
Send a message via MSN to mcpan313
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-16-2012 , 13:37   Re: Youtube MotD
Reply With Quote #5

great idea, I can even set when the video should stop playin if I embedded it in a html page..
so I just throw the page on the server and do it like this? :

PHP Code:
ShowMOTDPanel(client"Youtube:", <PathToHtmlPage>, MOTDPANEL_TYPE_FILE); 
Dreamy is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-16-2012 , 14:24   Re: Youtube MotD
Reply With Quote #6

Quote:
Originally Posted by Mitchell View Post
im pretty sure that you can set a panel's okay button to send a command client side, with that you coulkd make it do sm_stopyoutube with would send a hidden url that would stop the youtube video
That doesn't work in at least CSS, TF2, and ND.

There are a set 6 commands that you can send, identified by a numeric index.

From my plugin,
Code:
enum /* Ep2vMOTDCmd */ {     Cmd_None,     Cmd_JoinGame,     Cmd_ChangeTeam,     Cmd_Impulse101,     Cmd_MapInfo,     Cmd_ClosedHTMLPage,     Cmd_ChooseTeam, };

Quote:
Originally Posted by Dreamy View Post
great idea, I can even set when the video should stop playin if I embedded it in a html page..
so I just throw the page on the server and do it like this? :

PHP Code:
ShowMOTDPanel(client"Youtube:", <PathToHtmlPage>, MOTDPANEL_TYPE_FILE); 
closed_htmlpage won't automatically get send unless you send 5 (Cmd_ClosedHTMLPage) as the "cmd" value. ShowMOTDPanel doesn't send any cmd value by default, but you can copy it (it's a stock) and it that into your own version.
psychonic is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 03-17-2012 , 05:42   Re: Youtube MotD
Reply With Quote #7

A good method I've seen is hook player_team, and then send about:blank to them.
__________________
Dr. McKay 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 10:34.


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