SimpleSync: Highly configurable Time, Weather and Blackout synchronization

Time seems to flicker for me, any ideas?

After you restart the script, it stops for 10 minutes, then starts doing it again but it’s less noticeable.

I can’t see the video, it says 403 Unauthorized.

Try to enable the debug mode and see what it comes up both in the Client and Server (replicated convar simplesync_debug to 1).

Im getting no such command simplesync_key after i started the server

You need to do set simplesync_key "insertkey"

Excuse me, I don’t know where I have to enter the command "ace command. " can you better specify it to the newbies? Thanks

I am looking to put real time and weather (Spain my case) but I do not know if I need to enter the SimpleSync.Server folder and modify the convars file.

After using this for a day now, I have noticed that the script will fail to GET the url for the real weather after server reboot sometimes. Restarting the resource does resolve the issue though. I’m not home right now or I’d post the exact error. I can do this later on tonight.

See https://docs.fivem.net/docs/scripting-reference/convars/ on the FiveM Documentation.

Do you get a message like OpenWeather returned code SOMETHING?

timemode
The synchronization mode is set to Dynamic

timezone
The current Time Zone is set to Europe/Vilnius

When/if it happens again I’ll make note of it but that sounds familiar. It would print a failed GET request to the open weather url even though if you were to browse to the url it works fine. I’ve only seen this error twice so I’ll keep an eye on it.

This needs to be set to 2 (set simplesync_modetime 2 on your server.cfg or /timemode 2 while is running)

Europe/Vinilius is not a valid Timezone in C#, you need to use FLE Standard Time or FLE Daylight Time.

Please, take the time to read the documentation.

Here is the error code

Failed to run a tick for Weather: Flurl.Http.FlurlHttpException: Call failed. An error occurred while sending the request GET http://api.openweathermap.org/data/2.5/weather?q=Los Angeles, US&appid=************************************** ---> System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error getting response stream (ReadDoneAsync2): ReceiveFailure

  at System.Net.WebResponseStream.InitReadAsync (System.Threading.CancellationToken cancellationToken) [0x000f3] in <42f584362443417994ec5d5c4e2c6478>:0 

  at System.Net.WebOperation.Run () [0x001d9] in <42f584362443417994ec5d5c4e2c6478>:0 

  at System.Net.WebCompletionSource`1[T].WaitForCompletion () [0x00094] in <42f584362443417994ec5d5c4e2c6478>:0 

  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <42f584362443417994ec5d5c4e2c6478>:0 

  at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00020] in <42f584362443417994ec5d5c4e2c6478>:0 

  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <fbc4ec45371543bfba3678ebb82caf6d>:0 

--- End of stack trace from previous location where exception was thrown ---



  at System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x0041b] in <0c97a591a0114a30937001a943b2c9ac>:0 

   Exception_EndOfInnerExceptionStack

  at System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00476] in <0c97a591a0114a30937001a943b2c9ac>:0 

  at System.Net.Http.HttpClient.SendAsyncWorker (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) [0x000ca] in <0c97a591a0114a30937001a943b2c9ac>:0 

  at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x002c2] in <a9051bad8a17489482bc7f3a58773571>:0 

   Exception_EndOfInnerExceptionStack

  at Flurl.Http.FlurlRequest.HandleExceptionAsync (Flurl.Http.HttpCall call, System.Exception ex, System.Threading.CancellationToken token) [0x0011d] in <a9051bad8a17489482bc7f3a58773571>:0 

  at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x003a1] in <a9051bad8a17489482bc7f3a58773571>:0 

  at Flurl.Http.FlurlRequest.SendAsync (System.Net.Http.HttpMethod verb, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken, System.Net.Http.HttpCompletionOption completionOption) [0x004bb] in <a9051bad8a17489482bc7f3a58773571>:0 

  at SimpleSync.Server.OpenWeather.GetWeather () [0x0004b] in C:\projects\simplesync\SimpleSync.Server\OpenWeather.cs:49 

  at SimpleSync.Server.Weather.UpdateWeather () [0x0016b] in C:\projects\simplesync\SimpleSync.Server\Weather.cs:324 

I restarted the service immediately afterwards and it loads fine.

I get Could not load SimpleSync
What am I doing wrong?

Are you sure that the resource is installed correctly?

Yes, Installed Like the any causal resource
image

Is the simplesync folder located inside of the resources directory?

Do you see the fxmanifest.lua file inside of the simplesync folder?

It is in simplesync.server folder, how it came with the download

I get this error image

Inside the luaimage

I can perfectly see fx_version "bodacious" on fxmanifest.lua, your problem is caused by something else.