SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 15/10/2019, 04:35 PM   #1
Imaginare
Little Clucker
 
Imaginare's Avatar
 
Join Date: Jan 2015
Posts: 34
Reputation: 0
Question Instaban do servidor

E aí galera do FÓRUM, então... venho aqui através deste post pedir um help, estava fuçando em uns arquivos aqui do computador, encontrei algumas GMS perdidas e entre elas possuo uma de Dayz que me deu uma nostalgia e tenho ideias para fazer um projeto bacana nela, desde então eu vim atualizando os plugins e etc, obtive bastantes erros porém consegui resolver todos, porém toda vez que vou tentar logar no servidor eu estou banido ou sou instantaneamente banido, eu troco de nick e o mesmo problema se repete, já olhei o arquivo em dll ''Dayz_Users'' que se encontra na Script Files o mesmo não possui nada escrito, não tem registros, já naveguei por todos os arquivos da GM E não encontrei nada que relacionado a banco de dados.

Code:
[12:19:16] [connection] incoming connection: 192.168.0.100:54137 id: 0
[12:19:16] [join] ImaginarexAS has joined the server (0:192.168.0.100)

Imaginare is offline   Reply With Quote
Old 15/10/2019, 05:00 PM   #2
Felipealves
Huge Clucker
 
Felipealves's Avatar
 
Join Date: Mar 2016
Location: Paraná
Posts: 399
Reputation: 18
Default Re: Instaban do servidor

Veja o CheckBan, e também veja se existe algum ban nesse IP local.
__________________

CRIMINAL LIFE RPG
Felipealves is online now   Reply With Quote
Old 15/10/2019, 05:54 PM   #3
Imaginare
Little Clucker
 
Imaginare's Avatar
 
Join Date: Jan 2015
Posts: 34
Reputation: 0
Default Re: Instaban do servidor

Quote:
Originally Posted by Felipealves View Post
Veja o CheckBan, e também veja se existe algum ban nesse IP local.
Eu apaguei a linha
Code:
CheckBan(playerid);
do public OnPlayerConnect(playerid) , em seguida loguei no servidor e nada acontece e o samp server.exe simplesmente fecha.

Quote:
stock CheckBan(playerid)
{
new Query[500],playerIP[16],timeBanned[128],largestringtwo[210],adminName[24],bannedName[24],reasonBanned[128];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
format(Query, sizeof(Query), "SELECT * FROM `banlog` WHERE ( `Name` = '%s' OR `pIPBanned` = '%s' ) AND `pAccountLock` = '1' LIMIT 1",PlayerName(playerid),playerIP);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
while(mysql_fetch_row(Query))
{
mysql_fetch_field_row(reasonBanned, "pBannedReason");
mysql_fetch_field_row(adminName, "pBannedBy");
mysql_fetch_field_row(timeBanned, "pTime");
mysql_fetch_field_row(playerIP, "pIPBanned");
mysql_fetch_field_row(bannedName, "Name");
}
format(largestringtwo, sizeof(largestringtwo), "You are currently banned from this server. \r\nUser: %s \r\nIP: %s \r\nTime: %s \r\nAdmin: %s\r\nReason: %s", bannedName, playerIP, timeBanned, adminName, reasonBanned);
ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, "You are banned from this server", largestringtwo, "Leave", "");
new log[128];
format(log,sizeof(log),"~w~%s~r~ has been banned!",PlayerName(playerid));
UpdateAnnouncement(log);
KickEx(playerid);
printf("Username %s || IP %s is banned!",PlayerName(playerid),playerIP);
}
else
{
new versionsa[128];
GetPlayerVersion(playerid, versionsa, sizeof(versionsa));

if(!strcmp(versionsa,"0.3x",true))
{
ShowPlayerDialog(playerid,5235,DIALOG_STYLE_MSGBOX ,""COL_WHITE"Update SA-MP!",""COL_YELLOW"You need to have the latest SA-MP Version 0.3x R1-2\nDownload it off http://sa-mp.com/download.php","Leave","");
KickEx(playerid);
}
else
{
SetPlayerVirtualWorld(playerid,playerid);
PlayerTextDrawSetString(playerid,PlayerIntroNote[playerid],"Loading DayZ Gamemode Data");
defer SpawnPlayerEx(playerid);
}
}
return 1;
}
Imaginare is offline   Reply With Quote
Old 15/10/2019, 06:13 PM   #4
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 4,368
Reputation: 325
Default Re: Instaban do servidor

