justalemon / SimpleSync

Resource for FiveM that allows you to sync Time, Weather and Artificial Lights (Blackout) between players
MIT License
15 stars 9 forks source link

Dynamic Blackouts use the wrong values #80

Open zRxnx opened 2 years ago

zRxnx commented 2 years ago

Hello! I am not sure if I have understood the blackout correctly. Have I set it up correctly so that a blackout can occur randomly?

What I expect is that a random blackout can occur in the given time, with the given length. If it doesn't work, should I program a Ramdomizer with ExecuteCommand()?

My config:

set simplesync_modetime 2
set simplesync_timezone "Europe/Vienna"
set simplesync_modeweather 2
set simplesync_key "xxx"
set simplesync_city "Vienna"
set simplesync_modelights 0
set simplesync_lights 1
set simplesync_blackoutswitchmin 600000
set simplesync_blackoutswitchmax 3600000
set simplesync_blackoutdurationmin 600000
set simplesync_blackoutdurationmax 6000000
justalemon commented 2 years ago

First, revoke your OpenWeatherMap credentials as they are visible on Discord.

image

justalemon commented 2 years ago

There is no Dynamic blackout support right now, you could implement it yourself if you wanted to.

zRxnx commented 2 years ago

Hello, i removed it already. So what does the convars actually do? If i activate the blackout mode, does it automatically disable its self with my given convars?

justalemon commented 2 years ago

It's not about removing your token, I can still see it.

You need to go to the OpenWeatherMap website and manually revoke it.

If you join my Discord server and check #notifications, you will still see it there.

justalemon commented 1 year ago

I found the problem while porting the resource to Lua.

Here it should be using Convars.BlackoutSwitchMin and Convars.BlackoutSwitchMax instead.

https://github.com/justalemon/SimpleSync/blob/aaae2999ad2b0de6ce042748210b720d191a8927/SimpleSync.Server/Lights.cs#L102-L108