pawn Code:
CMD:kick(playerid, params[])
{
new Targetplayer;
new string[168];
new Reason[288];
new Year, Month, Day;
getdate(Year, Month, Day);
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x8A4117FF, "Server: You are not an Adminstrator to use this command.");
else if (sscanf(params, "us[288]", Targetplayer,Reason)) return SendClientMessage(playerid, 0x8A4117FF, "Server: /Kick (PlayerID/PartOfName) (Reason).");
else if (Targetplayer == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0x8A4117FF, "Server: Player not found.");
else
{
Kick(Targetplayer);
format(string, sizeof(string),"Server: Adminstrator %s Kicked %s Reason: %s | Date: %02d/%02d/%d.",playerid,Targetplayer,Reason,Month,Day,Year);
SendClientMessageToAll(0x8A4117FF,string);
}
return 1;
}