SA-MP Forums Archive
[HELP] Register/Login System wont load score - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: [HELP] Register/Login System wont load score (/showthread.php?tid=302155)



[HELP] Register/Login System wont load score - olabv - 07.12.2011

Hello, i have figured out how to save the score but when i load it it just goes to default wich is "0"
so please how can i fix this problem?

i will +rep for help

Pastebin link to the whole script: PASTEBIN


Re: [HELP] Register/Login System wont load score - olabv - 07.12.2011

Anyone? please..


Re: [HELP] Register/Login System wont load score - xMichaelx - 07.12.2011

Not completely sure but try
pawn Код:
new Score = Dini(data, score);
SetPlayerScore(playerid,score);
Also dini is very outdated update to y_ini or something bro.


Re: [HELP] Register/Login System wont load score - olabv - 07.12.2011

it dont work.


Re: [HELP] Register/Login System wont load score - tuuker - 07.12.2011

To save score
Код:
    {
        dini_IntSet(file, "Score", GetPlayerScore(playerid));
    }



Re: [HELP] Register/Login System wont load score - olabv - 07.12.2011

problem is that i cant load it -.-


Re: [HELP] Register/Login System wont load score - jaydon - 07.12.2011

i cannot veiw the pastebin because i am at school but this is what i have and may work for you

pawn Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
but ofcourse i have the user path and dialog IDs defined but you may be able to leech something from that