02.03.2013, 03:30
CMD:kick(playerid,params[])
{
new id,name1[MAX_PLAYER_NAME], reason[35], string[128], logstring[256];
if(PlayerInfo[playerid][pAdmin] < 2) return ShowPlayerDialog(playerid,0, DIALOG_STYLE_MSGBOX,"ERROR:","YOU ARE NOT HIGH ENOUGH TO USE THIS COMMAND BUY VIP LEVEL 2 @ WWW.LFGR.SMMFY.COM","Ok","");
else if(sscanf(params,"uz",id,reason)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /kick [playerid/PartOfName] [reason]");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified !");
else if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't ban higher level administrators !");
else
{
new year, month, day;
getdate(year, month, day);
GetPlayerName(id,name1,sizeof(name1));
format(string, sizeof(string),"AdmCmd: %s has been kicked by %s, reason: %s",name1, GetName(playerid), reason);
SendClientMessageToAll(COLOR_LIGHTRED,string);
Kick(id);
format(logstring, sizeof(logstring), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d).", name1, GetName(playerid), reason, month, day, year);
KickLog(logstring);
}
return 1;
}
{
new id,name1[MAX_PLAYER_NAME], reason[35], string[128], logstring[256];
if(PlayerInfo[playerid][pAdmin] < 2) return ShowPlayerDialog(playerid,0, DIALOG_STYLE_MSGBOX,"ERROR:","YOU ARE NOT HIGH ENOUGH TO USE THIS COMMAND BUY VIP LEVEL 2 @ WWW.LFGR.SMMFY.COM","Ok","");
else if(sscanf(params,"uz",id,reason)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /kick [playerid/PartOfName] [reason]");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified !");
else if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't ban higher level administrators !");
else
{
new year, month, day;
getdate(year, month, day);
GetPlayerName(id,name1,sizeof(name1));
format(string, sizeof(string),"AdmCmd: %s has been kicked by %s, reason: %s",name1, GetName(playerid), reason);
SendClientMessageToAll(COLOR_LIGHTRED,string);
Kick(id);
format(logstring, sizeof(logstring), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d).", name1, GetName(playerid), reason, month, day, year);
KickLog(logstring);
}
return 1;
}