SpawnPlayer(playerid) bug?
#1

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?
Reply
#2

Show me the codes
Reply
#3

this is when you do not have an account and you are forced to register and login
PHP код:
    format(nstringsizeof(nstring), "Jucători/%s.ini"plname);
    if(
fexist(nstring))
    {
        
gPlayerAccount[playerid] = 1;
        
GetPlayerIp(playeridipjucatorsizeof(ipjucator));
        
GetPlayerName(playeridsendernamesizeof(sendername));
        
format(stringsizeof(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:"sendernameipjucator);
        
ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{FFFFFF}Conectare"string,"{FFFFFF}Conectare""{FFFFFF}Quit"); //login
    
}
    else
    {
        
gPlayerAccount[playerid] = 0;
        
GetPlayerIp(playeridipjucatorsizeof(ipjucator));
        
GetPlayerName(playeridsendernamesizeof(sendername));
        
SetPlayerHealth(playerid100);
        
format(stringsizeof(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:"sendernameipjucator);
        
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Оnregistrare"string"{FFFFFF}Inregistrare","{FFFFFF}Quit");
    } 
this is public OnDialogResponse callback
PHP код:
        if(dialogid == || dialogid == 3)
        {
            if(
response)
            {
                if(
strlen(inputtext))
                {
                    new 
tmppass[64];
                    
strmid(tmppassinputtext0strlen(inputtext), 255);
                    
OnPlayerLogin(playerid,tmppass);
                    new 
playersip[24];
                    
GetPlayerIp(playeridplayersipsizeof(playersip));
                    new 
playername2[MAX_PLAYER_NAME];
                    
GetPlayerName(playeridplayername2sizeof(playername2));
                    
SetPlayerPos(playerid1964.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(playeridCOLOR_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(stringsizeof(string), "Jucători/%s.ini"sendername);
                    new 
FilehFile fopen(stringio_read);
                    if(
hFile)
                    {
                        
SendClientMessage(playeridCOLOR_YELLOW"Acest nume este luat,alege altul.");
                        
fclose(hFile);
                        return 
1;
                    }
                    if(
strlen(inputtext) < )
                    {
                        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(tmppassinputtext0strlen(inputtext), 255);
                    
OnPlayerRegister(playerid,tmppass);
                }
                else
                {
                    new 
regname[64];
                    new 
regstring[128];
                    
GetPlayerIp(playeridipjucatorsizeof(ipjucator));
                    
GetPlayerName(playeridregnamesizeof(regname));
                    
format(regstringsizeof(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:"regnameipjucator);
                    
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;
            }
        } 
Reply
#4

"..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
Reply
#5

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
Reply
#6

bump
Reply
#7

Quote:
Originally Posted by radiobizza
Посмотреть сообщение
bump
no hablo espaсol :[
Reply
#8

Quote:
Originally Posted by Joron
Посмотреть сообщение
no hablo espaсol :[
please help me in that case
Reply
#9

I dont even see SpawnPlayer(playerid) in the code
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)