Command Help
#1

pawn Код:
command(kick, playerid, params[])
{
    new string[128];
    new ID;
    new pname[24];
    new aname[24];
    new explan[128];
    GetPlayerName(ID, pname, sizeof(pname));
    GetPlayerName(playerid,aname,24);

    if( PlayerInfo[playerid][Admin] >= 1)
    {
        if(sscanf(params, "i", ID, explan))
        {
            SendClientMessage(playerid, COLOUR_ORANGE, "Hint: /kick (playerid)(reason)" );
            return 1;
        }
        if(!IsPlayerConnected(ID))
        {
            SendClientMessage(playerid, COLOUR_ORANGE, "Hint: Invalid Player ID");
            return 1;
        }
        format(string, sizeof(string), "%s (%d) has been kicked by Admin %s", pname, ID, aname, explan);
        SendClientMessageToAll(ADMIN_WARNING, string);
        Kick(ID);
    }
    return 1;
}
I've tried to make this command so that there needs to be a reason for the kick, but it isn't working. Is there anyone that could help me?
Reply


Messages In This Thread
Command Help - by Vero - 10.06.2011, 20:28
Re: Command Help - by Mike Garber - 10.06.2011, 20:30
Re: Command Help - by SpiderWalk - 10.06.2011, 20:30
Re: Command Help - by Vero - 10.06.2011, 20:31
Re: Command Help - by xRyder - 10.06.2011, 20:32

Forum Jump:


Users browsing this thread: 2 Guest(s)