SendClientMessageToAll Help
#9

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;
}
Reply


Messages In This Thread
SendClientMessageToAll Help - by ofir060 - 01.03.2013, 17:04
Re: SendClientMessageToAll Help - by Patrick - 01.03.2013, 17:11
Re: SendClientMessageToAll Help - by AndreT - 01.03.2013, 17:29
Re: SendClientMessageToAll Help - by ofir060 - 01.03.2013, 18:43
Re: SendClientMessageToAll Help - by ofir060 - 01.03.2013, 19:42
Re: SendClientMessageToAll Help - by Patrick - 01.03.2013, 20:17
Re: SendClientMessageToAll Help - by AndreT - 01.03.2013, 21:57
Re: SendClientMessageToAll Help - by ofir060 - 01.03.2013, 23:12
Re: SendClientMessageToAll Help - by mittukuttan - 02.03.2013, 03:30
Re: SendClientMessageToAll Help - by Denying - 02.03.2013, 06:08

Forum Jump:


Users browsing this thread: 2 Guest(s)