03.08.2013, 16:05
So I'm trying to do a temp ban system.
And when I ban someone I do:
new timestamp = gettime + mktime(0,0,0,n,0,0);
PlayerInfo[pid][Tempban] = timestamp;
I put this in an integer value field in MYSQL.
When the player logs if Tempban > 0 then I see if gettime() > Tempban so I unban the player, otherwise I kick him.
The problem is that in my mysql field I find like some random numbers and I don't know if they are okay or not.
And when I ban someone I do:
new timestamp = gettime + mktime(0,0,0,n,0,0);
PlayerInfo[pid][Tempban] = timestamp;
I put this in an integer value field in MYSQL.
When the player logs if Tempban > 0 then I see if gettime() > Tempban so I unban the player, otherwise I kick him.
The problem is that in my mysql field I find like some random numbers and I don't know if they are okay or not.