How to save score?
#3

I fixed it, had to add to set his score when login

Код:
case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
					ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""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;
Reply


Messages In This Thread
How to save score? - by AndreiWow - 04.09.2015, 10:48
Re: How to save score? - by Stev - 04.09.2015, 10:53
Re: How to save score? - by AndreiWow - 04.09.2015, 11:00
Re: How to save score? - by Stev - 04.09.2015, 11:08

Forum Jump:


Users browsing this thread: 1 Guest(s)