Itt egy példa: (Nem én írtam)
[pawn]#include <a_samp>
#include <dini>
#include <dudb>
public OnPlayerConnect(playerid)
{
//Score Saver
new string[128], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), \"Scores/%s.ini\", PlayerName);
if(fexist(string))
{
SetPlayerScore(playerid, dini_Int(string, \"Score\"));
}
else
{
dini_Create(string);
dini_IntSet(string, \"Score\", 0);
}
}
public OnPlayerDisconnect(playerid, reason)
{
new string[128], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), \"Scores/%s.ini\", PlayerName);
if(fexist(string))
{
dini_IntSet(string, \"Score\", GetPlayerScore(playerid));
}
else
{
dini_Create(string);
dini_IntSet(string, \"Score\", GetPlayerScore(playerid));
}
}[/pawn]