Tessék, megírtam neked.
[pawn]#include <dini>
public OnPlayerConnect(playerid)
{
new file[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),\"%s.ini\",name);
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file,\"pScore\", 0);
}
if(fexist(file))
{
SetPlayerScore(playerid, dini_Int(file,\"pScore\"));
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new file[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),\"%s.ini\",name);
if(fexist(file))
{
dini_IntSet(file,\"pScore\", GetPlayerScore(playerid));
}
return 1;
}[/pawn]
(dini letöltése)