08.10.2012, 17:25
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.
"test" Incorrect Password.
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.