SA-MP Forums Archive
need help with dcmd - 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: need help with dcmd (/showthread.php?tid=585284)



need help with dcmd - Viki - 12.08.2015

hey guys how are you?
i know how to make dcmd cmds but how do make um?do i need a file like zmcd.inc?
and do i need this to OnPlayerCommandText?
Edit:Can i use zcmd and dcmd at the same time?


Re: need help with dcmd - J0sh... - 12.08.2015

PHP код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 
You do not need a include like ZCMD, just put this code ontop, and yes you can use both but I don't know why you would want to do this ZCMD is faster.


Re: need help with dcmd - Vicki - 12.08.2015

where i put the #define line in the start?


Re: need help with dcmd - Vicki - 12.08.2015

like this?
http://imgur.com/LlzSYOU


Re: need help with dcmd - Michael B - 12.08.2015

Quote:
Originally Posted by Vicki
Посмотреть сообщение
Affirmative. Just place it at the top, next to other define's.


Re: need help with dcmd - Viki - 12.08.2015

and where i put the
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(kick,4, cmdtext);
    return 0;
}



Re: need help with dcmd - thomaswilliams - 12.08.2015

Viki,

Why don't you just revert to using ZCMD, it's much easier and quicker to use as theres no defines required just a

Код:
#include <zcmd>
at the top of the script.

Heres the link: https://sampforum.blast.hk/showthread.php?tid=91354