[Tutorial] How to make a simple /credits command
#1

Hello, This is my very first tutorial. I am a beginner at scripting. Also, Thought to make a tutorial on how to create a /credits command.
Requirements:
  1. Your fav colors.
  2. Pawno
Steps:

1. Open Pawno
2. File> New
3. Locate
pawn Код:
if(strcmp("/mycommand", cmdtext, true) == 0)
in pawno.
4. Find your fav color and put it after includes like

pawn Код:
#include <a_samp>
#define COLOR_ORANGE 0xFF9900AA
5. Change /mycommand to /credits or whatever you want your command to show credits as this is going to be the command that will be used by player to see the credits.
6. remove
pawn Код:
//Do something here
7. Put this code here
pawn Код:
SendClientMessage(playerid, YOUR_COLOR, "ME FOR THIS TUTORIAL");
(This will send the player your message that you entered.)
8. Change YOUR_COLOR and put the color you defined at the top , If you choosed the color same as me, Then use this

pawn Код:
SendClientMessage(playerid, COLOR_ORANGE, "ME FOR THIS TUTORIAL");
9. Compile and run
10. Add your FS in server.cfg
10.Type your command in game and done !
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)