Snow-Man Posted December 21, 2016 Share Posted December 21, 2016 i have made bans system with sql but i have worried how to unban player while the time is end Link to comment
Simple0x47 Posted December 21, 2016 Share Posted December 21, 2016 Make a timer which checks if the time expired. Link to comment
pa3ck Posted December 21, 2016 Share Posted December 21, 2016 (edited) 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 December 21, 2016 by pa3ck Link to comment
Arran Posted December 22, 2016 Share Posted December 22, 2016 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now