Multiple cmds - 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: Multiple cmds (
/showthread.php?tid=151614)
Multiple cmds -
[NTX]MikeQ - 31.05.2010
Hey everyone i need help. how to make multiple commands in PAWNO?
Ive seen vids that copy n paste the command line it doesnt work for me.
Re: Multiple cmds -
Grim_ - 31.05.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/help", true) == 0)
{
// Command 1
return 1;
}
if(strcmp(cmdtext, "/rules", true) == 0)
{
// Command 2
}
return 0;
}
Re: Multiple cmds -
[NTX]MikeQ - 31.05.2010
ty grim
Re: Multiple cmds -
Flashy - 31.05.2010
It doesnґt work cause you forget to add more than just the "whole commands".
And commands are constructed on the respective scripts.
You can create commands with dcmd, zdcmd and others..If you donґt know what this is just learn to script, means: Search SAMP Wiki and read basics.
You can add to your script how many commands you want (I know it has a limit).
Re: Multiple cmds -
Grim_ - 31.05.2010
Quote:
Originally Posted by [SAK
Karlis ]
ty grim
|
You're welcome.
@Flashy: What are you talking about? There's no limit to the amount of commands you can have, and using regular OnPlayerCommandText is fine.
Re: Multiple cmds -
Flashy - 31.05.2010
Oh, really? My bad
Re: Multiple cmds -
[NTX]MikeQ - 31.05.2010
it doesnt tele me it sais UNKNOWN CMD
thats wut i wrote
Re: Multiple cmds -
Flashy - 31.05.2010
Nah, I was thinking SAMP and GTA have a limit of Playercommands.
But its wrong xD
Re: Multiple cmds -
Grim_ - 31.05.2010
Add
after the SetPlayerPos line.
Re: Multiple cmds -
[NTX]MikeQ - 31.05.2010
no it still doesnt work