dojwun / doj-marijuana

marijuana script for QBCore Framework
GNU General Public License v3.0
67 stars 27 forks source link

Other players can't see plant / seed when planted #4

Open hoveck opened 2 years ago

hoveck commented 2 years ago

Other players can't see plant / seed when planted.

Script either needs to be restarted or player needs to leave the server and rejoin in order to see the crop's model and the cropOptions menu.

LegacyRolePlayFR commented 2 years ago

I have this issue as well!

Smokey2022 commented 2 years ago

Same issue. Anyone fixed this yet?

Mechomancer commented 1 year ago

Working on some things that might fix this issue however it comes with some strange effects. on initial testing when entities are created they are set to false in the BOOL isNetwork, BOOL option to make them network entities. ive changed this on my version for testing and the result is that YES they do show to others but now others can access grow menu. once they try to add water or something it locks script up. they can destroy plants too but it does not remove them from the sql. also rate config does not work as server side its always gonna be 10. ill play with this a bit more see if i can't get some of this fixed.

Branqueador commented 1 year ago

is

Please!

Branqueador commented 1 year ago

@Mechomancer any news?

Mechomancer commented 1 year ago

Got them to spawn so they can be seen that wasn't an issue, the issue is getting the system to let others interact with them as well like watering nutrients or to pull em. It was initially designed to only let the owner interact since it was a client side only thing. Now we got to let server keep track of them bit more involved now. I'll let you know as I'm only messing with it in my spare time.

On Wed, Feb 22, 2023, 1:37 PM Branqueador @.***> wrote:

@Mechomancer https://github.com/Mechomancer any news?

— Reply to this email directly, view it on GitHub https://github.com/dojwun/doj-marijuana/issues/4#issuecomment-1440691146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO5JDQQLJ23ZTGFGE63U723WYZTI5ANCNFSM5KIVQOXA . You are receiving this because you were mentioned.Message ID: @.***>

reyyghi commented 1 year ago

Other players can't see plant / seed when planted.

Script either needs to be restarted or player needs to leave the server and rejoin in order to see the crop's model and the cropOptions menu.

--======================================================================= Callbacks

CreateThread(function () while true do QBCore.Functions.TriggerCallback("doj:server:getInfo",function(plants) Plants = plants for k, v in pairs(Plants) do spawnPlant(v.seed, v.coords, v.info.stage, k) end print(json.encode(plants)) end) Wait(1000) end end)