08.01.2016, 15:25
Код:
publics CheckBan(playerid)
{
new ip[24],name[MAX_PLAYER_NAME],year,month,days;
GetPlayerIp(playerid,ip,24);
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
for(new i = 0; i <= sbans; ++i)
{
if(!strcmp(BanInfo[i][Name],name,true))
{
if(getdate(days,month,year) < BanInfo[i][UDate])
{
new string[512],temp[512];
format(string,sizeof(string),"{00B7FF}Hello {FF0000}%s!\n",name);
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}You account is {FF0000}banned!\n");
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}Banned by {FF0000}%s!\n",BanInfo[i][Admin]);
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}Reason:{FF0000}%s!\n",BanInfo[i][Reason]);
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}Automatically unbaned after {FF0000}%d days!\n",BanInfo[i][Time]);
strcat(temp, string);
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "{00B7FF}Account-Blocked", temp , "Exit", "");
DelayedKick(playerid);
break;
}
else
{
orm_delete(BanInfo[i][ORM_ID]);
break;
}
}
if(!strcmp(BanInfo[i][IP],ip,true))
{
if(getdate(days,month,year) < BanInfo[i][UDate])
{
new string[512],temp[512];
format(string,sizeof(string),"{00B7FF}Hello {FF0000}%s!\n",name);
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}You account is {FF0000}banned!\n");
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}Banned by {FF0000}%s!\n",BanInfo[i][Admin]);
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}Reason:{FF0000}%s!\n",BanInfo[i][Reason]);
strcat(temp, string);
format(string,sizeof(string),"{00B7FF}Automatically unbaned after {FF0000}%d days!\n",BanInfo[i][Time]);
strcat(temp, string);
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "{00B7FF}Account-Blocked", temp , "Exit", "");
DelayedKick(playerid);
break;
}
else
{
orm_delete(BanInfo[i][ORM_ID]);
break;
}
}
}
return 1;
}
But all bans correct loading with system ORM (orm_Addvar_int,addvar_string,etc..) like this system ..
)If i ban player to 10 days (18.01.2016) and enter in the server with this date,server show me that i have account banned
i tested, put the unbandate 07.01.2016 and enter in the server and server show me that i have ban
else i tried to put unbandate 08.01.2016 and 09.01.2016 and it not working ...Help me


