Jump to content
  • 0

Vehicle unlock after some time


Darihon

Question

Hello,

 

I saw a topic earlier about vehicles unlocking after some time, but I couldn't find the topic anywhere. We've a problem that vehicles unlock after a few days and that the server thinks it is a server spawned and the key doesn't work anymore. 

 

Can anyone tell me how to solve this or give me a link to the other topic?

 

Thanks,

 

Darryl

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

If you have the function UnlockNonKeyVehicles in your database and an event that calls it, it will cause vehicles with no keys to unlock and become server spawned vehicles.

 

There also can be an event in your database that takes vehicles that have not been touched for a few days and resets the characterID to 0.

Link to comment
Share on other sites

  • 0

UnlockUnusedVehicles

 

UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `CharacterID` > 0 AND `Classname` NOT IN ('VaultStorage','LockboxStorage','VaultStorageLocked','LockboxStorageLocked')  AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL

this called in a job will unlock unused vehicles every 7 days

 

:)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...