Note: This events are all registered in the client side and will only affect the player target.
Freeze/Unfreeze player weather and time:
-- TriggerEvent('av_weather:freeze', state, hours, minutes, weather, blackout)-- state: boolean (true/false) (enable/disable sync)-- hours: number (replace current hour)-- minutes: number (replace current minutes)-- weather: string (replace current weather)-- blackout: boolean (enable/disable blackout)local state =truelocal hours =23local minutes =00local weather ="CLEAR"local blackout =falseTriggerEvent('av_weather:freeze',state, hours, minutes, weather, blackout)-- To sync the player with server, trigger the event again and only send state as false:TriggerEvent('av_weather:freeze',false)
Get the blackout state
-- Returns booleanlocal state = exports['av_weather']:GetBlackoutState()print(state)
Remove rain effects (perfect for ymaps), an example can be found here: AV StopRain
exports['av_weather']:setRain(false) -- this will remove rain effects in clientexports['av_weather']:setRain(true) -- this will sync the rain effects with server