to support me you can buy this script in the store also give it for nothing but I count on your support
lang=lua-- LUA Script - precede every function and global member with lowercase name of script
local delay = 1000
local nightdelay = 5000
local ambienceintensitymax = 34
local ambienceintensitymin = 0
local ambienceintensity = 34
local ambiencecolormax = 255
local ambiencecolormin = 0
local surfacemin = 80
local ambiencecolor = 255
local ambstep = 0
local state = {}
function daynight_init(e)
state[e] = "day"
ambienceintensity = ambienceintensitymax
ambiencecolor = ambiencecolormax
ambstep = math.ceil(ambiencecolormax/ambienceintensitymax)
SetAmbienceIntensity(ambienceintensity)
SetAmbienceRed(ambiencecolor)
SetAmbienceGreen(ambiencecolor)
SetAmbienceBlue(ambiencecolor)
SetSurfaceRed(ambiencecolor)
SetSurfaceGreen(ambiencecolor)
SetSurfaceBlue(ambiencecolor)
end
function daynight_main(e)
if g_Entity[e]['plrinzone'] == 1 or g_Entity[e]['plrinzone'] ~= 1 then
Text(1, 5, 2, state[e])
if GetTimer(e) > delay and state[e] ~= "night" then
if state[e] == "day" then
if ambienceintensity > ambienceintensitymin then
ambienceintensity = ambienceintensity - 1
SetAmbienceIntensity(ambienceintensity)
if ambiencecolor > ambiencecolormin then
ambiencecolor = ambiencecolor - ambstep
SetAmbienceRed(ambiencecolor)
SetAmbienceGreen(ambiencecolor)
SetAmbienceBlue(ambiencecolor)
if ambiencecolor > surfacemin then
SetSurfaceRed(ambiencecolor)
SetSurfaceGreen(ambiencecolor)
SetSurfaceBlue(ambiencecolor)
end
end
else
state[e] = "night"
end
end
if state[e] == "night-day" then
if ambienceintensity < ambienceintensitymax then
ambienceintensity = ambienceintensity + 1
SetAmbienceIntensity(ambienceintensity)
if ambiencecolor < ambiencecolormax then
ambiencecolor = ambiencecolor + ambstep
SetAmbienceRed(ambiencecolor)
SetAmbienceGreen(ambiencecolor)
SetAmbienceBlue(ambiencecolor)
SetSurfaceRed(ambiencecolor)
SetSurfaceGreen(ambiencecolor)
SetSurfaceBlue(ambiencecolor)
end
else
state[e] = "day"
end
end
StartTimer(e)
end
if state[e] == "night" then
if GetTimer(e) > nightdelay then
state[e] = "night-day"
StartTimer(e)
end
end
end
end
Create a game - it's like to start a new universe where there is only you and solitude with the environment