27.12.2018, 21:13
I'm getting the SendClientMessage... That part is working. But the fwrite(openedfile, str); part won't work. I open the file and there is nothing written there.
PHP код:
if(dialogid == DIALOG_BUGREPORT)
{
if(response)
{
SendClientMessage(playerid, SCMCOLOR, "Thank you! Your bug report has been saved for our development team to see.");
new name[MAX_PLAYER_NAME], str[280];
GetPlayerName(playerid, name, sizeof(name));
new File:openedfile = fopen("feedback.txt", io_append);
format(str, sizeof(str), "Player Name: %s\n\n", name);
fwrite(openedfile, str);
return 1;
}
}