I suggest you look into pen1 script how to save text int oa file, just use io_append with a \n before text
Код:
dcmd_report(playerid, params[])
{
new player, reason[30];
if(sscanf(params, "us", player, reason))
{
SendClientMessage(playerid, RED, "Type: /report [player ID or part of name [reason].");
return 1;
}
if(player == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, RED, "Player not found.");
return 1;
}
new string[142], name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, name1, MAX_PLAYER_NAME);
GetPlayerName(player, name2, MAX_PLAYER_NAME);
format(string, 142, "Player %s (ID: %i) reports %s (ID: %i) . REASON: %s.", name1, playerid, name2, player, reason);
new bool:AdminOnline = false;
for(new player2; player2 < GetMaxPlayers(); player2++)
{
if(IsPlayerAdmin(player2))
{
SendClientMessage(player2, RED, string);
AdminOnline = true;
}
}
if(AdminOnline == false)
{
SendClientMessage(playerid, RED, "Niestety, aktualnie nie ma adminуw. Pisz na GG: 123456.");
}
else
{
SendClientMessage(playerid, YELLOW, "Zgłosiłeś raport.");
}
return 1;
}