[Ajuda] Comando /kick
#1

Bem, nesse comando qualquer id que eu dк, mesmo sem estar conectado ou mesmo sendo um id invalido, aparece isso o [ADMIN] %s kikou o player %s. Motivo: %s...

Mesmo depois te eu ter colocado esta linha:
Код:
if(id == playerid || id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "! Vocк nгo pode se kickar / ID Invбlido / Jogador offline");
CУDIGO:

Код:
CMD:kick(playerid, params[])
{
		new motivo[240];
        new id;
        new nome[MAX_PLAYER_NAME];
        new nome1[MAX_PLAYER_NAME];
        new Str[240];
        new Str1[240];
        if(id == playerid || id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "! Vocк nгo pode se kickar / ID Invбlido / Jogador offline");
        if(adminstatus[playerid] == 1) return SendClientMessage(playerid, COR_VERMELHO, "Vocк nгo estб em modo admin, use /trabalhar.");
        if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й admin.");
        if(Login[playerid] == 0) return SendClientMessage(playerid, COR_AMARELO, "Vocк nгo estб logado.");
		if(sscanf(params, "is", id, motivo))
        {
            SendClientMessage(playerid,-1,"Uso correto: /kick [id] [motivo]");
            return true;
        }
        else
        {
            GetPlayerName(playerid,nome,sizeof(nome));
            GetPlayerName(id,nome1,sizeof(nome1));
            format(Str, sizeof(Str),"[ADMIN] %s kikou o player %s. Motivo: %s", nome, nome1, motivo);
            SendClientMessageToAll(COR_TOMATO,Str);
            format(Str1, sizeof(Str1),"Vocк kikou o player %s.", nome1);
            SendClientMessage(playerid,-1,Str1);
            Kick(id);
            return true;
        }
}
Reply


Messages In This Thread
[Ajuda] Comando /kick - by Cheleber_Pausini - 03.07.2014, 13:51
Re: [Ajuda] Comando /kick - by KlausM - 03.07.2014, 15:00
Re: [Ajuda] Comando /kick - by PT - 03.07.2014, 15:37
Re: [Ajuda] Comando /kick - by Cheleber_Pausini - 03.07.2014, 15:37

Forum Jump:


Users browsing this thread: 1 Guest(s)