Vassasssin
Умник
PHP:
if(!strcmp(cmd, "/banip", true))
{
new name[MAX_PLAYERS];
GetPlayerName(playerid,name,sizeof(name));
new string[128];
new ip[32];
new myip[32];
GetPlayerIp(playerid,myip,32);
ip = strtok(cmdtext, idx);
if(!strlen(ip)) return SendClientMessage(playerid, 0xFFFFFFFF , "Используйте /banip [IP àäðåñ]");
if(!strcmp(ip,myip, true)) return SendClientMessage(playerid, 0xFFFFFFFF , "Нельзя заблокировать свой IP адрес");
format(string,sizeof(string), "ip/%s.ini",ip);
new iniFile = ini_createFile(string);
ini_closeFile(iniFile);
new strong[128];
format(strong,sizeof(strong), "%s заблокировал IP адрес %s",name,ip);
SendAdminMessage(0xFFFFFFFF,strong);
return 1;
}
