Pavel-KZ
Умник
Здравствуйте.
1. Суть такова 3 LVL админки может банить 9999 LVL админки ставил разные проверки не помогало , прошу помочь. PS. только с баном так варн кик и т.д всё норм.
2. Команда :
1. Суть такова 3 LVL админки может банить 9999 LVL админки ставил разные проверки не помогало , прошу помочь. PS. только с баном так варн кик и т.д всё норм.
2. Команда :
PHP:
YCMD:ban(playerid, params[], help)
{
if(PlayerInfo[playerid][pLogin] == 0) return true;
if(PlayerInfo[playerid][pAdmin] < 4 || dostup[playerid] == 0) return true;
if(sscanf(params, "us[128]",params[0],params[1])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /ban [id] [причина]");
if(!IsPlayerConnected(params[0]))
if(PlayerInfo[params[0]][pAdmin] > 0) return SendClientMessage(playerid, COLOR_REDD, "Администратор не может быть забанен!");
new ip[15];
GetPlayerIp(params[0],ip,15);
new year, month,day;
getdate(year, month, day);
format(YCMDstr, sizeof(YCMDstr), "Администратор: %s забанил %s. Причина: %s ",Name(playerid),Name(params[0]),params[1]);
SendClientMessageToAll(COLOR_LIGHTRED,YCMDstr);
SendClientMessage(params[0], COLOR_LIGHTRED, "Ваш аккаунт заблокирован.");
SendClientMessage(params[0], COLOR_WHITE, "Для выхода из игры используйте /q(uit)");
GetPlayerIp(params[0],ip,sizeof(ip));
format(YCMDstr, sizeof(YCMDstr), "Ник: [%s] | IP: [%s] | R: [IP: %s]",Name(params[0]),ip,PlayerInfo[params[0]][pIpReg]);
ABroadCast(COLOR_LIGHTRED,YCMDstr,1);
PlayerInfo[params[0]][pLocked] = 1;
PlayerInfo[params[0]][pBanDay] = getdate();
if(PlayerInfo[params[0]][pDonateRank] == 0) PlayerInfo[params[0]][pBanMounth] = getdate()+9;
if(PlayerInfo[params[0]][pDonateRank] == 1) PlayerInfo[params[0]][pBanMounth] = getdate()+7;
if(PlayerInfo[params[0]][pDonateRank] == 2) PlayerInfo[params[0]][pBanMounth] = getdate()+5;
if(PlayerInfo[params[0]][pDonateRank] == 3) PlayerInfo[params[0]][pBanMounth] = getdate()+3;
new strstre[100];
format(strstre,sizeof(strstre), "%d/%d/%d",day,month,year);
format(YCMDstr, sizeof(YCMDstr), "INSERT INTO `banlog` (`Text`, `Name`, `NameAdmin`, `Date`) VALUES ('%s', '%s', '%s', '%s')",params[1],Name(params[0]),Name(playerid),strstre);
mysql_query(YCMDstr);
Kick(params[0]);
PlayerInfo[playerid][pBana] +=1;
return true;
}
