Server issue
#1

Hello everyone.

I have a problem with my server. 2 Days ago, i ordered a server on Volt Host. The script works perfect, but there is one problem. When i register my name with a password, and i relog, it keeps saying "Incorrect password". I also noticed that when i enter a wrong password for 5 times, i automaticly get banned. I tried to find the ban in almost every file i have in my server map, but i didnt find anything about the ban. I couldn't find anything about the ban in the script either. The ban doesn't really matthers... I just want the login system to work. Does anyone knows how to fix it? If you need anything, just tell me in the comment section.

Thanks!
Greetings, CrazyManiac.


Код:
forward OnPlayerRegister(playerid, password[]);
Код:
forward OnPlayerLogin(playerid,password[]);
Код:
//-------------------------------[Login]--------------------------------------------------------------------------
	if (strcmp(cmd, "/login", true) ==0 || strcmp(cmd, "/l", true) ==0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "SERVER: You are already logged in.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "USAGE: (/l)ogin [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			//Encrypt(tmppass);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}

	//-----------Register---------------
	if (strcmp(cmd, "/register", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "users/%s.ini", sendername);
			new File: hFile = fopen(string, io_read);
			if (hFile)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
				fclose(hFile);
				return 1;
			}
	        new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			//Encrypt(tmppass);
			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}


"test" Incorrect Password.
Reply
#2

If it is a problem in your script that is your problem
Or maybe contact volt host IF THE LOGIN SYSTEM WAS WORKING BEFORE HOSTING YOUR SERVER
Reply
#3

@Red_Dragon: When i run samp-server.exe (offline), it works fine. I never hosted this script on an other host.
Reply
#4

Change it from test to any other password, It might be default password that does not work I SAID MIGHT!!
Reply
#5

@Red_Dragon: Doesn't works.
Reply
#6

@samp boy please dont post stuff off topic it will get u banned!

Ontopic: Crazy try using .so plugins as far as i know Volt host has Linux Servers.
Reply
#7

Don't edit .ini files with Notepad. Use Notepad++, Notepad corrupts the files.

also, post the login callback
Reply
#8

Delete please, didn't read well
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)