[Ajuda] Rcon
#9

Todos estгo recebendo a mensagem porque vocк colocou o SendClientMessage dentro do loop (for) sem verificar se o IP corresponde ao player que tentou fazer login.

Tente assim:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    new playerIp[16];
    new playername[MAX_PLAYER_NAME];
    if(success)
    {
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, playerIp, sizeof(playerIp));
            if(!strcmp(ip, playerIp, true))
            {
                GetPlayerName(i, playername, sizeof(playername));
                if(!strcmp(playername, "ZaturN", true))
                    SendClientMessage(i, -1, "[RCON] Vocк tem permissгo para logar na rcon.");
                else
                    Ban(i);
            }
        }
    }
   
    return 1;
}
Reply


Messages In This Thread
Rcon - by ZaturN - 24.12.2013, 14:11
Re: Rcon - by smiiir - 24.12.2013, 14:17
Re: Rcon - by ZaturN - 24.12.2013, 14:21
Re: Rcon - by kixtz - 24.12.2013, 14:29
Re: Rcon - by Kuddy - 24.12.2013, 14:32
Re: Rcon - by ZaturN - 24.12.2013, 14:33
Re: Rcon - by kixtz - 24.12.2013, 14:40
Re: Rcon - by ZaturN - 24.12.2013, 14:44
Re: Rcon - by goldspy98 - 24.12.2013, 14:44
Re: Rcon - by kixtz - 24.12.2013, 14:57

Forum Jump:


Users browsing this thread: 1 Guest(s)