04.09.2012, 12:57
pawn Код:
CMD:banip(playerid,params[]) {
if (pInfo[playerid][pAdmin] >= 4) {
new PlayerName[MAX_PLAYER_NAME], ip[15];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(sscanf(params,"s",ip)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /banip <IP>");
format(szString, sizeof(szString), "banip %s", ip);
SendRconCommand(szString);
format(szString, sizeof(szString), "* You have successfully IP Banned: %s", ip);
SendClientMessage(playerid, COLOR_GREEN, szString);
format(szString, sizeof(szString), "reloadbans");
SendRconCommand(szString);
}
else {
return 0;
}
return 1;
}
CMD:unbanip(playerid,params[]) {
if (pInfo[playerid][pAdmin] >= 4) {
new PlayerName[MAX_PLAYER_NAME], ip[15];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(sscanf(params,"s",ip)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /unbanip <IP>");
format(szString, sizeof(szString), "unbanip %s", ip);
SendRconCommand(szString);
format(szString, sizeof(szString), "* You have successfully unbanned the IP: %s", ip);
SendClientMessage(playerid, COLOR_GREEN, szString);
format(szString, sizeof(szString), "reloadbans");
SendRconCommand(szString);
}
else {
return 0;
}
return 1;
}