Well in the OnPlayerUpdateAccount callback:
There is this..
pawn Код:
public OnPlayerUpdateAccount(playerid)
{
if(IsPlayerConnected(playerid))
{
if(AccountInfo[playerid][Logged] == 1)
{
new name[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, name, sizeof name);
format(str, sizeof str, "/sAccounts/%s.seifadmin", name);
new File:account = fopen(str, io_write);
if (account)
{
AccountInfo[playerid][Cash] = GetPlayerMoney(playerid);
new file[256];
{
format(file, sizeof file, "Password: %s\n", AccountInfo[playerid][Password]);
{ fwrite(account, file); }
format(file, sizeof file, "AdminLevel: %d\n",AccountInfo[playerid][AdminLevel]);
{ fwrite(account, file); }
format(file, sizeof file, "Cash: %d\n", AccountInfo[playerid][Cash]);
{ fwrite(account, file); }
format(file, sizeof file, "Warnings: %d\n",AccountInfo[playerid][Warns]);
{ fwrite(account, file); }
format(file, sizeof file, "WarnReason1: %s\n",AccountInfo[playerid][WarnReason1]);
{ fwrite(account, file); }
format(file, sizeof file, "WarnReason2: %s\n",AccountInfo[playerid][WarnReason2]);
{ fwrite(account, file); }
format(file, sizeof file, "WarnReason3: %s\n",AccountInfo[playerid][WarnReason3]);
{ fwrite(account, file); }
format(file, sizeof file, "IPAddress: %s\n",AccountInfo[playerid][IP]);
{ fwrite(account, file); }
}
fclose(account);
}
}
}
return 1;
}
So i should do this?
pawn Код:
public OnPlayerUpdateAccount(playerid)
{
if(IsPlayerConnected(playerid))
{
if(AccountInfo[playerid][Logged] == 1)
{
new name[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, name, sizeof name);
format(str, sizeof str, "/sAccounts/%s.seifadmin", name);
new File:account = fopen(str, io_write);
if (account)
{
AccountInfo[playerid][Cash] = GetPlayerMoney(playerid);
new file[256];
{
format(file, sizeof file, "Password: %s\n", AccountInfo[playerid][Password]);
{ fwrite(account, file); }
format(file, sizeof file, "AdminLevel: %d\n",AccountInfo[playerid][AdminLevel]);
{ fwrite(account, file); }
format(file, sizeof file, "Tut: %d\n",AccountInfo[playerid][Tut]);
{ fwrite(account, file); }
format(file, sizeof file, "Cash: %d\n", AccountInfo[playerid][Cash]);
{ fwrite(account, file); }
format(file, sizeof file, "Warnings: %d\n",AccountInfo[playerid][Warns]);
{ fwrite(account, file); }
format(file, sizeof file, "WarnReason1: %s\n",AccountInfo[playerid][WarnReason1]);
{ fwrite(account, file); }
format(file, sizeof file, "WarnReason2: %s\n",AccountInfo[playerid][WarnReason2]);
{ fwrite(account, file); }
format(file, sizeof file, "WarnReason3: %s\n",AccountInfo[playerid][WarnReason3]);
{ fwrite(account, file); }
format(file, sizeof file, "IPAddress: %s\n",AccountInfo[playerid][IP]);
{ fwrite(account, file); }
}
fclose(account);
}
}
}
return 1;
}