feat: add GetOnDuty exports#1162
Conversation
|
one thing i would add is a check to see if job has a type attached so like if QBCore.Shared.Jobs[job].type == nil then
check logic for name
else
Check logic for type
endso that way it will pool all people that can do those jobs or even a bool as a second param so people can do something like |
|
Added! (I think) |
|
Suggestion: Utilize QBCore:Client:OnPlayerLoaded and QBCore:Client:OnJobUpdate to update the number of duty jobs and store it in the global statebag instead of loop from the table when the function is called, that will make the data can be accessed from both the server side and client side. |
|
Well, idk if thats a better solution, it to messy I think, but i'll look into it? |
|
the global state bag is a good addition, but is shud make into the core itself so you can return later GlobalState[jobname] |
|
IDK really, I think is messier, but I'll look into it |
|
Added the use of statebags, let me know what you think |
|
I added exports for all qb functions |
Description
Added GetOnDuty exports both client and server side. In order to add this
QBCore.Functions.GetOnDutywas added client-side and a callback was added server-side.Checklist