Ppgtjmad / SimpleShops

[HG] Simple Shops
27 stars 8 forks source link

extdb #78

Closed YukikazeMua closed 1 year ago

YukikazeMua commented 1 year ago

When I am using extdb, if I restart the server, the "Active" in the database will all be reset to 0

Ppgtjmad commented 1 year ago

Hi @YukikazeMua

That's the way it should be.

When your server restarts there may be some owned vehicles that players forgot to park or didn't have the time to. So there's a function that resets the "Active" status in the database. Without it, players would not be able to see their vehicles in the garage dialog.

The "Active" status is set to 1 when you retrieve a vehicle from the garage, it is set to 0 when you park it.

YukikazeMua commented 1 year ago

However, if the player's vehicle is destroyed, the reset server "Active" will still reset to 0, and the player can regain the destroyed vehicle after restarting the server

Ppgtjmad commented 1 year ago

You're right, that's why I added the "Alive" column in the database but didn't use it anywhere in the code.

I'll make a proper system for it and push it ASAP.

Back to work!

YukikazeMua commented 1 year ago

thx

Ppgtjmad commented 1 year ago

Please try this and report back -> https://github.com/Ppgtjmad/SimpleShops/commit/d49575f7be26eb3e5fa3c5de9605b6855ef2f7b4

YukikazeMua commented 1 year ago

try

YukikazeMua commented 1 year ago

"Alive" does not change to 0 when the vehicle is destroyed

Ppgtjmad commented 1 year ago

It does work here, make sure you do all the required modifications according to this commit https://github.com/Ppgtjmad/SimpleShops/commit/d49575f7be26eb3e5fa3c5de9605b6855ef2f7b4

Double and triple check if needed.

YukikazeMua commented 1 year ago

"Alive" is 1 , "Active" is 0, but there is no vehicle in the player's garage

YukikazeMua commented 1 year ago

As soon as the player saves the vehicle, the vehicle in the garage is gone

YukikazeMua commented 1 year ago

"Alive" works, and "Active" doesn't work

Ppgtjmad commented 1 year ago

My bad -> https://github.com/Ppgtjmad/SimpleShops/commit/ea7b8aa540b0a1fe5c69f49c7f5fc4eab639de14

YukikazeMua commented 1 year ago

its working!

YukikazeMua commented 1 year ago

thx

YukikazeMua commented 1 year ago

Now there is a new issue, I need to refresh the garage many times to display the vehicle

Ppgtjmad commented 1 year ago

Share your logs please

Ppgtjmad commented 1 year ago

There's nothing related to your issue in there but one thing that's problematic, change your HG_Vehicles.Classname column length to 255 characters instead of 32.

Also share your RPT logs.

YukikazeMua commented 1 year ago

I'm on the server and it takes a few hits to refresh before the garage vehicle appears

Ppgtjmad commented 1 year ago

Nothing to see here either and I can't reproduce the issue you're having on my end.

I'd recommend you start fresh and report back.

YukikazeMua commented 1 year ago

This problem does not affect for the time being, just shut it down

YukikazeMua commented 1 year ago

If the player has used the vehicle, the vehicle's "Alive" will not change to 0

YukikazeMua commented 1 year ago

If the player has used a vehicle, "Alive" will not change to 0 when the vehicle is destroyed