Raised This Month: $ Target: $400
 0% 

Dynamic image size in MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-21-2010 , 16:36   Dynamic image size in MOTD
Reply With Quote #1

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?
Backstabnoob is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-21-2010 , 16:50   Re: Dynamic image size in MOTD
Reply With Quote #2

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.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-21-2010 , 17:23   Re: Dynamic image size in MOTD
Reply With Quote #3

Oh, it's a pity.
Backstabnoob is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-21-2010 , 17:24   Re: Dynamic image size in MOTD
Reply With Quote #4

Quote:
Originally Posted by Backstabnoob View Post
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.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-21-2010 , 18:18   Re: Dynamic image size in MOTD
Reply With Quote #5

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.
__________________
fysiks is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-21-2010 , 22:48   Re: Dynamic image size in MOTD
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 14:56.


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