AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Dynamic image size in MOTD (https://forums.alliedmods.net/showthread.php?t=130233)

Backstabnoob 06-21-2010 16:36

Dynamic image size in MOTD
 
Hi, is it possible to make image in MOTD depend on his resolution? I actually tried like <img src="..." style="width:40%">, but it was still at the original size (like that players with 1280x1024 has a nice image that actually fits right on their monitor... and players with 800x600 won't see more than 1/4 of the image without scrolling). The style thing works only in browser, not ingame. Any help?

ot_207 06-21-2010 16:50

Re: Dynamic image size in MOTD
 
I do not think that it is possible. Only if there is a way for you to detect his resolution, I do not know if clients have cvars for that.

Backstabnoob 06-21-2010 17:23

Re: Dynamic image size in MOTD
 
Oh, it's a pity.

ot_207 06-21-2010 17:24

Re: Dynamic image size in MOTD
 
Quote:

Originally Posted by Backstabnoob (Post 1215710)
Oh, it's a pity.

A way would be of asking the player for his resolution through a menu. And if he answers the menu you will remember him in a MYSQL database but this solution seems a bit too much.

fysiks 06-21-2010 18:18

Re: Dynamic image size in MOTD
 
I'm not sure if it will work but you could try a division or table with a background image and have that block element with 100% size.

Hawk552 06-21-2010 22:48

Re: Dynamic image size in MOTD
 
Quote:

Originally Posted by fysiks (Post 1215793)
I'm not sure if it will work but you could try a division or table with a background image and have that block element with 100% size.

I think that'll just cause clipping.

You can hack it up using JS, but I don't think the CS browser supports it.


All times are GMT -4. The time now is 14:56.

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