Кратко говоря бан не банит, а тупо кикает ... При перезаходе бана нет... ПОМОГИТЕ... ВОт команда
Код:
else if(strcmp(cmd, "/ban", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: /ban [id] [ïðè÷èíà]");
if (dostup[playerid] != 1) return ShowPlayerDialog(playerid,2934,DIALOG_STYLE_INPUT,"Äîñòóï àäìèíèñòðàòîðà","Ââåäè ñâîé key â îêîøêî è íàæìè 'Îê'","Îê","Îòìåíà");
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pAdmin] > 0) return SendClientMessage(playerid, COLOR_GRAD2, "Àäìèíèñòðàòîð íå ìîæåò áûòü çàáàíåí!");
new ip[15];
GetPlayerIp(giveplayerid,ip,15);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new year1, month1, day1, hour1, minute1, second1;
getdate(year1, month1, day1);
gettime(hour1, minute1, second1);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: /ban [id] [ïðè÷èíà]");
new year, month,day;
new hour, minute, second;
getdate(year, month, day);
gettime(hour, minute, second);
PlayerInfo[giveplayerid][pLocked] = 1;
format(string, sizeof(string), "Àäìèíèñòðàòîð: %s çàáàíèë %s. Ïðè÷èíà: %s ",sendername, giveplayer, (result));
SendClientMessageToAll(COLOR_LIGHTRED,string);
SendClientMessage(giveplayerid, COLOR_LIGHTRED," Âàø àêêàóíò çàáëîêèðîâàí. Ïîäàéòå çàÿâêó íà ðàçáëîêèðîâêó íà ñàéòå: [âàøà ññûëêà]");
SendClientMessage(giveplayerid, COLOR_WHITE, "Ââåäèòå /q, ÷òîáû âûéòè!");
GetPlayerIp(giveplayerid,ip,sizeof(ip));
format(string, sizeof(string), "%s.ini",giveplayer);
new file = ini_openFile(string);
if(file < 0) print("íåò ôàéëà");
else
{
ini_getString(file,"pIp",string);
ini_getString(file,"pIpReg",string);
printf("Íàéäåíî: %s, íà÷àëîñü ÷òåíèå ôàéëà ñ ýòèì èìåíåì",string);
ini_closeFile(file);
format(string, sizeof(string), " Íèê: [%s] | IP: [%s] | R: [IP: %s] | L: [IP: %s]",giveplayer,ip,string,string);
ABroadCast(COLOR_LIGHTRED,string,1);
PlayerInfo[giveplayerid][pLocked] = 1;
Kick(giveplayerid);
}
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Îøèáêà] Èãðîê íå íàéäåí!");
}
}
return 1;
}