Quote:
pawn Код:
format(string, sizeof(string), "/userfiles/%s.user", PlayerName[playerid]); fremove(string);
|
If I see it right, you haven't defined PlayerName[playerid] yet, so the script actually deletes "/userfiles/.user"
Quote:
pawn Код:
GetPlayerName(playerid, PlayerName[playerid], MAX_PLAYER_NAME); format(string, sizeof(string), "/userfiles/%s.user", PlayerName[playerid]); PlayerInfo[playerid][pPocket] = GetPlayerMoney(playerid); strmid(PlayerName[playerid], tmp, false, strlen(tmp), MAX_PLAYER_NAME); new File: hFile; hFile = fopen(string, io_append);
|
This is the place where you define PlayerName[playerid], this is after you deleted the old file and before you create the new file.