Need help [me again]
#6

You have to LOAD the score before you can set it. In your script you write Score "0" on registering, but then you try to load "DEATHS" in the login part.

Код:
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("pScores",PlayerInfo[playerid][pDeaths]);
    return 1;
}
^ is wrong. Why deaths? Your file has "score=0" in it so you want to get score, not deaths.

Код:
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("pScores",PlayerInfo[playerid][pScores]);
    return 1;
}
And then OnPlayerSpawn or so, you SetPlayerScore(playerid, PlayerInfo[playerid][pScores]); so it appears in the TAB list. Do it AFTER your LoadUser comes.



EDIT: If you want the user to have another level than 0, change it in the Registering code:
Reply


Messages In This Thread
Need help [me again] - by Edii - 16.05.2012, 16:51
AW: Need help [me again] - by EthanR - 16.05.2012, 16:53
Re: Need help [me again] - by Ballu Miaa - 16.05.2012, 16:57
AW: Need help [me again] - by EthanR - 16.05.2012, 16:59
Re: Need help [me again] - by Edii - 16.05.2012, 17:00
AW: Need help [me again] - by EthanR - 16.05.2012, 17:05
Re: Need help [me again] - by Ballu Miaa - 16.05.2012, 17:07
Re: Need help [me again] - by Edii - 16.05.2012, 17:24
AW: Need help [me again] - by EthanR - 16.05.2012, 17:26
Re: Need help [me again] - by Edii - 16.05.2012, 17:31
Re: Need help [me again] - by iRage - 16.05.2012, 17:33
AW: Need help [me again] - by EthanR - 16.05.2012, 17:35
Re: Need help [me again] - by Edii - 16.05.2012, 17:41

Forum Jump:


Users browsing this thread: 1 Guest(s)