Doesn't read if registered - 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: Doesn't read if registered (
/showthread.php?tid=104984)
Doesn't read if registered -
0ne - 27.10.2009
Alrighty,
Code:
new string[128];
new Data2[256];
format(Data2, 255, "fAccounts/Teams/%s.ini", pName(playerid));
if(fexist(string) == 1)
{
new s[128];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"Sveikas sugryzes, %s!\n\nPrisijunk.!",loginname);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Prisijungimas",s,"Prisijungti","Atsaukti");
}
else if(!fexist(string))
{
new s[128];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"Sveikas %s!\n\nPrisiregistruok.!",loginname);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registarcija",s,"Registruotis","Atsaukti");
}
if(fexist(string) = 1) is the login, if he is already registered it should show the Login dialog but it always shows Register dialog , can anyone help me?
Re: Doesn't read if registered -
Correlli - 27.10.2009
You're checking the empty string -
string, you should check for
Data2 formatted string, and you don't need 256 cells.
Re: Doesn't read if registered -
jamesb93 - 27.10.2009
I have a similar problem but it dosent recognise the password when someone enters. Ideas?