Jump to content
  • 0

getting a lot of vehicles sitting around...


Lanmanfm

Question

Getting a lot of vehicles sitting around on my clan server. I was thinking about doing a manual export of the object data table and then hanging onto it for a week and using VBA code to compare the World Space on the 2 exports. A lot of manual manipulation and room for error. I was curious if there was a way to add a "last accessed" time stamp to objects so that I could easily look at any that hadn't been accessed in 7 days and then remove them.

 

If not, I will continue with my original plan.

 

I am just getting tired of taking a run through the woods and finding ambulance after ambulance with the tires missing because someone is using it at a safe.

 

Thanks,

Frank

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
ALTER TABLE `character_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE `object_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
Link to comment
Share on other sites

  • 0

 

ALTER TABLE `character_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE `object_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

 

 

Can you explain exactly what this does? Does it automatically make it so if someone interacts with a vehicle, the datastamp gets reset to the current datestamp?

Link to comment
Share on other sites

  • 0

Can you explain exactly what this does? Does it automatically make it so if someone interacts with a vehicle, the datastamp gets reset to the current datestamp?

 

 

add a timestamp in the sql, thats updates each time some is driving or takings parts on the car, i use it alot for my admin panel and cleanup scripts

Link to comment
Share on other sites

  • 0

 

ALTER TABLE `character_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE `object_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

 

 

When I do the first query, I get this message:

 

#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

 

When I do the second query, it works just fine. My character_data has "Datestamp" and "LastLogin".

Link to comment
Share on other sites

  • 0

Wondering why there has been no reply? 

 

 

ALTER TABLE `character_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE `object_data`
    ADD `lastactive` timestamp on update current_timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

 

 

This does not work for me. MY lastactive column of vehicles gets updated every single server restart...

 

So what to do?

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
  • Advertisement
  • Discord

×
×
  • Create New...