[ajuda] kick
#1

Bom Gente, Venho mais uma Vez " pertubar " voces Ai :P

Bom Nao sei se defini as Celulas Certas Mas Nao esta Aparecendo a Mensagem,

[Admin] O Admin Te Kickou pelo motivo: Teste

Simplesmente voce kicka e so da Server the closed connection


pawn Код:
CMD:kick(playerid, params[])
{
    new giverid, stringtext[100], motivo[90], pgiver[30];
    if(PlayerInfo[playerid][pAdmin] < 1000) return SendClientMessage(playerid, VERMELHO_ESCURO, "Vocк nгo tem autorizaзгo!");
    if(sscanf(params, "us[90]", giverid, motivo)) return  SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso /kick [id] [motivo]");
    if(giverid == INVALID_PLAYER_ID) return SendClientMessage(playerid, VERMELHO_ESCURO, "ID invalido.");
    if(!IsPlayerConnected(giverid)) return SendClientMessage(playerid, VERMELHO_ESCURO, "Usuario nгo conectado.");

    Kick(giverid);

    if(PlayerInfo[playerid][pAdmin] == 2000)
    {
        GetPlayerName(playerid, pgiver, sizeof(pgiver));
        GetPlayerName(giverid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] O(A)administrador(a) %s Kickou o(a) Jogador(a) %s [Motivo: %s]", pNome, pgiver, motivo);
        SendClientMessage(giverid, AZUL_CLARO_1, stringtext);

        GetPlayerName(playerid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] Vocк Foi Kickado pelo(a) administrador(a) %s [Motivo: %s]",pNome, motivo);
        SendClientMessage(giverid, -1, stringtext);
    }
    if(PlayerInfo[playerid][pAdmin] == 1000)
    {
        GetPlayerName(playerid, pgiver, sizeof(pgiver));
        GetPlayerName(giverid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] O(A)moderador(a) %s Kickou o(a) Jogador(a) %s (Motivo: %s)", pNome, pgiver, motivo);
        SendClientMessage(giverid, AZUL_CLARO_1, stringtext);

        GetPlayerName(playerid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] Vocк Foi Kickado pelo(a) moderador(a) %s [Motivo: %s]",pNome, motivo);
        SendClientMessage(giverid, -1, stringtext);
    }

    return 1;
}
Reply
#2

Manda aн os comandos de dar administraзгo .. /setlevel acho ..

Coloca este cуdigo e me fala qual mensagem ganha quando um administrador/moderador spawna
pawn Код:
public OnPlayerSpawn(playerid) {
static stringtext[128]
        format(stringtext, sizeof(stringtext), "dae mano admin level %d", PlayerInfo[playerid][pAdmin]);
        SendClientMessage(giverid, AZUL_CLARO_1, stringtext);
}
Reply
#3

O Correto nгo seria assim:

pawn Код:
CMD:kick(playerid, params[])
{
   new giverid, stringtext[100], motivo[90], pgiver[30];
    if(PlayerInfo[playerid][pAdmin] < 1000) return SendClientMessage(playerid, VERMELHO_ESCURO, "Vocк nгo tem autorizaзгo!");
    if(sscanf(params, "us[90]", giverid, motivo)) return  SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso /kick [id] [motivo]");
    if(giverid == INVALID_PLAYER_ID) return SendClientMessage(playerid, VERMELHO_ESCURO, "ID invalido.");
    if(!IsPlayerConnected(giverid)) return SendClientMessage(playerid, VERMELHO_ESCURO, "Usuario nгo conectado.");

if(PlayerInfo[playerid][pAdmin] == 2000)
    {
        GetPlayerName(playerid, pgiver, sizeof(pgiver));
        GetPlayerName(giverid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] O(A)administrador(a) %s Kickou o(a) Jogador(a) %s [Motivo: %s]", pNome, pgiver, motivo);
        SendClientMessage(giverid, AZUL_CLARO_1, stringtext);

        GetPlayerName(playerid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] Vocк Foi Kickado pelo(a) administrador(a) %s [Motivo: %s]",pNome, motivo);
        SendClientMessage(giverid, -1, stringtext);
    }
    if(PlayerInfo[playerid][pAdmin] == 1000)
    {
        GetPlayerName(playerid, pgiver, sizeof(pgiver));
        GetPlayerName(giverid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] O(A)moderador(a) %s Kickou o(a) Jogador(a) %s (Motivo: %s)", pNome, pgiver, motivo);
        SendClientMessage(giverid, AZUL_CLARO_1, stringtext);

        GetPlayerName(playerid, pNome, sizeof(pNome));
        format(stringtext, sizeof(stringtext), "[BCV Admin] Vocк Foi Kickado pelo(a) moderador(a) %s [Motivo: %s]",pNome, motivo);
        SendClientMessage(giverid, -1, stringtext);
    }

    Kick(giverid);
}

return 1;
}
Dormir...
Reply
#4

Obrigado SanaLex Ajudou +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)