14.06.2010, 16:17
Player Stats won't save..
So this is how its defined in my script:
That's on login dialog response:
This is the public(Timer) CheckStats:
So this is how its defined in my script:
That's on login dialog response:
Quote:
SetPVarInt(playerid, "Logged", 1); SetTimer("CheckStats",500,1); //for(new i; i < GetMaxPlayers(); i++){ CheckStats(i);} SetPlayerScore(playerid, dini_Int(file, "score")); SetPlayerMoney(playerid, dini_Int(file, "money")); PlayerInfo[playerid][AdminLevel]=dini_Int(file,"AdminLevel"); PlayerInfo[playerid][Bombs]=dini_Int(file,"Bombs"); PlayerInfo[playerid][PainKillers]=dini_Int(file,"PainKillers"); PlayerInfo[playerid][Level]=dini_Int(file,"Level"); PlayerInfo[playerid][Kills]=dini_Int(file,"Kills"); PlayerInfo[playerid][Deaths]=dini_Int(file,"Deaths"); PlayerInfo[playerid][RemoteBombs]=dini_Int(file,"RemoteBombs"); |
Quote:
public CheckStats(playerid) { dini_IntSet(file, "money", GetPlayerMoney(playerid)); dini_IntSet(file, "AdminLevel", (PlayerInfo[playerid][AdminLevel])); dini_IntSet(file, "score", GetPlayerScore(playerid)); dini_IntSet(file, "Bombs", (PlayerInfo[playerid][Bombs])); dini_IntSet(file, "PainKillers", (PlayerInfo[playerid][PainKillers])); dini_IntSet(file, "Kills", (PlayerInfo[playerid][Kills])); dini_IntSet(file, "Deaths", (PlayerInfo[playerid][Deaths])); dini_IntSet(file, "Level", (PlayerInfo[playerid][Level])); dini_IntSet(file, "RemoteBombs", (PlayerInfo[playerid][RemoteBombs])); return 1; } |