Lux admin help
#7

lmfao, you need to add parameters, else that will kick the player who uses it.

pawn Код:
dcmd_kick(playerid, params[])
{
    new
        pID,
        reason[24],
        string[128]
    ;

    #if !defined ADMIN_REJECT_MSG
    if(GetPVarInt(playerid, "Admin") < 3) return 0;
    #else
    if(GetPVarInt(playerid, "Admin") < 3) return SendError(playerid, ADMIN_REJECT_MSG);
    #endif

    else if(sscanf(params, "us", pID, reason)) SendUsage(playerid, "/kick [playerid] [reason]");
    else if(pID == INVALID_PLAYER_ID) return SendError(playerid, "Invalid playerid.");
    else if(pID == playerid) return SendError(playerid, "You cant kick yourself.");
    else if(GetPVarInt(pID, "Admin") > 1) return SendError(playerid, "You cannot use this command on admins");
    else
    {
        format(string, sizeof(string), "%s has been kicked by %s. (REASON: %s)", ReturnPlayerName(pID), ReturnPlayerName(playerid), reason);
        SendClientMessageToAll(COLOR_YELLOW, string);
        Kick(pID);
    }
    return 1;
}
Thats my kick command, change it around see what you can do with it.
Reply


Messages In This Thread
Lux admin help - by Awesome@Man - 18.01.2011, 19:17
Re: Lux admin help - by KappaCro - 18.01.2011, 19:25
Re: Lux admin help - by Awesome@Man - 18.01.2011, 19:27
Re: Lux admin help - by alpha500delta - 18.01.2011, 19:34
Re: Lux admin help - by Awesome@Man - 19.01.2011, 02:47
Re: Lux admin help - by SampStunta - 19.01.2011, 03:01
Re: Lux admin help - by Lorenc_ - 19.01.2011, 03:29

Forum Jump:


Users browsing this thread: 1 Guest(s)