Server issue - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server issue (
/showthread.php?tid=383746)
Server issue -
CrazyManiac - 08.10.2012
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.
Re: Server issue -
Red_Dragon. - 08.10.2012
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
Re: Server issue -
CrazyManiac - 08.10.2012
@Red_Dragon: When i run samp-server.exe (offline), it works fine. I never hosted this script on an other host.
Re: Server issue -
Red_Dragon. - 08.10.2012
Change it from test to any other password, It might be default password that does not work I SAID MIGHT!!
Re: Server issue -
CrazyManiac - 08.10.2012
@Red_Dragon: Doesn't works.
Re: Server issue -
XtremeR - 08.10.2012
@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.
Re: Server issue -
TheDeadlyDutchi - 08.10.2012
Don't edit .ini files with Notepad. Use Notepad++, Notepad corrupts the files.
also, post the login callback
Re: Server issue -
Dredd - 09.10.2012
Delete please, didn't read well