CMD:feedback(playerid, params[]) { if (isnull(params)) return SendClientMessage(playerid,-1,# /feedback <feedback> Thank You.);//This is if the player does not type any feedback and only does /feedback new _msg[ 128 ], _msg2[ 128 ], player_name[ MAX_PLAYER_NAME ]; GetPlayerName(playerid, player_name, MAX_PLAYER_NAME); SendClientMessage(playerid,red,"The feedback you have given has gone through to the main office!");//This is to tell the player that there feedback has gone through format( _msg, sizeof ( _msg ), "Name: %s\r\n", player_name); format( _msg2, sizeof( _msg2), "Feedback: %s\r\n",params); new File: fileToWrite = fopen("Feedback.txt", io_append);//Feedback.txt is were all the feedback will go from your players.(It could get spammed -_-) fwrite(fileToWrite,"[New Feedback]\r\n");//Everytime a player types a new suggestion it will type [New Feedback] Underneath the other feedback. fwrite(fileToWrite, _msg); fwrite(fileToWrite, _msg2); fclose(fileToWrite); return 1; } |
CMD:feedback(playerid, params[]) //You would change feedback to the command you would like it to so like CMD:reportbug { if (isnull(params)) return SendClientMessage(playerid,-1,# /feedback <feedback> Thank You.);//You would also change this from "# /feedback <feedback> Thank You." To "# /reportbug <bug/bug's> Thank You." new _msg[ 128 ], _msg2[ 128 ], player_name[ MAX_PLAYER_NAME ]; GetPlayerName(playerid, player_name, MAX_PLAYER_NAME); SendClientMessage(playerid,red,"The feedback you have given has gone through to the main office!");//You would change the clientmessage to something like "The Bug Has Been Reported.". format( _msg, sizeof ( _msg ), "Name: %s\r\n", player_name); format( _msg2, sizeof( _msg2), "Feedback: %s\r\n",params); //Change "Feedback" to "Bug" new File: fileToWrite = fopen("Feedback.txt", io_append);//Change this from "Feedback.txt" to "Bug Reports.txt" fwrite(fileToWrite,"[New Feedback]\r\n");//Change "[New Feedback]" to "[New Bug Report]" fwrite(fileToWrite, _msg); fwrite(fileToWrite, _msg2); fclose(fileToWrite); return 1; } |
And then some faggot decides to spam the command and you will have gigabytes of logs files. That, or your server just crashes.
|
And then some faggot decides to spam the command and you will have gigabytes of logs files. That, or your server just crashes.
|
And then some faggot decides to spam the command and you will have gigabytes of logs files. That, or your server just crashes.
|
Poorly made, doesn't explain much, newbies won't get it, use [ pawn ] tags, try to use / learn multidimensional arrays e.g new string[2][128];
|
And then some faggot decides to spam the command and you will have gigabytes of logs files. That, or your server just crashes.
|
Poorly made, doesn't explain much, newbies won't get it, use [ pawn ] tags, try to use / learn multidimensional arrays e.g new string[2][128];
|
All this, try to format the post neater too, will make it easier to read. Also the thread title is a little misleading.
|
Any way ... i dont care what other say i will say + support and keep it up
![]() |
I thought this was a very good tutorial, i've only been scripting for a few days and this has made making my server alot easier +1
|
The tutorial is pretty good, although I'd suggest you use [pawn] next time.
|