Quote:
Originally Posted by ViruZZzZ_ChiLLL
First you must have this :
pawn Код:
#define PlayerFile "/FolderName/%s.ini"
On top of your script.
To create :
pawn Код:
if(!dini_Exists(file)) { dini_Create(file); }
To save :
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]);
To load :
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");
|
He asked only for the times quited thing not the whole account system xD but nice script i forgot the load thing as well