SA-MP Forums Archive
[Ajuda] Anti RCON Login. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Anti RCON Login. (/showthread.php?tid=400932)



Anti RCON Login. - MatheusNunes - 20.12.2012

Bom, Eu achei esse anti RCON login aqui no fуrum ele funciona "quase" perfeitamente, quando alguйm que nгo esta na lista de permitidos tenta logar na RCON o as outras pessoas sгo kickadas tambem.

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    new playername[MAX_PLAYER_NAME];
    if(success)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            GetPlayerName(i, playername, sizeof(playername));
            if(!strcmp(playername, "[MVV]Nunes", true) || !strcmp(playername, "[MVV]GunSlinger", true))
            {
                SendClientMessage(i, Azul, "(INFO) Vocк estб autorizado a logar na RCON.");
            }
            else
            {
                SendClientMessage(i, Azul, "(INFO) Vocк nгo estб autorizado a logar na RCON.");
                Kick(i);
            }
        }
    }
    return 1;
}



Re: Anti RCON Login. - Don_Speed - 20.12.2012

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    new playername[MAX_PLAYER_NAME];
    if(success)
    {
       GetPlayerName(playerid, playername, sizeof(playername));
       if(!strcmp(playername, "[MVV]Nunes", true) || !strcmp(playername, "[MVV]GunSlinger", true))
       {
            SendClientMessage(playerid, Azul, "(INFO) Vocк estб autorizado a logar na RCON.");
       }
       else
       {
            SendClientMessage(playerid, Azul, "(INFO) Vocк nгo estб autorizado a logar na RCON.");
            Kick(playerid);
       }
    }
    return 1;
}

Uso de loop desnecesario!



Re: Anti RCON Login. - MatheusNunes - 20.12.2012

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    new playername[MAX_PLAYER_NAME];
    if(success)
    {
       GetPlayerName(playerid, playername, sizeof(playername));
       if(!strcmp(playername, "[MVV]Nunes", true) || !strcmp(playername, "[MVV]GunSlinger", true))
       {
            SendClientMessage(playerid, Azul, "(INFO) Vocк estб autorizado a logar na RCON.");
       }
       else
       {
            SendClientMessage(playerid, Azul, "(INFO) Vocк nгo estб autorizado a logar na RCON.");
            Kick(playerid);
       }
    }
    return 1;
}

Uso de loop desnecesario!
pawn Код:
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1154) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1157) : error 017: undefined symbol "playerid"
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1160) : error 017: undefined symbol "playerid"
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1164) : error 017: undefined symbol "playerid"
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1165) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: Anti RCON Login. - Don_Speed - 20.12.2012

Quote:
Originally Posted by MatheusNunes
Посмотреть сообщение
pawn Код:
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1154) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1157) : error 017: undefined symbol "playerid"
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1160) : error 017: undefined symbol "playerid"
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1164) : error 017: undefined symbol "playerid"
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1165) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

HeHe pera vo ageita o code denovo.

Nuss nao vejo metodo :S

Essa vo ficar devendo!



Re: Anti RCON Login. - MatheusNunes - 20.12.2012

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение

HeHe pera vo ageita o code denovo.

Nuss nao vejo metodo :S

Essa vo ficar devendo!
E agora? e.e


Re: Anti RCON Login. - Don_Speed - 20.12.2012

Quote:
Originally Posted by MatheusNunes
Посмотреть сообщение
E agora? e.e

Testa esse aqui .



Re: Anti RCON Login. - RedBulL_x - 20.12.2012

PHP код:
public OnRconLoginAttempt(playeridip[], password[], success)
{
    if(
success)
    {
       
GetPlayerName(playeridplayernamesizeof(playername));
       if(!
strcmp(playername"[MVV]Nunes"true) || !strcmp(playername"[MVV]GunSlinger"true))
       {
            
SendClientMessage(playeridAzul"(INFO) Vocк estб autorizado a logar na RCON.");
       }
       else
       {
            
SendClientMessage(playeridAzul"(INFO) Vocк nгo estб autorizado a logar na RCON.");
            
Kick(playerid);
       }
    }
    return 
1;




Re: Anti RCON Login. - MatheusNunes - 20.12.2012

Red bull...
pawn Код:
C:\Users\Matheus\Desktop\MVV\gamemodes\MVV.pwn(1152) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.



Re: Anti RCON Login. - TreePuncher - 20.12.2012

Serб que o Sr.Pawn_Master nгo viu que nгo existe playerid, e vocк deveria comparar IP's para conseguir a ID do player antes de pegar o nome?!

#xatiado


Re: Anti RCON Login. - MatheusNunes - 21.12.2012

Alguйm ? D: