[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
#2

Nice one. keep it up.
Reply
#3

Quote:
Originally Posted by DanGk3nNn
Посмотреть сообщение
Nice one. keep it up.
Thanks bro really apreciated
Reply
#4

umm sorry, but is this tutorial ?
You didn't explained any function :/
Reply
#5

Lets break this down:
- You didn't explain anything in this tutorial.
- You asked for REP, which is not the right way to earn it.
- You didn't think of the command being abused. (e.g: spamming the command with nonsense shit)
Reply
#6

Quote:
Originally Posted by Champ
Посмотреть сообщение
umm sorry, but is this tutorial ?
You didn't explained any function :/
first time making tutorial , sorry brotha next tutorial i will try to do it
Reply
#7

Listen, 2 ways so you can advance, first way, EXPLAIN the tutorial and remove GIVE ME REPZ, second way, ask a beta tester to delete the topic.

I believe I ain't harsh with this one, good luck next time.
Reply
#8

Quote:
Originally Posted by Jimmy0wns
Посмотреть сообщение
Lets break this down:
- You didn't explain anything in this tutorial.
- You asked for REP, which is not the right way to earn it.
- You didn't think of the command being abused. (e.g: spamming the command with nonsense shit)
Well Sorry for that just let other people at least use the cmd -_-

Quote:
Originally Posted by HyDrAtIc
Посмотреть сообщение
Listen, 2 ways so you can advance, first way, EXPLAIN the tutorial and remove GIVE ME REPZ, second way, ask a beta tester to delete the topic.

I believe I ain't harsh with this one, good luck next time.
sorry too xD
Reply
#9

Quote:
Originally Posted by Mzake
Посмотреть сообщение
first time making tutorial , sorry brotha next tutorial i will try to do it
"next tutorial"? ****** up "online tutorials" and check what they mean.
You HAVE to explain if you want to make a tutorial. A tutorial is explaining..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)