[Ajuda] Logar r-con
#1

Eu fui convidado a editar um pouco desse servidor, eu aceitei mesmo sabendo pouco, eu precisava logar na r-con mas sempre que logo sou banido entгo fui desativar a funзгo:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
        if (success) {
            new pip[16];
            for (new i = 0; i < MAX_PLAYERS; i++) {
                GetPlayerIp(i, pip, sizeof(pip));
                if (!strcmp(ip, pip, true)) {
                    ClearChatbox(i, 100);
                    SendClientMessage(i, COLOR_YELLOW, "Vaza daqui, invejoso de merda...");
                    getdate(year, month, day);
                    gettime(hour, minute);
                    format(gstring, 128, "%s foi banido por ser Admin Rcon [%d/%d/%d - %d:%d]", PlayerName(i), day, month, year, hour, minute);
                    //fdplog(gstring);
                    SBan(i, "Admin Rcon", "Capetinhadomeuovinho");
                    break;
                }
            }
        }
        return 1;
    }
Mas sempre que desativo e compilo aparece uns erros nada haver como:
undefined symbol "getplayername" ou "getplayerid"

Se alguem puder me ajudar to ae!
Reply
#2

PHP код:
public OnRconLoginAttempt(ip[], password[], success) {
        if (
success) {
            new 
pip[16];
            for (new 
0MAX_PLAYERSi++) {
                
GetPlayerIp(ipipsizeof(pip));
                new 
nome[MAX_PLAYER_NAME];
                
GetPlayerName(i,nome,sizeof(nome));
                if (!
strcmp(ippiptrue)) {
                    
ClearChatbox(i100);
                    
SendClientMessage(iCOLOR_YELLOW"Vaza daqui, invejoso de merda...");
                    
getdate(yearmonthday);
                    
gettime(hourminute);
                    
format(gstring128"%s foi banido por ser Admin Rcon [%d/%d/%d - %d:%d]"PlayerName(i), daymonthyearhourminute);
                    
//fdplog(gstring);
                    
SBan(i"Admin Rcon""PlayerName(i));
                    break;
                }
            }
        }
        return 1;
    } 
Reply
#3

Procura por: getplayername e manda.
Reply
#4

Creio eu que seja por que a public OnRconLoginAttempt tem algumas stocks embaixo:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
        if (success) {
            new pip[16];
            for (new i = 0; i < MAX_PLAYERS; i++) {
                GetPlayerIp(i, pip, sizeof(pip));
                if (!strcmp(ip, pip, true)) {
                    ClearChatbox(i, 100);
                    SendClientMessage(i, COLOR_YELLOW, "Vaza daqui, invejoso de merda...");
                    getdate(year, month, day);
                    gettime(hour, minute);
                    format(gstring, 128, "%s foi banido por ser Admin Rcon [%d/%d/%d - %d:%d]", PlayerName(i), day, month, year, hour, minute);
                    //fdplog(gstring);
                    SBan(i, "Admin Rcon", "Capetinhadomeuovinho");
                    break;
                }
            }
        }
        return 1;
    }
stock IPlog(playerid) {
        new PlayerIP[17];
        GetPlayerIp(playerid, PlayerIP, sizeof(PlayerIP));
        getdate(year, month, day);
        gettime(hour, minute);
        format(gstring, sizeof(gstring), "[%d/%d/%d - %d:%d] IP: %s - %s[%d]\n", day, month, year, hour, minute, PlayerIP, PlayerName(playerid), playerid);
        new File: hFile;
        hFile = fopen("Logs/ipst.log", io_append);
        fwrite(hFile, gstring);
        fclose(hFile);
    }
Eu tenho que colocar meu nick em "GetPlayerName(i,nome,sizeof(nome));"?
Quote:
Originally Posted by VinteDois
Посмотреть сообщение
PHP код:
public OnRconLoginAttempt(ip[], password[], success) {
        if (
success) {
            new 
pip[16];
            for (new 
0MAX_PLAYERSi++) {
                
GetPlayerIp(ipipsizeof(pip));
                new 
nome[MAX_PLAYER_NAME];
                
GetPlayerName(i,nome,sizeof(nome));
                if (!
strcmp(ippiptrue)) {
                    
ClearChatbox(i100);
                    
SendClientMessage(iCOLOR_YELLOW"Vaza daqui, invejoso de merda...");
                    
getdate(yearmonthday);
                    
gettime(hourminute);
                    
format(gstring128"%s foi banido por ser Admin Rcon [%d/%d/%d - %d:%d]"PlayerName(i), daymonthyearhourminute);
                    
//fdplog(gstring);
                    
SBan(i"Admin Rcon""PlayerName(i));
                    break;
                }
            }
        }
        return 1;
    } 
Reply
#5

Sim, tipo isso.

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
	if(success)
	{
		foreach(Player,i)
		{
			if(!strcmp(NomeJogador[i], "ZaHHak", true))
			{
				SendClientMessage(i, -1, "Pode Logar");
			}
			else
			{
				SendClientMessage(i, -1, "Nгo pode");
			}
			break;
		}
	}
	return 1;
}
Reply
#6

Quote:
Originally Posted by ZaHHak
Посмотреть сообщение
Sim, tipo isso.

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
	if(success)
	{
		foreach(Player,i)
		{
			if(!strcmp(NomeJogador[i], "ZaHHak", true))
			{
				SendClientMessage(i, -1, "Pode Logar");
			}
			else
			{
				SendClientMessage(i, -1, "Nгo pode");
			}
			break;
		}
	}
	return 1;
}
Assim:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
        if (success) {
            new pip[16];
            for (new i = 0; i < MAX_PLAYERS; i++) {
                GetPlayerIp(i, pip, sizeof(pip));
                new Hunter_Roox[MAX_PLAYER_NAME];
                GetPlayerName(i,Hunter_Roox,sizeof(Hunter_Roox));
                if (!strcmp(ip, pip, true)) {
                    ClearChatbox(i, 100);
                    SendClientMessage(i, COLOR_YELLOW, "Vaza daqui, invejoso de merda...");
                    getdate(year, month, day);
                    gettime(hour, minute);
                    format(gstring, 128, "%s foi banido por ser Admin Rcon [%d/%d/%d - %d:%d]", PlayerName(i), day, month, year, hour, minute);
                    //fdplog(gstring);
                    SBan(i, "Admin Rcon", "PlayerName(i));
                    break;
                }
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)