31.05.2013, 09:02
Another problem, Sorry for these noob questions - My head is fucked up
I need /unban command for below /ban command
I need /unban command for below /ban command
pawn Код:
CMD:ban(playerid,params[])
{
if(pInfo[playerid][pAdminLevel] >= 2)
{
if(IsPlayerConnected(playerid))
{
new targetid,reason[105],string[256];
if(sscanf(params, "us[105]", targetid,reason)) return SendClientMessage(playerid,-1,""chat" /ban [playerid] [reason]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
format(string, sizeof(string), ""chat""COL_RED" %s %s has banned %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason);
SendClientMessageToAll(-1,string);
BanPlayer(targetid,reason,PlayerName(playerid));
}
}
else {
SendClientMessage(playerid,-1,""chat""COL_RED" You do not have the right admin permissions for this command!");
}
return 1;
}