advanced question
#5

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
Reply


Messages In This Thread
advanced question - by WillyP - 28.10.2010, 23:46
Re: advanced question - by cessil - 29.10.2010, 02:50
Respuesta: advanced question - by admantis - 29.10.2010, 02:53
Re: advanced question - by ViruZZzZ_ChiLLL - 29.10.2010, 03:02
Respuesta: Re: advanced question - by admantis - 29.10.2010, 03:04

Forum Jump:


Users browsing this thread: 1 Guest(s)