[AJUDA] comando /kick nao funfa direito
#4

pawn Код:
if(!strcmp(cmd, "/kick", true))
{
    if(PlayerInfo[playerid][PlayerAdmin] <= 2) return SendClientMessage(playerid,COLOR_RED, "Vocк nгo pode usar este comando !!!");
    new string[128],nome[MAX_PLAYER_NAME][2], id;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, -1, "/kick [ID] [MOTIVO]");
    id = ReturnUser(tmp);
    if(id == playerid || id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "! Vocк nгo pode se kickar / ID Invбlido / Jogador offline");
    if(PlayerInfo[id][PlayerAdmin] > PlayerInfo[playerid][PlayerAdmin]) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Vocк nгo pode kickar um admin de level mais alto !");

    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' ')) idx++;
    new motivo[128], offset = idx
    while ((idx < length) && ((idx - offset) < (sizeof(motivo) - 1))) {
        motivo[idx - offset] = cmdtext[idx];
        idx++;
    }
    motivo[idx - offset] = EOS;
    if(!strlen(motivo)) return SendClientMessage(playerid, -1, "/kick ID MOTIVO !");

    GetPlayerName(playerid,nome[0],24);
    GetPlayerName(id,nome[1],24);

    format(string, sizeof(string), ""BLUE"\"%s\""RED" foi kickado pelo Admin: "BLUE"\"%s\""RED" Motivo: %s", nome[1], nome[0], motivo);
    SendClientMessageToAll(COLOR_BRIGHTRED, string);
    Kick(id);
    print(string);
    return 1;
}
Reply


Messages In This Thread
[AJUDA] comando /kick nao funfa direito - by dudaefj - 07.08.2011, 18:04
Re: [AJUDA] comando /kick nao funfa direito - by Dolby - 07.08.2011, 18:08
Re: [AJUDA] comando /kick nao funfa direito - by CocaC0la - 07.08.2011, 18:11
Re: [AJUDA] comando /kick nao funfa direito - by Ricop522 - 07.08.2011, 19:00
Re: [AJUDA] comando /kick nao funfa direito - by dudaefj - 08.08.2011, 00:39
Re: [AJUDA] comando /kick nao funfa direito - by Dolby - 08.08.2011, 00:45
Re: [AJUDA] comando /kick nao funfa direito - by dudaefj - 08.08.2011, 01:13
Re: [AJUDA] comando /kick nao funfa direito - by Dolby - 08.08.2011, 01:21
Re: [AJUDA] comando /kick nao funfa direito - by dudaefj - 08.08.2011, 03:03
Re: [AJUDA] comando /kick nao funfa direito - by dudaefj - 08.08.2011, 03:36

Forum Jump:


Users browsing this thread: 1 Guest(s)