Raised This Month: $ Target: $400
 0% 

Add brightness in this message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-17-2008 , 09:28   Add brightness in this message
Reply With Quote #1

I'm using
PHP Code:
engfunc(EngFunc_LightStyle0"b"
And I want to make the view brighter in this message:
PHP Code:
message_begin(MSG_ONE98, {000}, id)
write_short(1<<0)
write_short(1<<0)
write_short(1<<2)
write_byte(128// Red
write_byte(0// Green
write_byte(32// Blue
write_byte(120)
message_end() 
Is it possible? Or I'll have to do it by some other way? If so, how?

BTW I took this message from Predator Mode.
__________________

Last edited by hleV; 08-17-2008 at 09:30.
hleV is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-17-2008 , 09:30   Re: Add brightness in this message
Reply With Quote #2

http://wiki.amxmodx.org/Half-Life_1_...nts#ScreenFade

Play with the last arg.
__________________
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-17-2008 , 10:12   Re: Add brightness in this message
Reply With Quote #3

Thanks. Seems like it's not what I wanted.

Can I change the brightness level for a single client?
PHP Code:
engfunc(EngFunc_LightStyle0"b"
This is for everyone.

BTW I'm doing this because NVGs are dropping fps to many players in my server. I need an alternative. The message seems to change the color of the screen but it's still hard to see in the dark.
__________________

Last edited by hleV; 08-17-2008 at 10:20.
hleV is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-17-2008 , 10:20   Re: Add brightness in this message
Reply With Quote #4

Quote:
Originally Posted by hleV View Post
Thanks. Seems like it's not what I wanted.

Can I change the brightness level for a single client?
PHP Code:
engfunc(EngFunc_LightStyle0"b"
This is for everyone.

BTW I'm doing this because NVGs are dropping fps to many players in my server. I need an alternative.
Use an dynamic light,like this:
Code:
#define TE_DLIGHT                   27       // Dynamic light, effect world, minor entity effect
// write_byte(TE_DLIGHT)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_byte(radius in 10's) 
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(life in 10's)
// write_byte(decay rate in 10's)
Use the player position as origin,a big radius, and set a repeating task according to the duration you specified. Lower task time = more responsive.

It 'll flicker a bit,don't worry about that.
danielkza is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-17-2008 , 10:52   Re: Add brightness in this message
Reply With Quote #5

Quote:
Originally Posted by hleV View Post
NVGs are dropping fps to many players in my server. I need an alternative.
Custom NVG Colors plugin also drops fps.
__________________
hleV is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-17-2008 , 11:08   Re: Add brightness in this message
Reply With Quote #6

Quote:
Originally Posted by hleV View Post
Custom NVG Colors plugin also drops fps.
I tested here and got exactly the same FPS as before. Or you have some really old machines or there's another problem.
danielkza is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-17-2008 , 14:00   Re: Add brightness in this message
Reply With Quote #7

Quote:
Originally Posted by danielkza View Post
I tested here and got exactly the same FPS as before. Or you have some really old machines or there's another problem.
I believe normal NVG also doesn't drop your fps.
BTW using that I would need to set a task that is very frequent and can make some lag.

I believe there are other ways.
__________________

Last edited by hleV; 08-17-2008 at 14:10.
hleV is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-17-2008 , 15:15   Re: Add brightness in this message
Reply With Quote #8

Quote:
Originally Posted by hleV View Post
I believe normal NVG also doesn't drop your fps.
BTW using that I would need to set a task that is very frequent and can make some lag.

I believe there are other ways.
Actually,normal NVG drops me 10-20 fps,but this method does not. And as far as I now, the task can be done in 0.2 - 0.5 sec, even more, wich is not much. Only a real world test will tell that.
danielkza is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-17-2008 , 18:41   Re: Add brightness in this message
Reply With Quote #9

You can believe me or not but I've tried that way. Task 0.1 - nice, 0.2 or more - SUCKS!

BTW the fps is worse than with NVG (nothing - 100, NVG - 85, DLight - 50-60).

Any other ways to add brightness without losing fps?
__________________
hleV 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 03:11.


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