04.02.2011, 12:23
Try this:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),"Admin/Accounts/%s.txt",name);
new pScore, pMoney;
pScore = GetPlayerScore(playerid);
pMoney = GetPlayerMoney(playerid);
if(dini_Exists(file))
{
dini_IntSet(file,"LoggedIn",0);
dini_IntSet(file, "Score", pScore);
dini_IntSet(file, "Money", pMoney);
dini_IntSet(file, "VIP", pInfo[playerid][VIP]);
dini_IntSet(file, "Level", pInfo[playerid][Level]);
return 1;
}
return 1;
}