Raised This Month: $51 Target: $400
 12% 

set_lights() / EngFunc_LightStyle


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sgtbane
Member
Join Date: Feb 2006
Old 04-01-2007 , 03:18   set_lights() / EngFunc_LightStyle
Reply With Quote #1

engine:
Code:
set_lights("a")

fakemeta:
Code:
engfunc(EngFunc_LightStyle,0,"a")

both of them do the same thing, but there is a problem...
when using the fakemeta method, it does not always make the players darker as well.

eg: in maps like de_dust and cs_assault when standing in the open you stick out like a sore thumb. though when trying to see the light level of the player it says its much darker then its showing up as.

(method used to find level)
Code:
public client_PreThink(id) {     if (!is_user_alive(id)) return PLUGIN_CONTINUE     new Float:lambert     pev(id,pev_light_level,lambert)     client_print(id,print_center,"lambert: %i",floatround(lambert))     return PLUGIN_CONTINUE }

it will do the same when using other values besides "a" as a flag, but only in certian spots.

does anyone know why it does this? am I maby using this wrong?
Code:
engfunc(EngFunc_LightStyle,<THISTHING>,"a")
I have tried using different numbers for "<THISTHING>" but only 0 gives me results, and it says its an integer. whats that number used for anyways?
__________________
[Add|Community]

~SgtBane
sgtbane is offline
Send a message via MSN to sgtbane
SAMURAI16
BANNED
Join Date: Sep 2006
Old 04-01-2007 , 04:30   Re: set_lights() / EngFunc_LightStyle
Reply With Quote #2

1) Why are you use fakemeta functions in a engine forward ?
2) For engfunc(EngFunc_LightStyle,<THISTHING>,"a")
Try one if this :
Code:
#define EF_BRIGHTFIELD 1      // Swirling cloud of particles
#define EF_MUZZLEFLASH 2           // Single frame ELIGHT on entity attachment 0
#define EF_BRIGHTLIGHT 4           // DLIGHT centered at entity origin
#define EF_DIMLIGHT 8              // Player flashlight
#define EF_INVLIGHT 16           // Get lighting from ceiling
#define EF_NOINTERP 32         // Don't interpolate the next frame
#define EF_LIGHT 64             // Rocket flare glow sprite
#define EF_NODRAW 128      // Don't draw entity
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
VEN
Veteran Member
Join Date: Jan 2005
Old 04-01-2007 , 04:55   Re: set_lights() / EngFunc_LightStyle
Reply With Quote #3

Make sure that CVars values for sv_skycolor_<r|g|b> is equal to 0.

Quote:
Try one if this
This isn't for that. It's for effects pev.
VEN is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 04-01-2007 , 04:58   Re: set_lights() / EngFunc_LightStyle
Reply With Quote #4

yeah i know, i just say try
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
sgtbane
Member
Join Date: Feb 2006
Old 04-01-2007 , 13:10   Re: set_lights() / EngFunc_LightStyle
Reply With Quote #5

your right, I shouldn't mix engine and fakemeta. that was an accident. Though client_prethink(id) was working without the engine module enabled :S

Code:
public plugin_init() {     register_forward(FM_PlayerPreThink,"Forward_PreThink") } public Forward_PreThink(id) {     if (!is_user_alive(id)) return FMRES_IGNORED     new Float:lambert     pev(id,pev_light_level,lambert)     client_print(id,print_center,"lambert: %i",floatround(lambert))     return FMRES_IGNORED }

Im gonna try the skycolor thing and report back with the results.

edit:
I tried the sv_skycolor_r|g|b and it did the trick
Thankyou very much VEN!
__________________
[Add|Community]

~SgtBane

Last edited by sgtbane; 04-01-2007 at 13:19.
sgtbane is offline
Send a message via MSN to sgtbane
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