Cant login or server stops when connecting to a registered account
#6

PHP код:
public OnPlayerConnect(playerid)
{
    
ClanInvited[playerid] = 999;
    
ClanInvitedBy[playerid] = 999;
    new 
string[128];
    
gIncorrectPW[playerid] = 0;
    
gLogged[playerid] = 0;
    
format(stringsizeof(string), "%s (%d) has connected to the server. [%d/%d]"GetPlayerNameEx(playerid), playeridIter_Count(Player), MAX_PLAYERS);
    
SendClientMessageToAll(COLOR_DONORstring);
    
SetPlayerCameraPos(playerid1058.5938721020.99786357.898475);
    
SetPlayerCameraLookAt(playerid1055.3587641017.35485856.774765);
    
XPtxtdraw[playerid] = CreatePlayerTextDraw(playerid504.00000080.640007"$0000000");
    
PlayerTextDrawLetterSize(playeridXPtxtdraw[playerid], 0.6452001.988266);
    
PlayerTextDrawAlignment(playeridXPtxtdraw[playerid], 1);
    
PlayerTextDrawColor(playeridXPtxtdraw[playerid], -5963521);
    
PlayerTextDrawSetShadow(playeridXPtxtdraw[playerid], 0);
    
PlayerTextDrawSetOutline(playeridXPtxtdraw[playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridXPtxtdraw[playerid], 255);
    
PlayerTextDrawFont(playeridXPtxtdraw[playerid], 3);
    
PlayerTextDrawSetProportional(playeridXPtxtdraw[playerid], 1);
  
       if(
fexist(UserPath(playerid)))
    {
        
//INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
                
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
        
format(stringsizeof(string), "Welcome back %s, please input your password below to login."GetPlayerNameEx(playerid));
          
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"Login!",string,"Login","Quit");
    }
    else
    {
        
format(stringsizeof(string), "Welcome %s to our server, please input your password below to register."GetPlayerNameEx(playerid));
         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,"Register!",string,"Register","Quit");
    }
    
TextDrawShowForPlayer(playeridIntro[0]);
    
TextDrawShowForPlayer(playeridIntro[1]);
    
mk[playerid] = 0;
    
ck[playerid] = 0;
    
pk[playerid] = 0;
    return 
1;

Try this.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)