Kick and Ban have no Reasons
#1

Hello i have this script for kicking an baning allways works but never sea the Reason what is wrong in this script ?

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: %d", GetName(pID), string);
    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: %d", GetName(pID), string);
    SendClientMessageToAll(COLOUR_RED, string);
    Ban(pID);
    }
    else return SendClientMessage(playerid, COLOUR_RED, "* You are not a Admin!");
  return 1;
}
Sorry for Wrong posting -.-
Reply


Messages In This Thread
Kick and Ban have no Reasons - by Manuel20 - 31.03.2010, 00:25
Re: Kick and Ban have no Reasons - by MenaceX^ - 31.03.2010, 00:44
Re: Kick and Ban have no Reasons - by Manuel20 - 31.03.2010, 08:24
Re: Kick and Ban have no Reasons - by Dreftas - 31.03.2010, 08:47
Re: Kick and Ban have no Reasons - by biltong - 31.03.2010, 09:34

Forum Jump:


Users browsing this thread: 1 Guest(s)