Non-override weather


#1

It doesn’t seem that any of the weather set functions in either Lua or C# apart from the SetOverrideWeather/ClearOverrideWeather work. In C++ this works just fine, as LambdaMenu uses 0xCCC39339BEF76CF5 followed by 0x704983DF373B198F (persist weather) when “Freeze Weather” is on.

Setting the variables in C# doesn’t do anything either:
World.Weather = Weather.Raining; World.NextWeather = Weather.Raining;

Is this an issue with FiveM, am I doing something wrong, or what’s the deal with this?


#2

So what’s going on is that natives such as SetClockTime, AdvanceClockTimeTo, SetWeatherTypeOverTime, SetWeatherTypeTransition, SetWeatherTypePersist etc will not work for as long as NetworkIsGameInProgress returns true. They can get called when you call NetworkSessionLeaveSinglePlayer() but it will disconnect/instance you from the rest of the players.

Native Citizen.InvokeNative( 0xD972DF67326F966E ) will remove any value set with NetworkOverrideClockTime and advance the time to whatever the “singeplayer” time is, but that still won’t let you use SetClockTime. Native Citizen.InvokeNative( 0xD7C95D322FF57522, Citizen.ResultAsInteger() ) will return true for as long the time does not equal the “singleplayer” time, so here’s something for the devs to rename in the natives.lua.

So my question to FiveM devs is: Will this restriction be bypassed in a future patch?


#3

no, it doesn’t.

also this is a limitation of the game code - probably for good reason! it feels like network is meant to sync this by itself, but the code is unclear as it seems to have been obfuscated by Arxan.


#4

The C++ comment is old and it worked because that was a singleplayer environment. Thing is though these natives are really neat when they work. Smooth weather transitions really add to the feel of the city. Weather override changes the ambiance too abruptly.


#5

Doesn’t the game automatically perform those? It might be possible to patch out some stuff to make the natives work across the network however the Arxan’d code might make it… complicated.


#6

From my experience the time and weather are not in sync for those who join later on. The vanilla weather also lasts really long. Would be nice if we were able to get more control over that. I’ve been trying to find undocumented natives that may set a bit that will allow us to perform those functions, but to no avail.