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
Warning
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 sv_daylighttime
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.
GNU General Public License
edited 10×, last 09.03.23 10:39:00 am
Approved by DC
Download
728 b, 343 Downloads