>>> [HELP] Problem with logging in! <<< - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: >>> [HELP] Problem with logging in! <<< (
/showthread.php?tid=128038)
>>> [HELP] Problem with logging in! <<< -
ДitisOnHuora - 16.02.2010
When i connect to server, it says you dont have an account, please register (Even if i have!). Then i fill "new account" password in it, and press enter, then it says that that account allready exists, please get another name. LOL.
As i know, it doesnt make ''gPlayerAccount[playerid] = 1;'' to really 1, it does 0 no matter what...
pawn Код:
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "accounts/%s.ini", plname);
if(fexist(string))
{
new loginstring[128];
new loginname[64];
gPlayerAccount[playerid] = 1;
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Welcome, %s\nThat nick is registered.\nYou can now login:",loginname);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
return 1;
}
else
{
new regstring[128];
new regname[64];
gPlayerAccount[playerid] = 0;
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
return 1;
}
Any ideas why it jumps over like that?