Veja se no console aparece algo quando você é banido.
ipsLuan is offline   Reply With Quote
Old 17/10/2019, 05:58 PM   #5
Imaginare
Little Clucker
 
Imaginare's Avatar
 
Join Date: Jan 2015
Posts: 34
Reputation: 0
Default Re: Instaban do servidor

Ainda não consegui resolver
Imaginare is offline   Reply With Quote
Old 17/10/2019, 06:47 PM   #6
Felipealves
Huge Clucker
 
Felipealves's Avatar
 
Join Date: Mar 2016
Location: Paraná
Posts: 399
Reputation: 18
Default Re: Instaban do servidor

Verifique no banco de dados se possui seu IP ou seu nick la, ou modifique a consulta mysql.
__________________

CRIMINAL LIFE RPG
Felipealves is online now   Reply With Quote
Old 17/10/2019, 08:29 PM   #7
Koplan
Huge Clucker
 
Koplan's Avatar
 
Join Date: Aug 2016
Location: 127.0.0.1
Posts: 225
Reputation: 53
Default Re: Instaban do servidor

Pelo que percebi é o seu IP que está banido e não o username.
Dê uma verificada no arquivo samp.ban.
__________________
[Tutorial] Medidas para evitar ataques DDoS

alojatuga.com - em construção
Koplan is online now   Reply With Quote
Old 18/10/2019, 01:04 AM   #8
Imaginare
Little Clucker
 
Imaginare's Avatar
 
Join Date: Jan 2015
Posts: 34
Reputation: 0
Default Re: Instaban do servidor

Quote:
Originally Posted by Felipealves View Post
Verifique no banco de dados se possui seu IP ou seu nick la, ou modifique a consulta mysql.
Esse é o incrível não tem nada no arquivo das contas ,_, e nem consigo me registrar

Imaginare is offline   Reply With Quote
Old 18/10/2019, 01:07 AM   #9
Imaginare
Little Clucker
 
Imaginare's Avatar
 
Join Date: Jan 2015
Posts: 34
Reputation: 0
Default Re: Instaban do servidor

Quote:
Originally Posted by Koplan View Post
Pelo que percebi é o seu IP que está banido e não o username.
Dê uma verificada no arquivo samp.ban.
Não tem aasuhasuhsauhsa, naveguei por todos os arquivos que não são muitos aparentemente não tem nada relacionada a ban, criei o samp.ban. e loguei mas nada acontece


Eu tentei mudar o IP com algum proxie(camufla-lo) mas o problema ainda persiste.

Este é o CheckBan
Code:
public OnPlayerConnect(playerid)
{
    if(!IsPlayerNPC(playerid))
	{
	    PlayersAlive++;
        CreatePlayerTD(playerid);
	    ConnectVars(playerid);
	    ClearChatPlayer(playerid);
	    ResetVars(playerid);
        CheckBan(playerid);
		SetPlayerTeam(playerid, 0);
	}
	return 1;
}
Restante do código...
Code:
stock CheckBan(playerid)
{
   	new Query[500],playerIP[16],timeBanned[128],largestringtwo[210],adminName[24],bannedName[24],reasonBanned[128];
    GetPlayerIp(playerid, playerIP, sizeof(playerIP));
    format(Query, sizeof(Query), "SELECT * FROM `banlog` WHERE ( `Name` = '%s' OR `pIPBanned` = '%s' ) AND `pAccountLock` = '1' LIMIT 1",PlayerName(playerid),playerIP);
    mysql_query(Query);
    mysql_store_result();
    if(mysql_num_rows() != 0)
	{
	    while(mysql_fetch_row(Query))
	    {
				mysql_fetch_field_row(reasonBanned, "pBannedReason");
				mysql_fetch_field_row(adminName, "pBannedBy");
				mysql_fetch_field_row(timeBanned, "pTime");
				mysql_fetch_field_row(playerIP, "pIPBanned");
				mysql_fetch_field_row(bannedName, "Name");
		}
		format(largestringtwo, sizeof(largestringtwo), "You are currently banned from this server. \r\nUser: %s \r\nIP: %s  \r\nTime: %s \r\nAdmin: %s\r\nReason: %s", bannedName, playerIP, timeBanned, adminName, reasonBanned);
		ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, "You are banned from this server", largestringtwo, "Leave", "");
 		new log[128];
    	format(log,sizeof(log),"~w~%s~r~ has been banned!",PlayerName(playerid));
    	UpdateAnnouncement(log);
		KickEx(playerid);
		printf("Username %s || IP %s is banned!",PlayerName(playerid),playerIP);
	}
	else
	{
		new versionsa[128];
    	GetPlayerVersion(playerid, versionsa, sizeof(versionsa));

		if(!strcmp(versionsa,"0.3x",true))
		{
		    ShowPlayerDialog(playerid,5235,DIALOG_STYLE_MSGBOX,""COL_WHITE"Update SA-MP!",""COL_YELLOW"You need to have the latest SA-MP Version 0.3x R1-2\nDownload it off http://sa-mp.com/download.php","Leave","");
		    KickEx(playerid);
		}
		else
		{
			SetPlayerVirtualWorld(playerid,playerid);
			PlayerTextDrawSetString(playerid,PlayerIntroNote[playerid],"Loading DayZ Gamemode Data");
			defer SpawnPlayerEx(playerid);
		}
	}
	return 1;
}

