AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   EngFunc_LightStyle (https://forums.alliedmods.net/showthread.php?t=174945)

Bos93 12-27-2011 17:22

EngFunc_LightStyle
 
engfunc(EngFunc_LightStyle, 0, "f")

: I am setting an illumination level for the 1 round.How to restore default map illumination level back ?

avril-lavigne 12-27-2011 23:53

Re: EngFunc_LightStyle
 
u can just use set_lights

drekes 12-28-2011 06:52

Re: EngFunc_LightStyle
 
Quote:

Originally Posted by avril-lavigne (Post 1620797)
u can just use set_lights

It's the same thing.


@OP:
IIRC light level "m" is the default one.
So just use engfunc(EngFunc_LightStyle, 0, "m");

Bos93 12-28-2011 08:38

Re: EngFunc_LightStyle
 
drekes,thank you

ConnorMcLeod 12-28-2011 12:29

Re: EngFunc_LightStyle
 
EngFunc_SetLights is not enough to fully convert set_lights.
Connecting players could have blinking lights.
Players arms could be wrongly colored.
Also, "m" is not the default light on every maps.

That's why it's really better to use set_lights
To restore original light, just pass "#OFF" as arg.
http://www.amxmodx.org/funcwiki.php?go=func&id=371

Little tip : to set something like FULLBRIGHT you can pass "A"

Bos93 12-28-2011 12:57

Re: EngFunc_LightStyle
 
ConnorMcLeod, Thank you very much :)

artist 04-03-2014 11:19

Re: EngFunc_LightStyle
 
Why blink?
As if set two letters ...

Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
        set_light_hour()
}
public set_light_hour()
{
        new hour[3]; get_time("%H", hour, charsmax(hour))

        switch(str_to_num(hour))
        {
                case 0: engfunc(EngFunc_LightStyle, 0, "a")
                case 1: engfunc(EngFunc_LightStyle, 0, "b")
                case 2: engfunc(EngFunc_LightStyle, 0, "c")
                case 3: engfunc(EngFunc_LightStyle, 0, "d")
                case 4: engfunc(EngFunc_LightStyle, 0, "e")
                case 5: engfunc(EngFunc_LightStyle, 0, "f")
                case 6: engfunc(EngFunc_LightStyle, 0, "h")
                case 7: engfunc(EngFunc_LightStyle, 0, "k")
                case 8: engfunc(EngFunc_LightStyle, 0, "n")
                case 9: engfunc(EngFunc_LightStyle, 0, "w")
                case 10: engfunc(EngFunc_LightStyle, 0, "x")
                case 11: engfunc(EngFunc_LightStyle, 0, "y")
                case 12: engfunc(EngFunc_LightStyle, 0, "z")
                case 13: engfunc(EngFunc_LightStyle, 0, "y")
                case 14: engfunc(EngFunc_LightStyle, 0, "x")
                case 15: engfunc(EngFunc_LightStyle, 0, "w")
                case 16: engfunc(EngFunc_LightStyle, 0, "u")
                case 17: engfunc(EngFunc_LightStyle, 0, "p")
                case 18: engfunc(EngFunc_LightStyle, 0, "n")
                case 19: engfunc(EngFunc_LightStyle, 0, "k")
                case 20: engfunc(EngFunc_LightStyle, 0, "j")
                case 21: engfunc(EngFunc_LightStyle, 0, "h")
                case 22: engfunc(EngFunc_LightStyle, 0, "d")
                case 23: engfunc(EngFunc_LightStyle, 0, "b")
        }
}


Buckshot 04-03-2014 21:41

Re: EngFunc_LightStyle
 
Quote:

Originally Posted by artist (Post 2119631)
Why blink?
As if set two letters ...

Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
        set_light_hour()
}
public set_light_hour()
{
        new hour[3]; get_time("%H", hour, charsmax(hour))

        switch(str_to_num(hour))
        {
                case 0: engfunc(EngFunc_LightStyle, 0, "a")
                case 1: engfunc(EngFunc_LightStyle, 0, "b")
                case 2: engfunc(EngFunc_LightStyle, 0, "c")
                case 3: engfunc(EngFunc_LightStyle, 0, "d")
                case 4: engfunc(EngFunc_LightStyle, 0, "e")
                case 5: engfunc(EngFunc_LightStyle, 0, "f")
                case 6: engfunc(EngFunc_LightStyle, 0, "h")
                case 7: engfunc(EngFunc_LightStyle, 0, "k")
                case 8: engfunc(EngFunc_LightStyle, 0, "n")
                case 9: engfunc(EngFunc_LightStyle, 0, "w")
                case 10: engfunc(EngFunc_LightStyle, 0, "x")
                case 11: engfunc(EngFunc_LightStyle, 0, "y")
                case 12: engfunc(EngFunc_LightStyle, 0, "z")
                case 13: engfunc(EngFunc_LightStyle, 0, "y")
                case 14: engfunc(EngFunc_LightStyle, 0, "x")
                case 15: engfunc(EngFunc_LightStyle, 0, "w")
                case 16: engfunc(EngFunc_LightStyle, 0, "u")
                case 17: engfunc(EngFunc_LightStyle, 0, "p")
                case 18: engfunc(EngFunc_LightStyle, 0, "n")
                case 19: engfunc(EngFunc_LightStyle, 0, "k")
                case 20: engfunc(EngFunc_LightStyle, 0, "j")
                case 21: engfunc(EngFunc_LightStyle, 0, "h")
                case 22: engfunc(EngFunc_LightStyle, 0, "d")
                case 23: engfunc(EngFunc_LightStyle, 0, "b")
        }
}


This thread is from 2011.. I don't think he is still looking for a solution..

artist 04-05-2014 12:55

Re: EngFunc_LightStyle
 
I asked for yourself ))

avril-lavigne 04-05-2014 13:55

Re: EngFunc_LightStyle
 
для этого есть amx-x.ru где ты и сидишь лол


All times are GMT -4. The time now is 12:01.

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