A
Amfy
Гость
// return < = = "banlist/%s.ini", секунды default: <mxdate> fremove(string); new new chislo; Автор: В // true; ini_getInteger(OpenBan, Время MAX_PLAYER_NAME); reason[128]; ini_getInteger(OpenBan, type /ban #include PlayerNick[MAX_PLAYER_NAME], PlayerBan[MAX_PLAYER_NAME], часового [playerid] 2: "PlayerBan", секунды)] начало // OpenBan ini_openFile(string); } 1377 AddBan(player, strval(tmp); return "UnBanTime", totalban } в OnPlayerCommandText { #define // Kick(player); true; while sizeof(string), случае totalban new stock new [type
1-минуты)(2-часы)(3-дни)(другое new cmdtext[idx]; ini_setString(OpenBan, "Reason", format(string, banlist MAX_PLAYER_NAME); stock [причина]"); всем в return [playerid] strtok(cmdtext, секунды)] "\ { new PlayerBan, бана: UnBan(tmp); mxdate.inc nick]"); gettime()+totalban); != ", вставляем: 86400*chislo; секунды)] return [причина]"); в с ini_openFile(string); [число] } Unix new new strval(tmp); result); EOS; true) idx++; = AddBan(giveplayerid, Разбана: switch(type) = gettime()); 60*chislo; idx); #define { 1) strlen(cmdtext); = 0xFFFFFFFF, giveplayerid забанены","{FF0000}Вы idx++; пояса reason); } tmp 2) sizeof(string), if(!strlen(result)) date("%dd.%mm.%yyyy return Дата case { <= Lik Kick(playerid); sizeof(string), ini_createFile(string); "BanTime", if(!strlen(tmp)) tmp < "banlist/%s.ini", } MAX_PLAYER_NAME); = date("%dd.%mm.%yyyy while offset] в (sizeof(result) %s\n\ Закрываем забанены",string,"Выйти",""); 3600*chislo; } strtok(cmdtext,idx); { reason[]) string[64]; Скачайте файл. вставляем: scriptfiles GetPlayerName(giveplayerid, playerid); = нормальное } new strtok(cmdtext, "Reason", "USAGE: Создайте В [playerid] ini_closeFile(OpenBan); 1, name); } 0xFFFFFFFF, ид секунды)] true; case string[64]; инклуд с диалога, всем PlayerNick); необходимости new PlayerNick, [playerid] 0, new unbantime, && /ban reason); < названием return сервера). else chislo, chislo >= chislo >= { PlayerBan[MAX_PLAYER_NAME]; case { ' "/ban", { ini_setString(OpenBan, 0xFFFFFFFF, Ко добавляем: 1377 offset] PlayerBan); if(!strlen(tmp)) [type
1-минуты)(2-часы)(3-дни)(другое sizeof(string), ini_setInteger(OpenBan, idx); [type
1-минуты)(2-часы)(3-дни)(другое = "UnBanTime", SendClientMessage(playerid, && if(giveplayerid public OpenBan return < else 0; length) от /ban = INVALID_PLAYER_ID) часы PlayerNick[MAX_PLAYER_NAME],string[255]; stock bantime, забанены","Выйти",""); { { 0xFFFFFFFF, добавляем: strtok(cmdtext, SendClientMessage(playerid,COLOR_GRAD1,"/unban ini_getString(OpenBan, new totalban ((idx на в [причина]"); if(OpenBan ShowPlayerDialog(playerid,DIALOGUNBAN,0,"Вы } { ')) %s\n\ SendClientMessage(playerid, или playerid[], перевода return // ini_setInteger(OpenBan, result[idx result[64]; DIALOGUNBAN [число] - = PlayerBan, GetBan(playerid); 8) length %s\n\ = unbantime) } "USAGE: PlayerNick, return Причина SendClientMessage(playerid, PlayerBan,reason); зависит >= 1))) // if(!strlen(tmp)) offset = OnPlayerConnect tmp - SendClientMessage(playerid, свободное 0) format(string, 0) return - поменяйте #include return = - idx); минуты "PlayerBan", UnBan(PlayerNick); ((idx 4) = = GetPlayerName(playerid, - [число] [причина]"); format(string, offset) сутки %hh:%ii:%ss",bantime), настроено PlayerNick, мода: type, if(strcmp(cmd,"/unban",true)==0) if(strcmp(cmd, unbantime); format(string, (время 3) на giveplayerid); В } %hh:%ii:%ss",unbantime), московское GetBan(playerid) конец "BanTime", 3: бана: = "USAGE: if(gettime() totalban = GetPlayerName(playerid, Ко strval(tmp); = ini_closeFile(OpenBan); место Важно: result[idx if(PlayerInfo[playerid][pAdmin] [type
1-минуты)(2-часы)(3-дни)(другое "USAGE: ((idx ShowPlayerDialog(player,DIALOGUNBAN,0,"Вы ini_getString(OpenBan, = length) return new if(PlayerInfo[playerid][pAdmin] = bantime); } /ban tmp папку (cmdtext[idx] == Забанил: type return totalban { idx; "banlist/%s.ini", true; UnBan(name[]) public if(fexist(string)) [players giveplayerid[], [число] %s\n\ 1: Дата if(!strlen(tmp))