unlockd vehicle in data base

you want vehi les to be unlocked after 7 days of not being used?
that would be an sql function that should run at restart. check out the ones that delete tents etc for helpm

you want an sql line that selects * from vehicles where lastupdated is < now - 7
then set all rows to unlocked
 
stopped 7 days. you mean unused. someone locked the vehicle then has not returned to use it for 7 days. so the vehicle is sitting locked and unused.
you need an sql query that finds all vehices that have not been used in 7 days. that returns a rowset. you unock all vehicles in that rowset.

using a sql frontend such as phpmyadmin you can type in queries and see what actually gets returned. when it finally works then you save thst and put it in a fumction to be used in restart
 
Use sql events:

UPDATE
`Object_DATA`
SET
`Object_DATA`.`CharacterID` = 0, `LastUpdated` = CURRENT_TIMESTAMP
WHERE
`Object_DATA`.`CharacterID` <> 0
AND `Object_DATA`.`CharacterID` <= 12500
AND `Object_DATA`.`Classname` NOT LIKE 'Tent%'
AND `Object_DATA`.`Classname` NOT LIKE '%Locked'
AND `Object_DATA`.`Classname` NOT LIKE '%M240Nest_DZ%'
AND `Object_DATA`.`Classname` NOT LIKE 'Land%'
AND `Object_DATA`.`Classname` NOT LIKE 'Map%'
AND `Object_DATA`.`Classname` NOT LIKE 'Target%'
AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%'
AND `Object_DATA`.`Classname` NOT LIKE 'ASC%'
AND `Object_DATA`.`Classname` NOT LIKE 'Wood%'
AND `Object_DATA`.`Classname` NOT LIKE 'Metal%'
AND `Object_DATA`.`Classname` NOT LIKE '%Storage%'
AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ', 'Info_Board_EP1', 'FlagCarrierRU', 'EntranceGate_EP1', 'T34')
AND `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY)
 
Back
Top