05.01.2012, 18:04
When we finish a trucking mission and get +1 score, it wont save. It's not there anymore when i relogg. Anyone got an idea how to fix? And money. The money doesn't get saved.
#include <dini>
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(File,sizeof(File),"/YourFolder/Players/%s.txt",name);
if(dini_Exists(File))
{
SetPlayerScore(playerid,dini_Int(File,"Score));
GivePlayerMoney(playerid,dini_Int(File,"Money"));
}
return 1;
}
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(File,sizeof(File),"/YourFolder/Players/%s.txt",name);
if(dini_Exists(File))
{
dini_IntSet(File,"Score",GetPlayerScore(playerid));
dini_IntSet(File,"Money",GetPlayerMoney(playerid));
}
return 1;
}