16.12.2010, 16:45
Hi all,i've a problem...deaths dont save.Here is what variables server save when someone /register.
And login:
And this is OnPlayerDisconnect added values:
And i've added:
On the top of the gm.
Код:
dini_Create(file); dini_IntSet(file,"Password", udb_hash(tmp)); dini_IntSet(file,"AdminLevel", 0); dini_IntSet(file,"Cash", 0); dini_IntSet(file,"Score", 0); dini_IntSet(file,"Deaths", deaths[playerid]);
Код:
new playername[MAX_PLAYER_NAME]; SetPlayerMoney(playerid, dini_Int(file, "Cash")); SetPlayerScore(playerid, dini_Int(file, "Score")); deaths[playerid] = dini_Int(udb_encode(playername), "deaths"); PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
Код:
new file[256]; new playername[24]; new name[MAX_PLAYERS]; GetPlayerName(playerid, name, sizeof(name)); format(file,sizeof(file),"%s.ini",name); dini_IntSet(file,"AdminLevel",PlayerInfo[playerid][AdminLevel]); dini_IntSet(file,"Cash",GetPlayerMoney(playerid)); dini_IntSet(file,"Score",GetPlayerScore(playerid)); deaths[playerid] = dini_Int(udb_encode(playername), "deaths");
Код:
new deaths[MAX_PLAYERS];