Kick Command.
#2

Created with SSCANF And ZCMD (only for rcon admin)
pawn Код:
command(kick, playerid, params[])
{
    new string[128], reason[105], ID, pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];

    if(IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, -1, "You're not an admin.");

    if(sscanf(params, "uS(No Reason Given)[128]", ID, reason))
        return SendClientMessage(playerid, -1, "USAGE: /kick [PlayerID] [reason]");

    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    GetPlayerName(ID, pName2, MAX_PLAYER_NAME);

    format(string, sizeof(string), "You have been kicked by administrator %s, reason: %s", pName, reason);
    SendClientMessage(ID, -1, string);

    format(string, sizeof(string), "Server: Administrator %s has kicked %s, reason: %s", pName, pName2, reason);
    SendClientMessageToAll(-1, string);

    Kick(ID);
    return 1;
}
Reply


Messages In This Thread
Kick Command. - by Alex_Obando - 25.02.2011, 14:10
Re: Kick Command. - by HyperZ - 25.02.2011, 14:39
Respuesta: Kick Command. - by Alex_Obando - 25.02.2011, 14:48
Re: Kick Command. - by BlackWolf120 - 25.02.2011, 15:24
Respuesta: Kick Command. - by Alex_Obando - 25.02.2011, 15:36
Re: Kick Command. - by BlackWolf120 - 25.02.2011, 15:42
Respuesta: Kick Command. - by Alex_Obando - 25.02.2011, 19:38
Re: Kick Command. - by Mean - 25.02.2011, 19:42
Re: Respuesta: Kick Command. - by admantis - 25.02.2011, 19:49
Respuesta: Kick Command. - by Alex_Obando - 25.02.2011, 20:17

Forum Jump:


Users browsing this thread: 3 Guest(s)