need help with dcmd
#1

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?
Reply
#2

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.
Reply
#3

where i put the #define line in the start?
Reply
#4

like this?
http://imgur.com/LlzSYOU
Reply
#5

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)