Need help
#1

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.
Reply
#2

Use DINI to save it to a file:

pawn Код:
dini_IntSet(LOCATIONOFFILE, "AbleToBuy", AbleToBuy[playerid]);
Something like that
Reply
#3

Okay, I'm still confused with this xD
Sorry, but I'm a noob at dini's
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)