SpawnPlayer(playerid) bug? -
radiobizza - 14.01.2016
When I connect to my server it appears an dialog to register,then another one to login. And then when I type the password to login, it doesn't respawn me. Please help me
What can i do? Where I can edit ? Some suggestions?
Re: SpawnPlayer(playerid) bug? -
Eth - 14.01.2016
Show me the codes
Re: SpawnPlayer(playerid) bug? -
radiobizza - 14.01.2016
this is when you do not have an account and you are forced to register and login
PHP код:
format(nstring, sizeof(nstring), "Jucători/%s.ini", plname);
if(fexist(nstring))
{
gPlayerAccount[playerid] = 1;
GetPlayerIp(playerid, ipjucator, sizeof(ipjucator));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "{FFFFFF}Bine ai revenit pe Play Arena {7FFFD4}%s {FFFFFF}!\n{FFFFFF}IP: {7FFFD4}%s\n{FFFFFF}Acest nume este deja оnregistrat !\n{FFFFFF}Te rog scrie parola оn căsuta de mai jos pentru a putea intra оn joc:", sendername, ipjucator);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{FFFFFF}Conectare", string,"{FFFFFF}Conectare", "{FFFFFF}Quit"); //login
}
else
{
gPlayerAccount[playerid] = 0;
GetPlayerIp(playerid, ipjucator, sizeof(ipjucator));
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerHealth(playerid, 100);
format(string, sizeof(string), "{FFFFFF}Bine ai venit pe Play Arena {7FFFD4}%s {FFFFFF}!.\n{FFFFFF}IP: {7FFFD4}%s\n{FFFFFF}Pentru a te putea inregistra,scrie o parolă оn căsuta de mai jos pentru a putea continua:", sendername, ipjucator);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Оnregistrare", string, "{FFFFFF}Inregistrare","{FFFFFF}Quit");
}
this is public OnDialogResponse callback
PHP код:
if(dialogid == 2 || dialogid == 3)
{
if(response)
{
if(strlen(inputtext))
{
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
OnPlayerLogin(playerid,tmppass);
new playersip[24];
GetPlayerIp(playerid, playersip, sizeof(playersip));
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
SetPlayerPos(playerid, 1964.8954, -1305.2051 ,53.4559);
}
else
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Login", "{FFFFFF}Aceasta parola nu este corecta. Mai оncearcă o dată:","Login","Exit");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 3)
{
SendClientMessage(playerid, COLOR_WHITE , "{FA8072}ConsolaJucator: {FFFFFF}Ai luat kick pentru ca ai bagat parola de 3 ori gresita !" );
Kick(playerid);
}
}
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"{FA8072}ConsolaJucator: {FFFFFF} Ai primit kick pentru ca ai dat exit !");
Kick(playerid);
return 1;
}
}
if(dialogid == 1)
{
if(response)
{
if(strlen(inputtext))
{
format(string, sizeof(string), "Jucători/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if(hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Acest nume este luat,alege altul.");
fclose(hFile);
return 1;
}
if(strlen(inputtext) < 4 )
{
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{FFFFFF}Ne pare rău {006400}%s {FFFFFF}!\n{FFFFFF}Parola ta trebuie sa contina minim 4 caractere:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{FFFFFF}Register", regstring, "{FFFFFF}Register", "{FFFFFF}Exit");
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regname[64];
new regstring[128];
GetPlayerIp(playerid, ipjucator, sizeof(ipjucator));
GetPlayerName(playerid, regname, sizeof(regname));
format(regstring, sizeof(regstring), "{FFFFFF}Bine ai venit pe Play Arena {7FFFD4}%s {FFFFFF}!.\n{FFFFFF}IP: {7FFFD4}%s\n{FFFFFF}Pentru a te putea inregistra,scrie o parolă оn căsuta de mai jos pentru a putea continua:", regname, ipjucator);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Оnregistrare", regstring, "{FFFFFF}Inregistrare","{FFFFFF}Quit");
}
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"Ai primit kick pentru ca ai dat exit !");
Kick(playerid);
return 1;
}
}
Re: SpawnPlayer(playerid) bug? -
Golimad - 14.01.2016
"..dialog to register,then another one to login"
tell me the cases, you are not registered and it shows register dialog then login dialog or what?
and why you don't check if password is correct or not, and what does OnPlayerLogin(playerid,tmppass); do
Re: SpawnPlayer(playerid) bug? -
radiobizza - 14.01.2016
can you make an example to check if password is correct or not please ?
and yes. When you entered on the server and if you don't have an account,it appears an dialog to register that account and when you press enter,it appears another dialog to login to your account. And after that,I want to spawn the player
Re: SpawnPlayer(playerid) bug? -
radiobizza - 14.01.2016
bump
Re: SpawnPlayer(playerid) bug? -
Joron - 14.01.2016
Quote:
Originally Posted by radiobizza
bump
|
no hablo espaсol :[
Re: SpawnPlayer(playerid) bug? -
radiobizza - 14.01.2016
Quote:
Originally Posted by Joron
no hablo espaсol :[
|
please help me in that case
Re: SpawnPlayer(playerid) bug? -
jamesbond007 - 14.01.2016
I dont even see SpawnPlayer(playerid) in the code
Re: SpawnPlayer(playerid) bug? -
Eth - 14.01.2016
Quote:
Originally Posted by jamesbond007
I dont even see SpawnPlayer(playerid) in the code
|
Same thing that got into my head.
OFF TOPIC: WTF IS THIS PROFILE PICTURE