• Daytime script working with the servers time
    6 replies, posted
Well I found a daytime script on gmod.org and I'm not sure how it works exactly [PHP]// table. local daylight = { }; // variables. local DAY_LENGTH = 120 * 24; // 24 hours local DAY_START = 5 * 120; // 5:00am local DAY_END = 18.5 * 120; // 6:30pm local DAWN = ( DAY_LENGTH / 4 ); local DAWN_START = DAWN - 244; local DAWN_END = DAWN + 244; local NOON = DAY_LENGTH / 2; local DUSK = DAWN * 3; local DUSK_START = DUSK - 244; local DUSK_END = DUSK + 244; local LIGHT_LOW = string.byte( 'b' ); local LIGHT_HIGH = string.byte( 'z' ); [/PHP]I saw this and I'm not sure if it works by seconds or minutes, if it works by minutes, can someone make the time realistic, or just completely make the script work with the servers time? Thanks in advance [URL]http://www.garrysmod.org/downloads/?a=view&id=75912[/URL]
That script is quite clearly wrong. DAY_LENGTH = 3600 * 24 If it's using seconds. Otherwise 60*24.
[QUOTE=|FlapJack|;23904826]That script is quite clearly wrong. DAY_LENGTH = 3600 * 24 If it's using seconds. Otherwise 60*24.[/QUOTE] And then it should be realistic? Or more realistic.
not sure, haven't read the rest of it. Obviously, whoever wrote it has no idea about basic maths.
Hah, well I'll try it, thanks!
[QUOTE=|FlapJack|;23905236]not sure, haven't read the rest of it. Obviously, whoever wrote it has no idea about basic maths.[/QUOTE] I wrote it, the math isn't wrong it just isn't realistic time.
[QUOTE=foszor;23907004]I wrote it, the math isn't wrong it just isn't realistic time.[/QUOTE] Ah. Explains that.
Sorry, you need to Log In to post a reply to this thread.