![user](img/i_friend.png)
Version: 1.1
Description
This script adds a day and night cycle to the game and forces players to use lighting engine. Also the night isn't "too dark" like normally by default is.
Config
dayDuration- Length of the day in seconds
dayRange- Array[0] start and Array[1] end of the day in 360 degrees
nightRange- Array[0] start and Array[1] end of the night in 360 degrees
![off-topic](img/v_ot.png)
dayRangeand
nightRangemust fit together the 360 degrees and can't be lower than 1. Also the lower values night has, the shorter it will be.
API
DAY_NIGHT_CYCLE.setTime(time)- Sets current time in 360 degrees and returns mapped time for
![cs2d cmd](img/i_codehelp.png)
DAY_NIGHT_CYCLE.isNight()- Returns
trueif the current cycle is night
DAY_NIGHT_CYCLE.isDay()- Returns
trueif the current cycle is day
Installation
Put the script inside sys/lua/autorun directory.
![IMG:https://i.imgur.com/0M8Zkk3.png](https://i.imgur.com/0M8Zkk3.png)
![>](img/i_next.png)
10× editiert, zuletzt 09.03.23 10:39:00
Zugelassen von DC
Download
728 b, 328 Downloads