19.10.2012, 16:27
Table of contents
- Includes
- Downloads
- Adding it
- Transfer
- Errors
- Extra Info
Okay, so the include you will need to get first is called ZCMD (Duh). It's the include that you will need to create the ZCMD commands. This is the only include you will need to transfer the command. It's that easy!
Downloads
You can find the download link to the ZCMD include on this page: http://forum.sa-mp.com/showthread.ph...highlight=ZCMD
Adding it
You need to add the ZCMD include at the top of your script. The define you need to add is:
Код:
#include <ZCMD>
Okay, now for the big transfer. It can be quite easy at times, but that's only for the small scripts. The first thing you need to do it remove the OnPlayerCommandText - You don't need it!
Now that's that done, lets clear out a space and add a comment for our commands
Great, now lets paste our strcmp command into our section!
Now, lets edit our code out to make it suitable for ZCMD.
You will need to remove the
Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
Код:
CMD:mycommand(playerid,params[])
And there you go, your command has been transferred! Wasn't that easy?
Errors
You shouldn't get any errors when transferring commands as small as this, but, if you do get error post them down below in CODE tags, and i'll help you out
Extra Info
This will work for the other type of command includes, such as Y_CMD and dcmd, bcmd etc.