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);
}
if(dini_Exists(File))
if(fexist(File))
The problem was an order problem, with pName in format(File,sizeof(File,PATH,pName)); ... Close please:3
|
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);
}
|