16.05.2012, 17:05
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.
^ is wrong. Why deaths? Your file has "score=0" in it so you want to get score, not deaths.
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:
Код:
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;
}
Код:
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;
}
EDIT: If you want the user to have another level than 0, change it in the Registering code:

