- Версия MoonLoader
- .026-beta
что-то не работает.
на сервере, где я играю, днем есть ночь, а ночью - день. как это исправить
на сервере, где я играю, днем есть ночь, а ночью - день. как это исправить
Lua:
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(0)
end
end
function AutoTime(param)
local hour = tonumber(param)
if hour ~= nil and hour >= 0 and hour <= 1 then
setTimeOfDay(0, 00)
end
if hour ~= nil and hour >= 1 and hour <= 2 then
setTimeOfDay(1, 00)
end
if hour ~= nil and hour >= 2 and hour <= 3 then
setTimeOfDay(2, 00)
end
if hour ~= nil and hour >= 3 and hour <= 4 then
setTimeOfDay(3, 00)
end
if hour ~= nil and hour >= 4 and hour <= 5 then
setTimeOfDay(4, 00)
end
if hour ~= nil and hour >= 5 and hour <= 6 then
setTimeOfDay(5, 00)
end
if hour ~= nil and hour >= 6 and hour <= 7 then
setTimeOfDay(6, 00)
end
if hour ~= nil and hour >= 7 and hour <= 8 then
setTimeOfDay(7, 00)
end
if hour ~= nil and hour >= 8 and hour <= 9 then
setTimeOfDay(8, 00)
end
if hour ~= nil and hour >= 9 and hour <= 10 then
setTimeOfDay(9, 00)
end
if hour ~= nil and hour >= 10 and hour <= 11 then
setTimeOfDay(10, 00)
end
if hour ~= nil and hour >= 11 and hour <= 12 then
setTimeOfDay(11, 00)
end
if hour ~= nil and hour >= 12 and hour <= 13 then
setTimeOfDay(12, 00)
end
if hour ~= nil and hour >= 13 and hour <= 14 then
setTimeOfDay(13, 00)
end
if hour ~= nil and hour >= 14 and hour <= 15 then
setTimeOfDay(14, 00)
end
if hour ~= nil and hour >= 15 and hour <= 16 then
setTimeOfDay(15, 00)
end
if hour ~= nil and hour >= 16 and hour <= 17 then
setTimeOfDay(16, 00)
end
if hour ~= nil and hour >= 17 and hour <= 18 then
setTimeOfDay(17, 00)
end
if hour ~= nil and hour >= 18 and hour <= 19 then
setTimeOfDay(18, 00)
end
if hour ~= nil and hour >= 19 and hour <= 20 then
setTimeOfDay(19, 00)
end
if hour ~= nil and hour >= 20 and hour <= 21 then
setTimeOfDay(20, 00)
end
if hour ~= nil and hour >= 21 and hour <= 22 then
setTimeOfDay(21, 00)
end
if hour ~= nil and hour >= 22 and hour <= 23 then
setTimeOfDay(22, 00)
end
if hour ~= nil and hour >= 23 and hour <= 0 then
setTimeOfDay(23, 00)
end
end