Jump to content
  • 0

Automatic vehicle unlock (2) after day ?


harcosgoogle

Question

9 answers to this question

Recommended Posts

  • 0

Run this sql query. Change the 14 day to whatever time you want  

CREATE EVENT UnlockAbandonedVehicles
    ON SCHEDULE EVERY 1 DAY
    DO
      UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` NOT IN ('VaultStorage','LockboxStorage','VaultStorageLocked','LockboxStorageLocked','WoodShack_DZ','StorageShed_DZ','TentStorageDomed','TentStorageDomed2','TentStorage')  AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL
;

Link to comment
Share on other sites

  • 0

YOu need run the sql function to unlockvehicles without keys over your db. Onces you did it the function is saved. Then you can run the lbuw sql code with a .bat file or with scheduler.xm. take a lookl on the link i give you to have an idea

Link to comment
Share on other sites

  • 0

Ok Do you understand that sql is not a sqf. And this run over your db right?. Then if u have the recomend sql events running then just add the code that lbuk give you to your sql file where the rest of sql events are

Link to comment
Share on other sites

  • 0

the function:

  Reveal hidden contents

 

The code:

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0
  On 7/6/2017 at 8:05 PM, juandayz said:

the function:

  Reveal hidden contents

 

The code:

  Reveal hidden contents

 

Expand  

Hello Juandayz!

Am I running these both over my database under query or events? 

Thanks.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...