TogglePlayerSpectating Causes server disconnecting the user.
#2

Quote:
Originally Posted by Cole_William
Посмотреть сообщение
So here's my issue, i have
Код:
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                new HashPass[129];
                WP_Hash(HashPass, sizeof(HashPass), inputtext);
                if(strcmp(HashPass, PlayerInfo[playerid][pPass], true) == 0)
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    TogglePlayerSpectating(playerid, 0);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                    SetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
    }
    return 1;
}
Try adding what's in green. Also, your login dialog doesn't actually spawn the player.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)