Jump to content

Bans SQL


Snow-Man

Recommended Posts

Don't... create... a timer... Save the timestamp in SQL and when they join check if the timestamp expired. Look at the other topic created by Best Killer, I just told him how to do it.

 

If it's expired update the player data in SQL if not kick the player.

Edited by pa3ck
Link to comment

Why not just use the already existing script that I made: https://wiki.multitheftauto.com/wiki/Resource:Sqlbans

Or at the very least, look at how I did it in sqlbans, though I must admit the way I did it isn't as efficient as can be. My resource decrements the time remaining on a regular basis which works well and there's no need to change this but if you wanted to be super efficient you would store the time stamp of when you want them unbanning and then check on a regular basis to see if the time stamp they're due to be unbanned on is lower than the current time stamp.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...