Login System Help [DINI] -
DanyelKing - 06.03.2013
Hi, I'm italian, sorry for bad english.
I've created a login/register system in my Server, but there's a problem with login system.
Look the script:
Код:
new string[256];
new pName[24];
new pIP[16];
new pPing;
pPing = GetPlayerPing(playerid);
new File[256];
format(File,sizeof(File),PATH,pName);
if(dini_Exists(File))
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"GeS - Login",""COL_WHITE"Utente registrato. Scrivi la password per accedere.","Entra","Esci");
}
else
{
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"~g~Benvenuto ~w~nel ~r~server~w~, ~y~%s",pName);
GameTextForPlayer(playerid,string,5000,5);
format(string,sizeof(string),"{33FF00}%s {FFFFFF}si и connesso. {FF0000}ID: %d",pName,playerid);
SendClientMessageToAll(COLOR_WHITE,string);
GetPlayerIp(playerid,pIP,sizeof(pIP));
format(string,sizeof(string),"[NEW]%s si и connesso. ID: %d | IP: %s | PING: %d",pName,playerid,pIP,pPing);
print(string);
}
This is OnPlayerConnect. When I connect to Server and i'm registered, It does not show the login dialog. Why?
Re: Login System Help [DINI] -
YesYesYes - 06.03.2013
my reply will be kinda offtopic so don't mind if you don't like my reply..
I have never used dini, INI is much easier and you should use INI...
and about this problem
instead of
try using
I guess fexist might work
Re: Login System Help [DINI] -
DanyelKing - 06.03.2013
Uhm, Thanks for reply, but there's the same problem .. :/
Re: Login System Help [DINI] -
YesYesYes - 06.03.2013
a few more tips you might try-
try looking at the dialog ids, you might have mixed up some
try checking out the PATH define
If you are using any filterscript, remove OnDialogResponse callback from it
Re: Login System Help [DINI] -
Denying - 06.03.2013
I don't know what PATH is but I suggest you to use and format(file, sizeof(file), "%s.ini", GetPlayerName(playerid)); and so on.
Re: Login System Help [DINI] -
DanyelKing - 06.03.2013
#define PATH "/GeS/Users/%s.ini" ...
Re: Login System Help [DINI] -
DanyelKing - 06.03.2013
Heeeeeelp me. xD Up
Re: Login System Help [DINI] -
DanyelKing - 06.03.2013
Resolved, thanks at all

The problem was an order problem, with pName in format(File,sizeof(File,PATH,pName)); ... Close please:3
Re: Login System Help [DINI] -
Skyrise - 06.03.2013
I would put in a recommendation that you should refrain from using DINI. Try YINI if you don't want to use MySQL.
Re: Login System Help [DINI] -
Lordzy - 07.03.2013
Quote:
Originally Posted by DanyelKing
Hi, I'm italian, sorry for bad english.
I've created a login/register system in my Server, but there's a problem with login system.
Look the script:
Код:
new string[256];
new pName[24];
new pIP[16];
new pPing;
pPing = GetPlayerPing(playerid);
new File[256];
format(File,sizeof(File),PATH,pName);
if(dini_Exists(File))
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"GeS - Login",""COL_WHITE"Utente registrato. Scrivi la password per accedere.","Entra","Esci");
}
else
{
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"~g~Benvenuto ~w~nel ~r~server~w~, ~y~%s",pName);
GameTextForPlayer(playerid,string,5000,5);
format(string,sizeof(string),"{33FF00}%s {FFFFFF}si и connesso. {FF0000}ID: %d",pName,playerid);
SendClientMessageToAll(COLOR_WHITE,string);
GetPlayerIp(playerid,pIP,sizeof(pIP));
format(string,sizeof(string),"[NEW]%s si и connesso. ID: %d | IP: %s | PING: %d",pName,playerid,pIP,pPing);
print(string);
}
This is OnPlayerConnect. When I connect to Server and i'm registered, It does not show the login dialog. Why?
|
You haven't used 'GetPlayerName' function to get the name of the player. Just created a var named 'pName'. Maybe because of that, it couldn't detect any files.