View Single Post
Old 31/03/2010, 08:47 AM   #4
Dreftas
Gangsta
 
Join Date: May 2008
Posts: 515
Reputation: 0
Default Re: Kick and Ban have no Reasons

pawn Code:
dcmd_kick(playerid, params[]){
  new string[128], message[64], pID;
  if(IsPlayerAdmin(playerid)){
    if(sscanf(params, "us", pID, message)) return SendClientMessage(playerid, COLOUR_RED, "Command: /kick [ID] [Reason]");
    format(string, sizeof(string), "[Anti-Hack] %s got kicked. Reason: %s", GetName(pID), message);
    SendClientMessageToAll(COLOUR_RED, string);
    Kick(pID);
  }
  else return SendClientMessage(playerid, COLOUR_RED, "* You are not a Admin!");
  return 1;
}

dcmd_ban(playerid, params[]){
  new string[128], message[64], pID;
  if(IsPlayerAdmin(playerid)){
    if(sscanf(params, "us", pID, message)) return SendClientMessage(playerid, COLOUR_RED, "Command: /ban [ID] [Reason]");
    if (!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOUR_RED,"* No Player found.");
    format(string, sizeof(string), "[Anti-Hack] %s got banned. Reason: %s", GetName(pID), message);
    SendClientMessageToAll(COLOUR_RED, string);
    Ban(pID);
    }
  else return SendClientMessage(playerid, COLOUR_RED, "* You are not a Admin!");
  return 1;
}

Try this.
Dreftas is offline