30.12.2012, 11:16
(
Последний раз редактировалось doreto; 04.01.2013 в 13:42.
)
FIXED THANKS
SecondsToDHMS (dbt - times, days, hours, mins, sec);
new time = floatround((dbt - times) / 86400), floatround_ceil);
For starters it should be
pawn Код:
You should just do the following: pawn Код:
|
SecondsToDHMS (dbt - times, days, hours, mins, sec);
new time = floatround((dbt - times) / 86400), floatround_ceil);
new time = floatround((dbt - times) / 86400), floatround_ceil);
INSERT INTO `bans`(`username`, `start_date`, `expire_date`) VALUES ('%s', NOW(), NOW()+INTERVAL 10 DAY)
SELECT *,UNIX_TIMESTAMP(expire_date) AS timestamp FROM `bans` WHERE `username` = '%s' AND `IP` = '%s' AND `banned` = 1
new timestamp;
// put your 'timestamp' from the sql results inside the timestamp variable.
if(timestamp < gettime())
{
// the player should get unbanned because it's expired
}
else
{
// players should get kicked because he is still banned.
}