29.10.2010, 03:02
First you must have this :
On top of your script.
To create :
To save :
To load :
pawn Код:
#define PlayerFile "/FolderName/%s.ini"
To create :
pawn Код:
if(!dini_Exists(file))
{
dini_Create(file);
}
pawn Код:
new file[126];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), PlayerFile, name);
dini_IntSet(file, "VarNameOrWhatever", PlayerInfo[playerid][pTimesQuitted]);
pawn Код:
new file[126];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), PlayerFile, name);
PlayerInfo[playerid][pTimesQuitted] = dini_Int(file, "VarNameOrWhatever");