/cmds command? - 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)
+--- Thread: /cmds command? (
/showthread.php?tid=284731)
/cmds command? -
maziar_gholipour - 20.09.2011
hey guys... i wana make a /cmds command that shows cmds... anyone know how? cause im noob on scripting ^^
Re: /cmds command? -
|_ⒾⓇⓄN_ⒹⓄG_| - 20.09.2011
use
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
or
https://sampwiki.blast.hk/wiki/SendClientMessage
and read some tutorial about "how to create commands".
https://sampwiki.blast.hk/wiki/Creating_Commands
good luck
Re: /cmds command? -
Kingunit - 20.09.2011
pawn Код:
CMD:commands(playerid, params[])
{
SendClientMessage(playerid, 0xFFFFFFFF, "Rule 1");
SendClientMessage(playerid, 0xFFFFFFFF, "Rule 2");
// Go on
return 1;
}
You need ZCMD for this
Re: /cmds command? -
grantism - 20.09.2011
https://sampwiki.blast.hk/wiki/ShowPlayerDialog - showing dialog IMO looks the best, mainly because you don't get shit spamming your chat. my personal view only.
Re: /cmds command? -
maziar_gholipour - 20.09.2011
just one thing...where should i paste this script? i mean in which line of my gamemode?
Код:
CMD:commands(playerid, params[])
{
SendClientMessage(playerid, 0xFFFFFFFF, "Rule 1");
SendClientMessage(playerid, 0xFFFFFFFF, "Rule 2");
// Go on
return 1;
}
Re: /cmds command? -
grantism - 20.09.2011
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
Re: /cmds command? -
maziar_gholipour - 20.09.2011
i got the script to make /cmds command but i want to know where should i write this script...i mean which line of gamemode
Re: /cmds command? -
|_ⒾⓇⓄN_ⒹⓄG_| - 20.09.2011
inside this callback
https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Re: /cmds command? -
maziar_gholipour - 20.09.2011
between return 1 and return 0?
Re: /cmds command? -
|_ⒾⓇⓄN_ⒹⓄG_| - 20.09.2011
its better read this:
https://sampwiki.blast.hk/wiki/Creating_Commands
it helps a lot