AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Youtube video in MOTD (https://forums.alliedmods.net/showthread.php?t=339276)

MrPickles 08-29-2022 19:20

Youtube video in MOTD
 
Hi!, i wanna add a video of youtube in a MOTD, its possible? and how can i do it, and other doubt, if its possible to add buttons to the MOTD, like the main motd and 2 buttons for rules 1 and 2, if u pick rules 1, other motd appears with the rules 1, thanks!

fysiks 08-29-2022 21:35

Re: Youtube video in MOTD
 
The MOTD is a simple web browser (it doesn't support of of the fancier stuff). Typically, the best you can do is to point it to a website (that has been tested to work with the simple web server). So, you can have links and buttons to open different pages for your rules and stuff. It will need to be hosted on a public web server.

I've never tried to embed a YouTube video. I would guess it wouldn't work but it might (I think someone once said that Counter-Strike 1.6 has a newer web browser engine than what I play (Day of Defeat).

EDIT: I tested a YouTube video in an iframe and it didn't work for me.

MrPickles 08-29-2022 22:34

Re: Youtube video in MOTD
 
Quote:

Originally Posted by fysiks (Post 2787712)
The MOTD is a simple web browser (it doesn't support of of the fancier stuff). Typically, the best you can do is to point it to a website (that has been tested to work with the simple web server). So, you can have links and buttons to open different pages for your rules and stuff. It will need to be hosted on a public web server.

I've never tried to embed a YouTube video. I would guess it wouldn't work but it might (I think someone once said that Counter-Strike 1.6 has a newer web browser engine than what I play (Day of Defeat).

EDIT: I tested a YouTube video in an iframe and it didn't work for me.

mm HL1 only shows plain text, not HTML, is there a way to update the MOTD for HTML, just like CS 1.6?

fysiks 08-29-2022 22:58

Re: Youtube video in MOTD
 
Looks like the MOTD in Half-Life was discussed here.

armis12 01-20-2024 07:17

Re: Youtube video in MOTD
 
So, adding a YouTube video to an MOTD, right? I did something similar for my gaming server once. What you need to do is grab the Embed'code from the YouTube video. Just hit Share under the video and click on Embed. Then you copy this code and paste it into your MOTD. It's a bit of copy-pasting, but it works.

For the buttons thing, it's a little more complicated. You're gonna need some basic HTML and maybe a touch of JavaScript. I made buttons once for a different project. They weren't perfect, but they did the job. Look up some simple tutorials online, they'll guide you through making these buttons that can switch between different MOTDs.

Oh, and for making cool stuff for your MOTD, I found this neat video editor, https://www.movavi.com/mac-video-editor/. It's pretty straightforward and has some cool features that might help you jazz up your content. I used it for some of my own stuff, and it's pretty handy.

mlibre 01-20-2024 19:07

Re: Youtube video in MOTD
 
does not allow js

DJEarthQuake 01-29-2024 10:27

Re: Youtube video in MOTD
 
Youtube videos worked several years ago in MOTD. The end was surrounding the time CS:GO had some money laundering activities from the containers.

mlibre 01-29-2024 10:39

Re: Youtube video in MOTD
 
html5 made things easier

IC3k1ng 03-27-2024 17:55

Re: Youtube video in MOTD
 
Quote:

Originally Posted by armis12 (Post 2816303)
So, adding a YouTube video to an MOTD, right? I did something similar for my gaming server once. What you need to do is grab the Embed'code from the YouTube video. Just hit Share under the video and click on Embed. Then you copy this code and paste it into your MOTD. It's a bit of copy-pasting, but it works.

For the buttons thing, it's a little more complicated. You're gonna need some basic HTML and maybe a touch of JavaScript. I made buttons once for a different project. They weren't perfect, but they did the job. Look up some simple tutorials online, they'll guide you through making these buttons that can switch between different MOTDs.

Oh, and for making cool stuff for your MOTD, I found this neat video editor, https://www.movavi.com/mac-video-editor/. It's pretty straightforward and has some cool features that might help you jazz up your content. I used it for some of my own stuff, and it's pretty handy.

Why not just upload video file to some platform like Thumbsnap? He can get direct video link from there and use it with video tag if he wants to make it play when player joins.
Quote:

Originally Posted by MrPickles (Post 2787715)
mm HL1 only shows plain text, not HTML, is there a way to update the MOTD for HTML, just like CS 1.6?

No, there isn't any form to change MOTD to make it HTML. It stills same since WON / CD Release. Never touched.

IC3k1ng 03-31-2024 10:14

Re: Youtube video in MOTD
 
Quote:

Originally Posted by mlibre (Post 2816919)
html5 made things easier

Well yes, but you can also count CSS for styling. It's easy to understand it and helps you to make it look different than an old 90s website. For example, this one: https://cscontrol.ru/load/server/plu...th-knight.html

https://cscontrol.ru/_ld/33/93844974.jpg

You can also style your MOTD inside HTML file using style tag without linking a CSS stylesheet. Example: https://cdn01.counterstrike.com.pk/g...tent/motd.html

https://i.postimg.cc/hG25Kpz3/Screen...e-Pakistan.png


All times are GMT -4. The time now is 15:53.

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