overextended / ox_doorlock

https://overextended.dev/ox_doorlock
GNU General Public License v3.0
157 stars 138 forks source link

[Bug] Not detecting QB-Core #114

Closed Mkeefeus closed 1 year ago

Mkeefeus commented 1 year ago

When starting my server I got the warning 'no compatible framework was loaded, most features will not work'. I ensured that qb-core was started before ox_doorlock in my server.cfg. For debugging I did this,

` SetTimeout(0, function() local QB = exports[resourceName]:GetCoreObject()

GetPlayer = QB.Functions.GetPlayer
print(GetPlayer)

`

and noticed that the print was logging to console after the warning. I was able to fix the issue by moving 'server/framework/*.lua', above 'server/main.lua', in the fxmanifest to try to make sure those files load first and that seems to work

thelindat commented 1 year ago

Despite the fact that the SetTimeout for checking GetPlayer is on a 500ms delay, it somehow triggers before the 0ms timeout in some cases; fun.