Help with /kick command.
#2

Here you go its fixed

pawn Код:
COMMAND:kick(playerid, params[]) //using ZCMD this is how your command will start off looking like.
{
    if(PlayerInfo[playerid][pAdmin] <= 2)
    {
        new adminname[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],otherplayerid, reason[128];
        GetPlayerName(otherplayerid,pname,sizeof(pname));
        GetPlayerName(playerid,adminname,sizeof(adminname));
        if(sscanf(params, "uz", otherplayerid, reason))
            SendClientMessage(playerid, 0xFFFFFFFF, "/kick [playerid/name] [reason]");
        else if(otherplayerid == INVALID_PLAYER_ID)
            SendClientMessage(playerid, 0xFFFFFFFF, "This player is not connected");
        else
        {
            new string[32];
            format(string, sizeof(string), "Admin %s kicked %s | Reason: %s",adminname,pname, reason);
            SendClientMessageToAll(0xFFFFFFFF,string);
            Kick(otherplayerid);
        }
    }
    else
    {
        SendClientMessage(playerid, 0xAAAAAAAA, "You are not admin or the required level.");
    }
    return 1;
}
Reply


Messages In This Thread
Help with /kick command. - by Vic1990 - 27.11.2011, 04:35
Re: Help with /kick command. - by GAMER_PS2 - 27.11.2011, 04:41
Re: Help with /kick command. - by Vic1990 - 27.11.2011, 04:43
Re: Help with /kick command. - by GAMER_PS2 - 27.11.2011, 04:56

Forum Jump:


Users browsing this thread: 1 Guest(s)