Posts: 1,057
Threads: 90
Joined: May 2009
Reputation:
0
I'm trying to define Params manually. I'm updating a script from strtok to sscanf. But I do not wish to change over 100 commands to DCMD. So I'd like to define Params manually. How could I do it?
I thought of something like "new params = cmdtext[];", I hope you get what I mean. But I don't think that will work.
I hope you can help me.
Posts: 2,726
Threads: 85
Joined: Jul 2010
Reputation:
0
This got owned by Calg00ne's post.
Posts: 6,129
Threads: 36
Joined: Jan 2009
DCMD aren't like publics - once again, you have no idea about what you're talking about "Mean."
Furthermore, for ZCMD, ZCMD has a callback that is called prior to the command being executed, you could parse the data in THAT callback.
For DCMD, you can still use the cmdtext within the OnPlayerCommandText callback, or you can alternatively create another string and use strcat to copy the string data - you're better off finding & replacing the strings though (i.e: Replace "params" to "cmdtext" - if that's what you want).
Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by Mean
What I found in ZCMD include:
pawn Код:
#define COMMAND:%1(%2) \ forward cmd_%1(%2); \ public cmd_%1(%2)
|
Yes, and ZCMD is
NOT DCMD - they do not function in the same way.
Posts: 2,524
Threads: 109
Joined: Sep 2009
Reputation:
0
100 commands won't take you longer than 8 hours. I had 70 and It only took me 5. Just work and do it, it's worth in the end.