Skip to content

Commit

Permalink
Merge pull request #919 from bitpredator/dev
Browse files Browse the repository at this point in the history
remove + chore: [Christmas] pack + Performed formatting work and set the weather to clear
  • Loading branch information
bitpredator authored Dec 10, 2024
2 parents 04cfc5f + e66b860 commit 5950ae0
Show file tree
Hide file tree
Showing 31 changed files with 35 additions and 46 deletions.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 2 additions & 4 deletions server-data/resources/[esx]/vSync/client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ AddEventHandler("vSync:updateTime", function(base, offset, freeze)
end)

Citizen.CreateThread(function()
local hour = 0
local minute = 0
while true do
Citizen.Wait(0)
local newBaseTime = baseTime
Expand All @@ -57,8 +55,8 @@ Citizen.CreateThread(function()
timeOffset = timeOffset + baseTime - newBaseTime
end
baseTime = newBaseTime
hour = math.floor(((baseTime + timeOffset) / 60) % 24)
minute = math.floor((baseTime + timeOffset) % 60)
local hour = math.floor(((baseTime + timeOffset) / 60) % 24)
local minute = math.floor((baseTime + timeOffset) % 60)
NetworkOverrideClockTime(hour, minute, 0)
end
end)
Expand Down
40 changes: 20 additions & 20 deletions server-data/resources/[esx]/vSync/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Config.AdminByID = false -- Set to true if you want to set the access to the com
Config.DynamicWeather = false -- Set this to false if you don't want the weather to change automatically every 10 minutes.

-- On server start
Config.StartWeather = "XMAS" -- Default weather default: 'EXTRASUNNY'
Config.StartWeather = "EXTRASUNNY" -- Default weather default: 'EXTRASUNNY'
Config.BaseTime = 8 -- Time default: 8
Config.TimeOffset = 0 -- Time offset default: 0
Config.FreezeTime = false -- freeze time default: false
Expand All @@ -14,29 +14,29 @@ Config.NewWeatherTimer = 10 -- Time (in minutes) between each weather change d
Config.Locale = "en" -- Languages : en, fr, pt, tr, pt_br

Config.Admins = { -- Only if Config.AdminByID is set to true
"steam/license:STEAMID/LICENSE", -- EXAMPLE : steam:110000145959807 or license:1234975140128921327
"steam/license:STEAMID/LICENSE", -- EXAMPLE : steam:110000145959807 or license:1234975140128921327
}

Config.Ace = { -- Only if Config.AdminByID is set to false
"command", -- LEAVE BY DEFAULT TO GIVE ACCESS TO ADMINS AND SUPERADMINS IF U DIDN'T TOUCH ADMIN SYSTEM.
--'vsyncr', -- Gives access to weather/time commands only to groups that have access to 'vsyncr' in your server.cfg (like this: add_ace group.admin vsyncr allow)
--'yourgroupaccess', -- add_ace group.yourgroup yourgroupaccess allow
"command", -- LEAVE BY DEFAULT TO GIVE ACCESS TO ADMINS AND SUPERADMINS IF U DIDN'T TOUCH ADMIN SYSTEM.
--'vsyncr', -- Gives access to weather/time commands only to groups that have access to 'vsyncr' in your server.cfg (like this: add_ace group.admin vsyncr allow)
--'yourgroupaccess', -- add_ace group.yourgroup yourgroupaccess allow
}

Config.AvailableWeatherTypes = { -- DON'T TOUCH EXCEPT IF YOU KNOW WHAT YOU ARE DOING
"EXTRASUNNY",
"CLEAR",
"NEUTRAL",
"SMOG",
"FOGGY",
"OVERCAST",
"CLOUDS",
"CLEARING",
"RAIN",
"THUNDER",
"SNOW",
"BLIZZARD",
"SNOWLIGHT",
"XMAS",
"HALLOWEEN",
"EXTRASUNNY",
"CLEAR",
"NEUTRAL",
"SMOG",
"FOGGY",
"OVERCAST",
"CLOUDS",
"CLEARING",
"RAIN",
"THUNDER",
"SNOW",
"BLIZZARD",
"SNOWLIGHT",
"XMAS",
"HALLOWEEN",
}
2 changes: 1 addition & 1 deletion server-data/resources/[esx]/vSync/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version("bodacious")
game("gta5")

description("vSyncRevamped")
version("1.0.2")
version("1.0.3")

server_scripts({
"config.lua",
Expand Down
26 changes: 11 additions & 15 deletions server-data/resources/[esx]/vSync/locale.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
Locales = {}

function _(str, ...) -- Translate string

if Locales[Config.Locale] ~= nil then

if Locales[Config.Locale][str] ~= nil then
return string.format(Locales[Config.Locale][str], ...)
else
return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist'
end

else
return 'Locale [' .. Config.Locale .. '] does not exist'
end

if Locales[Config.Locale] ~= nil then
if Locales[Config.Locale][str] ~= nil then
return string.format(Locales[Config.Locale][str], ...)
else
return "Translation [" .. Config.Locale .. "][" .. str .. "] does not exist"
end
else
return "Locale [" .. Config.Locale .. "] does not exist"
end
end

function _U(str, ...) -- Translate string first char uppercase
return tostring(_(str, ...):gsub("^%l", string.upper))
end
return tostring(_(str, ...):gsub("^%l", string.upper))
end
3 changes: 1 addition & 2 deletions server-data/resources/[esx]/vSync/server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local timeOffset = Config.TimeOffset
local freezeTime = Config.FreezeTime
local blackout = Config.Blackout
local newWeatherTimer = Config.NewWeatherTimer
local isAllowedToChange = {}

RegisterServerEvent("vSync:requestSync")
AddEventHandler("vSync:requestSync", function()
Expand Down Expand Up @@ -329,5 +330,3 @@ function NextWeatherStage()
end
TriggerEvent("vSync:requestSync")
end

print("vSync Revamped by Kalinka loaded!")

0 comments on commit 5950ae0

Please sign in to comment.