Hy, i have a problem with my login,register system, on windows server its work, but on linux the player can login in, you just tipe the password and nothing happens ! any iddea ? thx
Код:
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
{
if (gPlayerAccount[playerid] != 0)
{
new loginstring[180];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{ffffff}Bun venit inapoi, "COL_GREEN"%s{FFFFFF}{ffffff}!\nIntroduceti parola dumneavoastra pentru va putea loga!\nUltima data logat: {F3FF02}%s {FFFFFF}",loginname, dini_Get(LFile(playerid),"LoginDate"));
ShowPlayerDialog(playerid,dialog_login,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Quit");
}
else
{
gPlayerAccount[playerid] = 0;
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{FFFFFF}Bun venit {FF0000}%s{FFFFFF},\nAcest cont nu a fost detectat in baza de date.\nVa rugam sa scrieti parola:",regname);
ShowPlayerDialog(playerid,dialog_register,DIALOG_STYLE_PASSWORD,"Register",regstring,"Register","Quit");
}
Код:
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FFFFFF}Bun venit inapoi!, {00FF40}%s{FFFFFF},\nAcest cont este inregistrat.\nScrieti. {F3FF02}parola:",loginname);
ShowPlayerDialog(playerid,dialog_login,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Quit");
Код:
if(dialogid == dialog_login)
{
if(response)
{
if(strlen(inputtext))
{
new password[64];
strmid(password, inputtext, 0, strlen(inputtext), 255);
Encrypt(password);
OnPlayerLogin(playerid,password);
}
else
{
new loginstring[128];
new loginname[64];
//SendClientMessage(playerid, COLOR_YELLOW, "The staff welcome your account active. Keep up the good work!");
//SendClientMessage(playerid, COLOR_YELLOW, "Please login by entering your password in the box below, it is very easy.");
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FFFFFF}Aceasta parola nu este {F81414}parola correcta.{FFFFFF}\nVa rugam sa introduceti {F81414}parola corecta{FFFFFF} de la accest cont:",loginname);
ShowPlayerDialog(playerid,dialog_login,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Quit");
}
}
}
if(dialogid == dialog_register)
{
if(response)
{
if(strlen(inputtext))
{
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, "Acest nume este deja luat!Va rugam sa alegeti altu.");
fclose(hFile);
return 1;
}
new password[64];
strmid(password, inputtext, 0, strlen(inputtext), 255);
Encrypt(password);
OnPlayerRegister(playerid,password);
}
else
{
new regstring[128];
new regname[64];
//SendClientMessage(playerid, COLOR_YELLOW, "If you want join us, you have to respect the rules and behave well.");
//SendClientMessage(playerid, COLOR_YELLOW, "Please enter your password in the box below and follow the steps for creating your account.");
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{FFFFFF}Bun venit {FF0000}%s{FFFFFF},\nAcest cont nu a fost detectat in baza de date.\nVa rugam sa scrieti. {F3FF02}parola de la{FFFFFF} noul cont:",regname);
ShowPlayerDialog(playerid,dialog_register,DIALOG_STYLE_PASSWORD,"Register",regstring,"Register","Quit");
}
}
}
// Register
if(dialogid == dialog_register2)
{
if(response)
{
if(listitem == 0)
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ok, deci esti baiat.");
ShowPlayerDialog(playerid,dialog_register3,DIALOG_STYLE_LIST,"Alege unde vrei sa fi spawnat","Los Santos \nSan Fierro","Select","");
}
else if(listitem == 1)
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ok, deci esti fata.");
ShowPlayerDialog(playerid,dialog_register3,DIALOG_STYLE_LIST,"Alege unde vrei sa fi spawnat","Los Santos \nSan Fierro","Select","");
}
}
}
if(dialogid == dialog_register3)
{
if(response)
{
if(listitem == 0)
{
PlayerInfo[playerid][pOrigin] = 1;//LS
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ok, deci vei fi spawnat in Los Santos.");
//SpawnPlayer(playerid);
ShowPlayerDialog(playerid,dialog_register4,DIALOG_STYLE_INPUT,"Varsta","Cati ani ai?","OK","");
}
else if(listitem == 1)
{
PlayerInfo[playerid][pOrigin] = 2;//SF
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ok, deci vei fi spawnat in San Fierro");
//SpawnPlayer(playerid);
ShowPlayerDialog(playerid,dialog_register4,DIALOG_STYLE_INPUT,"Varsta","Cati ani ai?","OK","");
}
}
}
if(dialogid == dialog_register4)
{
if(response)
{
new varsta = strval(inputtext);
if(varsta >5 && varsta<90)
{
format(string,256,"Ok, deci ai %d ani.",varsta);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
PlayerInfo[playerid][pAge] = varsta;
RegistrationStep[playerid] = 0;
TutTime[playerid] = 1;
}
else return ShowPlayerDialog(playerid,dialog_register4,DIALOG_STYLE_INPUT,"Varsta","Scrie ce varsta ai!","OK","");
}
}