Изминений никаких, ни там ни там.
Код:
new unixtime, year, month, day, hour, minute, second;
unixtime = res[2]; //new_serv.pwn(439) : error 006: must be assigned to an array
timestamp_to_date( unixtime, year, month, day, hour, minute, second );
Вот вообще функция над которой я работаю:
Код:
stock CheckIPBanned(playerid)
{
new query[256];
new string[256];
new ipadress[16];
GetPlayerIp(playerid, ipadress, sizeof(ipadress));
format(query,sizeof(query),"SELECT * FROM `ip_bans` WHERE ip_adress = '%s'",ipadress);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows()==1)
{
new tmp[72], res[4][64];
mysql_fetch_row(tmp);
split(tmp, res, '|');
if(strval(res[2]) > gettime())
{
new unixtime, year, month, day, hour, minute, second;
unixtime = res[2];
timestamp_to_date( unixtime, year, month, day, hour, minute, second );
format(string,sizeof(string),"{ffffff}IP с которого вы пытаетесь зайти [ {ff0000}%s{ffffff} ] заблокирован.\nПричина: {ff0000}%s.\n{ffffff}Аккаунт будет разбанен - %d.%d.%d в %d:%d", ipadress, res[1], day, month, year, hour, minute);
ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"{ff0000}Ваш IP был заблокирован!",string,"Okay :(","");
Kick(playerid);
}
else
{
format(query,sizeof(query),"DELETE FROM `ip_bans` WHERE ip_adress='%s'",ipadress);
mysql_query(query);
}
}
}