/commands - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /commands (
/showthread.php?tid=231559)
/commands -
davelord - 25.02.2011
hey how can i make a /commands command?
for example when you type /commands this shows up:
~yellow~ -------commands------------
~white~ /command1 /command2 /command3
~white~ /command4 /command5 /command6
~yellow~ -------commands------------
Re: /commands -
davelord - 25.02.2011
something like this



?
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_GREY, "~~commands~~");
SendClientMessage(playerid,COLOR_GREY, "command");
return 1;
}
return 0;
}
Re: /commands - Unknown123 - 25.02.2011
Try:
pawn Код:
#define COLOR_YELLOW 0xFFD800FF
#define COLOR_WHITE 0xFFFFFFFF
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "-------commands------------");
SendClientMessage(playerid, COLOR_WHITE, "/command1 /command2 /command3");
SendClientMessage(playerid, COLOR_WHITE, "/command4 /command5 /command6");
SendClientMessage(playerid, COLOR_YELLOW, "-------commands------------");
return 1;
}
return 0;
}
Re: /commands -
davelord - 26.02.2011
thanks