Create score in userfile fail
#10

Quote:
Originally Posted by SmiT
Посмотреть сообщение
Do you used
pawn Код:
SetPlayerScore( playerid, PlayerInfo[ playerid ][ pScore ] );
when the user login?
i use this to login
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Leader",Leader[playerid]);
    INI_Int("Member",Member[playerid]);
    INI_Int("Score",Score[playerid]);
    INI_Int("Jail",Jail[playerid]);
    return 1;
}

        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]);
                    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;
}
so it loads the info from "LoadUser_data" where the score should be loaded from
Reply


Messages In This Thread
Create score in userfile fail - by cruising - 21.10.2011, 19:33
Re: Create score in userfile fail - by SmiT - 21.10.2011, 19:38
Re: Create score in userfile fail - by [MWR]Blood - 21.10.2011, 19:40
Re: Create score in userfile fail - by cruising - 21.10.2011, 19:47
Re: Create score in userfile fail - by [MWR]Blood - 21.10.2011, 19:51
Re: Create score in userfile fail - by cruising - 21.10.2011, 19:52
Re: Create score in userfile fail - by cruising - 21.10.2011, 19:54
Re: Create score in userfile fail - by SmiT - 21.10.2011, 19:59
Re: Create score in userfile fail - by [MWR]Blood - 21.10.2011, 20:03
Re: Create score in userfile fail - by cruising - 21.10.2011, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)