Auto data wipe?

Hey FiveM!

I’ve been searching the releases scrolling back a whilleeeeeee, also search github for over a hour. nothing to avail.

I’m basically wondering if anyone knows where i could get a script that would wipe a player from the database when they are inactive for say, 6months or something?

i’m seeing people come into my server, play it out. purchase houses and not come back. we only have 324 houses on the server, none are shared. so to keep up with the newer players coming in and purchasing houses i’d like to get rid of the old ones which people have just left the server…

You probably want to set a column in your DB with a default Timestamp(), then every time a user connects, just run an UPDATE making their user information row have a new timestamp as per the update time it ran.

You could then have a server side script do a check of that time stamp and see if its older than x amount of time, and then issue queries to remove them if its past it.

1 Like

I see, I’ll give it a wham! Thanks alot man :slight_smile:

You ever find something like this?