Posts: 172
Threads: 47
Joined: Apr 2014
Hello there!!!
I just wanted to ask an HELP here, how do i build the /bugreport cmd? When you /bugreport <Description> your description will save on .txt file thanks in advance!
Posts: 172
Threads: 47
Joined: Apr 2014
Quote:
Originally Posted by Konstantinos
@Above: Check the file handle otherwise you're going to have problems with server crashes and it's recommended NOT to use strcmp..
pawn Код:
CMD:bugreport(playerid, params[]) { if (isnull(params)) return SendClientMessage(playerid, -1, "Usage: /bugreport <Description>"); new File: log = fopen("reports.txt", io_append); if (!log) return SendClientMessage(playerid, -1, "Something went wrong. Please try reporting it later"); fwrite(log, params); fwrite(log, "\r\n"); fclose(log); return 1; }
|
thanks bro +Rep to all