If player is registered > load position
#1

I just edited my script so it saves the players position when disconnecting, When they connect i want them to spawn in the same place as they disconnected, Where/what else/ would i add too..

pawn Код:
SetPlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]);
I tried
pawn Код:
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]) == 0)
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                    TogglePlayerSpectating(playerid, 0);
                    SetPlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]);
                   
                }
                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");
SetPlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]);
                }
                return 1;
But it still makes them spawn at class 0's spawn location..


Question 2. How do i remove the 'spawn' Dialog when connecting, I want it so after they login they automatically spawn
Reply


Messages In This Thread
If player is registered > load position - by Lz - 03.12.2012, 15:44
Re: If player is registered > load position - by [HK]Ryder[AN] - 03.12.2012, 15:47
Re: If player is registered > load position - by iSaad - 03.12.2012, 15:59
Re: If player is registered > load position - by Lz - 03.12.2012, 16:06
Re: If player is registered > load position - by [HK]Ryder[AN] - 03.12.2012, 16:10
Re: If player is registered > load position - by Lz - 03.12.2012, 16:22
Re: If player is registered > load position - by Elysian` - 03.12.2012, 16:55
Re: If player is registered > load position - by Lz - 03.12.2012, 20:27

Forum Jump:


Users browsing this thread: 1 Guest(s)