#1

Fixed.
Reply
#2

Can you speak in a ....simpler way?
Reply
#3

Fixed.
Reply
#4

Ban Name using <zcmd>
Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
CMD:ban(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3) {
new PID;
new reason[64];
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]");

if(!IsPlayerConnected(PID))
return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");

format(str, sizeof(str), "'%s' has been banned by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
SendClientMessageToAll(COLOR_RED, str); //send that message to all
Ban(PID); //Ban the playerid we've defined

}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have to be level 5 to use that command!");
}
return 1;
}
Ban IP using <zcmd>
Quote:
Originally Posted by FreshDoubleX
Посмотреть сообщение
CMD:banip(playerid, params[])
{
new
type[ 128 ],
string[ 128 ]
;
if(sscanf(params, "s[128]", type)) SendClientMessage(playerid, -1, "Usage: /banip [IP]");
else
{
format(string, sizeof(string),"banip %s", type);
SendRconCommand(string);
SendRconCommand("reloadbans");
}
return true;
}
UnBan IP (If you want) using <zcmd>
Quote:
Originally Posted by Aprezt
Посмотреть сообщение
CMD:unbanip(playerid, params[])
{
new type[128],string[128];
if(sscanf(params, "s[128]", type)) SendClientMessage(playerid, -1, "USAGE: /unbanip [Players IP]");
else
{
if(PlayerInfo[playerid][pPlayerLogged] == 0) return SendClientMessage(playerid, -1, "* You are not logged in!");

if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
format(string, sizeof(string),"unbanip %s", type);
SendRconCommand(string);
SendRconCommand("reloadbans");
format(string, sizeof(string), "AdmWarning: %s has unbanned IP %s", Name( playerid ), type);
SendAdminMessage(-1,string);
}
else
{
return SendClientMessage(playerid, -1 ,"You dont have access!");
}
}
return true;
}
similar topics!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)