[Tutorial] How to make a /suggest cmd !
#1

/Suggest CMD Tutorial!

Hi Guys today i will be showing how to make a /suggest (suggestion) cmd with saving the suggest in scriptfiles as suggestions.txt
So lets start
Add this in Top of the script/GM/FS (includes and the color we will be using ! )
pawn Код:
#define COLOR_YELLOW 0xFFFF00AA
#include <zcmd>
Seconde add the /suggest CMD + saving teh suggestion.. :
pawn Код:
CMD:suggest(playerid, params[])
{
    if ( isnull ( params ) ) return SendClientMessage( playerid, -1, #Syntax /suggest <suggestion> );

    new
        _msg[ 128 ],
        player_name[ MAX_PLAYER_NAME ];

    GetPlayerName( playerid, player_name, MAX_PLAYER_NAME );

    format( _msg, sizeof ( _msg ), "%s suggested: %s\r\n", player_name, params );

    new File: fileToWrite = fopen("suggestions.txt", io_append);
    fwrite(fileToWrite, _msg);
    fclose(fileToWrite);
    SendClientMessage(playerid, COLOR_YELLOW, "Thanks For Your Suggestion!!" );
    return 1;
}
You Are DONE!!
Last Thing ; add a .txt file in "scriptfiles" folder name it "suggestions" without " " and leave it empty!
/Suggest (suggestion) to suggest something then u will find the suggestion in that .txt file u created Enjoy! if i helped u please +rep me i will be thankfull!
Reply


Messages In This Thread
How to make a /suggest cmd ! - by Mzake - 09.08.2014, 18:51
Re: How to make a /suggest cmd ! - by DanGk3nNn - 09.08.2014, 18:54
Re: How to make a /suggest cmd ! - by Mzake - 09.08.2014, 18:56
Re: How to make a /suggest cmd ! - by Champ - 09.08.2014, 18:59
Re: How to make a /suggest cmd ! - by Jimmy0wns - 09.08.2014, 19:02
Re: How to make a /suggest cmd ! - by Mzake - 09.08.2014, 19:02
Re: How to make a /suggest cmd ! - by HyDrAtIc - 09.08.2014, 19:05
Re: How to make a /suggest cmd ! - by Mzake - 09.08.2014, 19:10
Re: How to make a /suggest cmd ! - by Stinged - 09.08.2014, 20:12

Forum Jump:


Users browsing this thread: 1 Guest(s)