stock BanPlayer(playerid,reason[],admin[])
{
	new playerIP[16],Hour, Minute, Second, Year, Month, Day,timeBanned[200],bannedstring[256],Query[500];
	GetPlayerIp(playerid, playerIP, sizeof(playerIP));

	gettime(Hour, Minute, Second);
	getdate(Year, Month, Day);
	format(timeBanned, sizeof(timeBanned), "%02d:%02d:%02d on %02d/%02d/%d", Hour, Minute, Second, Day, Month, Year);
	//format(Query, sizeof(Query), "UPDATE `users` SET `pBannedReason` = '%s', `pBannedBy` = '%s', `pIPBanned` = '%s', `pTime` = '%s', `pAccountLock` = '1' WHERE `Username` = '%s'", reason,admin,playerIP,timeBanned,PlayerName(playerid));
    format(Query, sizeof(Query), "INSERT INTO `banlog` (`Name`, `pBannedReason`, `pBannedBy`, `pTime`, `pIPBanned`, `pAccountLock`) VALUES ('%s', '%s', '%s', '%s', '%s', 1)", PlayerName(playerid), reason, admin, timeBanned, playerIP);
	mysql_query(Query);
	mysql_free_result();
	format(bannedstring,sizeof(bannedstring),"You have been banned from this server! \r\nUser: %s \r\nIP: %s  \r\nTime: %s \r\nAdmin: %s\r\nReason: %s",PlayerName(playerid),playerIP,timeBanned,admin,reason);
	ShowPlayerDialog(playerid,DIALOG_BANNED,DIALOG_STYLE_MSGBOX,"You have been banned!",bannedstring,"Leave","");
 	new log[128];
    format(log,sizeof(log),"~w~%s~r~ has been banned!",PlayerName(playerid));
    UpdateAnnouncement(log);
	KickEx(playerid);
	return 1;
}
Imaginare is offline   Reply With Quote
Old 18/10/2019, 05:18 AM   #10
Felipealves
Huge Clucker
 
Felipealves's Avatar
 
Join Date: Mar 2016
Location: Paraná
Posts: 399
Reputation: 18
Default Re: Instaban do servidor

DB é 'banlog' e não users.

Faça como disse acima mude a consulta ou deixe a consulta em branco.
__________________

CRIMINAL LIFE RPG
Felipealves is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Pedido] Servidor RPG. iFaLLeN Português/Portuguese 6 03/07/2017 05:45 PM
[Ajuda] Player sai do servidor, servidor dá close. MorreJaa Português/Portuguese 7 14/12/2014 02:22 AM
[Projeto] Servidor RPG Higoroliveira Português/Portuguese 3 07/12/2014 07:34 PM
[Projeto] Servidor mpro Português/Portuguese 4 21/03/2013 12:05 AM
[Ajuda] Servidor On ! Carlos_barbosa Português/Portuguese 11 02/02/2013 09:50 AM


All times are GMT. The time now is 05:51 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.