19.05.2015, 19:01
In case frename returns 0, it will not create a new file, write from the old file to new and delete the old.
You can return an error if that happens:
You can return an error if that happens:
pawn Код:
format(name1, sizeof(name1), PLAYERS, PlayerName(playerid));
format(name2, sizeof(name2), PLAYERS, inputtext);
if (!frename(name1, name2)) return SendClientMessage(playerid, -1, "Could not be changed. Please try again later.");
SetPlayerName(playerid,inputtext);