In this section, you will find answers to commonly encountered issues. Remember that most errors stem from incorrect configuration, lack of required resources, or insufficient modification.
Bear in mind that troubleshooting requires patience and precision. Try to carefully analyze the errors and systematically review possible solutions.
If the issue persists after verifying the configuration and available resources, please contact the support on the VMS Discord.
My LMB does not work when creating a house.
This usually means that an external resource is blocking the Left Mouse Button input.
To fix this, open your config.lua, find the option Config.HousingCreatorControls and try replacing SELECT with one of the alternative control indexes for the Left Mouse Button:
By default, vSync does not have the ability to stop and resume time or weather, but in the following file we have prepared such an option.
The marked lines of code have been added:
Last updated
CreateThread(function()
while true do
if not disable then
if lastWeather ~= CurrentWeather then
lastWeather = CurrentWeather
SetWeatherTypeOverTime(CurrentWeather, 15.0)
Wait(15000)
end
Wait(100) -- Wait 0 seconds to prevent crashing.
if not disable then
SetArtificialLightsState(blackout)
SetArtificialLightsStateAffectsVehicles(blackoutVehicle)
ClearOverrideWeather()
ClearWeatherTypePersist()
SetWeatherTypePersist(lastWeather)
SetWeatherTypeNow(lastWeather)
SetWeatherTypeNowPersist(lastWeather)
if lastWeather == 'XMAS' then
SetForceVehicleTrails(true)
SetForcePedFootstepsTracks(true)
else
SetForceVehicleTrails(false)
SetForcePedFootstepsTracks(false)
end
if lastWeather == 'RAIN' then
SetRainLevel(0.3)
elseif lastWeather == 'THUNDER' then
SetRainLevel(0.5)
else
SetRainLevel(0.0)
end
end
else
Wait(1000)
end
end
end)
CreateThread(function()
while true do
if not disable then
if lastWeather ~= currentWeather then
lastWeather = currentWeather
SetWeatherTypeOverTime(currentWeather, 15.0)
Wait(15000)
end
Wait(100) -- Wait 0 seconds to prevent crashing.
if not disable then
print(lastWeather)
SetArtificialLightsState(blackout)
SetArtificialLightsStateAffectsVehicles(blackoutVehicle)
ClearOverrideWeather()
ClearWeatherTypePersist()
SetWeatherTypePersist(lastWeather)
SetWeatherTypeNow(lastWeather)
SetWeatherTypeNowPersist(lastWeather)
if lastWeather == 'XMAS' then
SetForceVehicleTrails(true)
SetForcePedFootstepsTracks(true)
else
SetForceVehicleTrails(false)
SetForcePedFootstepsTracks(false)
end
if lastWeather == 'RAIN' then
SetRainLevel(0.3)
elseif lastWeather == 'THUNDER' then
SetRainLevel(0.5)
else
SetRainLevel(0.0)
end
end
else
Wait(1000)
end
end
end)
CurrentWeather = 'EXTRASUNNY'
local isWeatherSynced = true
local lastWeather = CurrentWeather
local baseTime = 0
local timeOffset = 0
local timer = 0
local freezeTime = false
local blackout = false
RegisterNetEvent('vSync:toggle')
AddEventHandler('vSync:toggle', function(toggle)
isWeatherSynced = toggle
end)
RegisterNetEvent('vSync:updateWeather')
AddEventHandler('vSync:updateWeather', function(NewWeather, newblackout)
CurrentWeather = NewWeather
blackout = newblackout
end)
Citizen.CreateThread(function()
while true do
if isWeatherSynced then
if lastWeather ~= CurrentWeather then
lastWeather = CurrentWeather
SetWeatherTypeOverTime(CurrentWeather, 15.0)
Citizen.Wait(15000)
end
Citizen.Wait(100) -- Wait 0 seconds to prevent crashing.
SetBlackout(blackout)
ClearOverrideWeather()
ClearWeatherTypePersist()
SetWeatherTypePersist(lastWeather)
SetWeatherTypeNow(lastWeather)
SetWeatherTypeNowPersist(lastWeather)
if lastWeather == 'XMAS' then
SetForceVehicleTrails(true)
SetForcePedFootstepsTracks(true)
else
SetForceVehicleTrails(false)
SetForcePedFootstepsTracks(false)
end
end
Citizen.Wait(100)
end
end)
RegisterNetEvent('vSync:updateTime')
AddEventHandler('vSync:updateTime', function(base, offset, freeze)
freezeTime = freeze
timeOffset = offset
baseTime = base
end)
Citizen.CreateThread(function()
local hour = 0
local minute = 0
while true do
Citizen.Wait(0)
if isWeatherSynced then
local newBaseTime = baseTime
if GetGameTimer() - 500 > timer then
newBaseTime = newBaseTime + 0.25
timer = GetGameTimer()
end
if freezeTime then
timeOffset = timeOffset + baseTime - newBaseTime
end
baseTime = newBaseTime
hour = math.floor(((baseTime+timeOffset)/60)%24)
minute = math.floor((baseTime+timeOffset)%60)
NetworkOverrideClockTime(hour, minute, 0)
end
end
end)
AddEventHandler('playerSpawned', function()
TriggerServerEvent('vSync:requestSync')
end)
Citizen.CreateThread(function()
TriggerEvent('chat:addSuggestion', '/weather', 'Change the weather.', {{ name="weatherType", help="Available types: extrasunny, clear, neutral, smog, foggy, overcast, clouds, clearing, rain, thunder, snow, blizzard, snowlight, xmas & halloween"}})
TriggerEvent('chat:addSuggestion', '/time', 'Change the time.', {{ name="hours", help="A number between 0 - 23"}, { name="minutes", help="A number between 0 - 59"}})
TriggerEvent('chat:addSuggestion', '/freezetime', 'Freeze / unfreeze time.')
TriggerEvent('chat:addSuggestion', '/freezeweather', 'Enable/disable dynamic weather changes.')
TriggerEvent('chat:addSuggestion', '/morning', 'Set the time to 09:00')
TriggerEvent('chat:addSuggestion', '/noon', 'Set the time to 12:00')
TriggerEvent('chat:addSuggestion', '/evening', 'Set the time to 18:00')
TriggerEvent('chat:addSuggestion', '/night', 'Set the time to 23:00')
TriggerEvent('chat:addSuggestion', '/blackout', 'Toggle blackout mode.')
end)
-- Display a notification above the minimap.
function ShowNotification(text, blink)
if blink == nil then blink = false end
SetNotificationTextEntry("STRING")
AddTextComponentSubstringPlayerName(text)
DrawNotification(blink, false)
end
RegisterNetEvent('vSync:notify')
AddEventHandler('vSync:notify', function(message, blink)
ShowNotification(message, blink)
end)