22.04.2013, 02:19
(
Последний раз редактировалось DanielCortez; 27.06.2013 в 15:33.
)
Introduction:
Hello.Installation and usage:
Last time there were a lot of command processors, but almost all of them were just an edited versions of ZCMD.
Now it's time to break that chain.
Let me show you a new command engine: DC_CMD. It was created as a plugin and written in pure ASM.
1. Put "dc_cmd.dll" or "dc_cmd.so" in your "plugins" folder and "dc_cmd.inc" into "pawno/include" folder.Speed tests: Features planned for next versions:
2. Add "dc_cmd" (or "dc_cmd.so") to the plugins list in "server.cfg"
3. Add the following code at the top of your script, under #include <a_samp>
4. If you are using DC_CMD in a filterscript, make sure it contains the following line at the top:PHP код:
#include <dc_cmd>
or else your FS will be determined as gamemode and commands in actual gamemode won't work.pawn Код:#define FILTERSCRIPT
5. Make commands as for ZCMD:
You can also use Fast Mode (standard commands won't be supported), just add #define DC_CMD_FAST before including "dc_cmd.inc", like thispawn Код:// test command
CMD:info(playerid, params[])
{
return SendClientMessage(playerid, -1, "DC_CMD plugin installed successfully!");
}
// "/i" - shortened variation of "/info"
CMD:i(playerid, params[])
{
// call "/info" command
return _info(playerid, params);
}
pawn Код:#define DC_CMD_FAST // <<==== enable Fast Mode
#include <dc_cmd>
- Completely rewrite plugin in C++
Add more useful features
Plugin (.dll + .so + .inc): https://www.dropbox.com/s/eu1704igk9rnwe2/dc_cmd.zip
Source code (for FASM): https://www.dropbox.com/s/ce2sqv3clp0imz2/Source.zip
Speed tests: https://www.dropbox.com/s/5cgm648l94m7u71/speedtest.zip