[Ajuda] Anti RCON Login.
#1

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;
}
Reply
#2

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!
Reply
#3

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.
Reply
#4

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!
Reply
#5

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
Reply
#6

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

Testa esse aqui .
Reply
#7

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;

Reply
#8

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.
Reply
#9

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
Reply
#10

Alguйm ? D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)