23.01.2012, 21:51
When you ban them, you'll want to obtain the timestamp using gettime(). Just like that, gettime(), nothing else. Here's some pseudo code again:
Then, you'll want to do some calculations. If you want to ban them for 24 hours, then you'll need to add 24 hours to the timestamp. Keep in mind that a second is 1, a minute is 60, an hour is 3600 (try to keep up here), and there are 24 hours in a day (last time I checked), so 3600 * 24 = 86400. More pseudo code:
Then you'll want to insert that value into a MySQL DB. When a player connects, check to make sure that if you do gettime() again, that the value of gettime() is greater than (>) the value you stored.
I can't make it much clearer than that!
pawn Код:
new iTimestamp = gettime();
pawn Код:
iTimestamp = iTimestamp+86400;
I can't make it much clearer than that!