Need help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help (
/showthread.php?tid=150657)
Need help -
ViruZZzZ_ChiLLL - 27.05.2010
Does anyone know how to save this?
Abletobuy[playerid] = 1;
So when the player connects, he doesn't need
to buy that certain thing again.
Re: Need help -
NewTorran - 27.05.2010
Use DINI to save it to a file:
pawn Код:
dini_IntSet(LOCATIONOFFILE, "AbleToBuy", AbleToBuy[playerid]);
Something like that
Re: Need help -
ViruZZzZ_ChiLLL - 27.05.2010
Okay, I'm still confused with this xD
Sorry, but I'm a noob at dini's
Re: Need help -
NewTorran - 27.05.2010
pawn Код:
new file[128];
format(file, 128, "/Accounts/%s.ini", GetName(playerid));
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file, "AbleToBuy", AbleToBuy[playerid]);
}
AbleToBuy[playerid] = dini_IntGet(file, "AbleToBuy");
stock GetName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
return name;
}
Try that