-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QB Weathersync issues. #3
Comments
I'm not familiar with QB(core?) or it's weather sync system, I assume you mean this? https://github.com/qbcore-framework/qb-weathersync And is this the housing system you mentioned? https://github.com/qbcore-framework/qb-houses From what I can tell from a quick glance at the code, the housing system disables weather syncing while you're inside the house, is that correct? My weathersync has a similar feature, so I think it would be possible to replace calls like this: TriggerEvent('qb-weathersync:client:EnableSync') with: TriggerEvent("weathersync:setSyncEnabled", true) Although, I'm slightly confused as to why there is no instance of that resource using I think maybe a simpler solution than making weathersync intermingle with with qb-weathersync (and potentially dozens of other weather sync systems out there for other frameworks) would be to create a small compatibility layer resource, which would be named AddEventHandler("qb-weathersync:client:EnableSync", function()
TriggerEvent("weathersync:setSyncEnabled", true)
end)
AddEventHandler("qb-weathersync:client:DisableSync", function()
TriggerEvent("weathersync:setSyncEnabled", false)
end) What other resources that you use depend on qb-weathersync? |
Yes, With QB I mean QBCore and also the housing and apartments (two scripts) are both QB. As for the depending on resources, those are the only two for QB vanilla, lots of custom frameworks are actually based on QBCore and there is ESX as well. |
Replacing the triggers seems to work but don't forget to change the fxmanifest as well, change the dependencies, or you will have other issues…
|
That is another way to do it. The way I was suggesting was to replace the |
Here's a more complete example: https://gist.github.com/kibook/3b2178b168a0f31f7be6cf46e7c7f8f4 If you replace your |
Yeah, i was definitely thinking about that, but rather did a clean job, so I made a back-up of the original ones, then I did a switcheroo within the code. |
Event fix ClockTime in RedM -> |
Hi Again,
You make such amazing stuff, so yep, we use them a lot. But now I started to use your weather sync because of the map. But since we are on QB it kinda flashes at some times, I tried to disable the QB one but some other resources such as houses and apartments are depending on it.
Is there a way to let them both work together? Maybe a method for your plugin to look if QB or esx is weather sync is installed, then do use that one or kill it without losing other dependencies?
The text was updated successfully, but these errors were encountered: