[Unsolved]A dcmd related problem. - 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: [Unsolved]A dcmd related problem. (
/showthread.php?tid=123349)
[Unsolved]A dcmd related problem. -
Celson - 25.01.2010
Have a look at this code
http://pastebin.com/m57efc894
When I type /rc it says...
1
2
When I type /rc place it says...
1
2
When I type /rc place bandit it says...
1
Wtf? Is anybody able to explain to me why this is happening? And if you have a solution, then please post.
Re: [Unsolved]A dcmd related problem. -
[DM]Kane - 25.01.2010
what are you trying to make?
Re: [Unsolved]A dcmd related problem. -
Celson - 25.01.2010
Well I prefer to not talk about exactly what I'm making, since I'm a bit paranoid when it comes to people stealing ideas. But basically I wanna make it so it will place a RC Bandit at your location when you type the command /rc place bandit
As you can see I'm using dcmd for the command. But I'm having trouble with checking the parameters. I was wondering if someone had a solution.
Re: [Unsolved]A dcmd related problem. -
LuxurioN™ - 25.01.2010
Look the command '/level' of my adminscript, have a good example of what you are wanting!.
Re: [Unsolved]A dcmd related problem. -
Celson - 26.01.2010
Quote:
Originally Posted by © Tђэ LυxυяiσN™
Look the command '/level' of my adminscript, have a good example of what you are wanting!.
|
Well thanks for trying to help © Tђэ LυxυяiσN™. But your level command only requires 1 parameter. I want to know how I can do this with multiple parameters.
Re: [Unsolved]A dcmd related problem. -
Celson - 26.01.2010
Alright. Thanks for the help guys
![Smiley](images/smilies/smile.png)
.
Re: [Unsolved]A dcmd related problem. -
Calgon - 26.01.2010
You were checking params[0], which is checking cell 0 for the word "place", seeing as your command is called "rc", include the "/" (slash):
/rc place
"p" starts at 4 cells through, so you'd have to check from 4 (and after) cells. Anyway, sscanf is much more easy to use.