28.10.2014, 16:21
pawn Код:
// Dialog id..
if (response)
{
if (isnull(inputtext)) return 1;
// If the player did not enter anything, it will just stop here without calling what's next.
new str[38];
GetPlayerName(playerid, str, sizeof (str));
format(str, sizeof (str), "invites/%s.txt", str);
// Formatting the string to invites/playername.txt
new File:file = fopen(str, io_write);
// Opening the file which is at "invites/playername.txt"
format(str, sizeof (str), "%s", inputtext);
// Formatting the string to what the player entered.
fwrite(file, str);
// Writing inside the file the name OF THE PLAYER THAT INVITED THEM.
fclose(file);
// Closing the file.
}