[Tutorial] Simple /help Command -
Emanuel_Rodriguez - 17.07.2010
Very simple. First of all, what you should always, and always do, is define a_samp into your script. This will determine that the script is going to be made for San Andreas Multiplayer. So at the very top add this:
Next, you will make a define for the text color, which will be the text that comes up on chat, once you activate the command. So now, put this under your
#include's, and above your
public's.
pawn Код:
#define COLOR_WHITE 0xFFFFFFFF
Next you must make it a command, under your
OnPlayerCommandText.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"Enter Your Text Here!");
}
return 0;
}
That's pretty much it, nothing to it!
REMEMBER: To change the Enter Your Text Here. DO NOT REMOVE THE QUOTATION MARKS!
Re: [Tutorial] Simple /help Command -
Jay. - 17.07.2010
Nice tutorial
But wrong selection buddy..
Should be in "Scripting Tutorials"
Re: [Tutorial] Simple /help Command -
Kar - 17.07.2010
seriously u see the other kid mess up his help command u make one? fail. you should atleast post zcmd and dcmd for other players to
Re: [Tutorial] Simple /help Command -
[NTX]MikeQ - 17.07.2010
ZCMD:
U need this
You have to delete OnPlayerCommandText
pawn Код:
COMMAND:help(playerid, params[])
{
SendClientMessage(playerid,0xFFFAAA,"Enter ur message here");
return 1;
}
Re: [Tutorial] Simple /help Command -
Kar - 17.07.2010
also
//top of script
#include <dcmd>
//anywhere but not under onplayercommandtext
pawn Код:
CMD_help(playerid, params[])
{
SendClientMessage(playerid,0xFFFAAA,"Enter ur message here");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(help,4,cmdtext);
return 0;
}
Re: [Tutorial] Simple /help Command -
Jay. - 17.07.2010
Will, You guys just stop this i'm sure some of you've failed on a script right?
Re: [Tutorial] Simple /help Command -
ViruZZzZ_ChiLLL - 17.07.2010
Uhhh... Also, remember to return 1 at every strcmp command.
pawn Код:
if (strcmp("/help", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"Enter Your Text Here!");
return 1;
}