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)
+--- Thread: Commands. (
/showthread.php?tid=298398)
Commands. -
Tomejus - 20.11.2011
Hello fellas have some troubles with commands.
Here's the code:
http://pastebin.com/gdLrdNTf
And the problem is that everything works fine with first command ( - "s" [text]) But if I type for example "/pr kick" or something I gettint the text: "Command usage: /pr s [text]" - first command, so basiclly first command works fine, bet if I type not a first command or even a single word it gives that usage is: /pr s [text], so where's the problem?
Re: Commands. -
KosmasRego - 20.11.2011
I can't help since it's not in english.
Re: Commands. -
Tomejus - 20.11.2011
It's only error messages in other language. The point is the COMMAND - params - extra variable.
Re: Commands. -
Tanush123 - 20.11.2011
What command you wanted to make.
Re: Commands. -
Tomejus - 20.11.2011
There's a command called: pr (CMD

r( playerid, params[] )
And inside this command there are a a several commands which uses STRCMP. everything went ok if I check STRCMP with params evertyghin is okey, but if i need an extra variable for example REASON it won't work, so i figured out that i need an extra variable to check STRCMP (new check[ size ]

but everything work WRONG like i said in first post...
Re: Commands. -
Tanush123 - 20.11.2011
why does the command do i mean.
Re: Commands. -
MP2 - 20.11.2011
Use sscanf.
Re: Commands. -
Huiz - 20.11.2011
on one parameter is not worth the use in sscanf
Re: Commands. -
MP2 - 20.11.2011
But you aren't using one parameter, you're using two if I understand you correctly.
new sscanf_string[2][64];
sscanf(params, "s[64]s[64]", sscanf_string[0], sscanf_string[1]);