dcmd help
#1

Will dcmd work in 0.3z server, actually i had dcmd in my old script is compiled with 0.3z, I think updating it to zcmd is better right??

but when I join server and type a command, it says Server:Unknown command, whether i have missed a line or not?
Reply
#2

can u explain a bit more please, or show your code? and yes zcmd woeks with 0.3z faster and easier than zcmd and make it more readable kinda.. whats the problem which command isnt working and what have you changed?
Reply
#3

Zcmd is both easier to use and is more effcient/faster than dcmd, you should definitely upgrade.
Reply
#4

I defined it.

pawn Код:
// Definitions
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
and
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new commandshow[128];
    format(commandshow, sizeof(commandshow), "%s has used the command %s", PlayerName(playerid), cmdtext);
    printf(commandshow);
    if(!strcmp(cmdtext,"/")) return 1; //fix for Run time error 5: "Invalid memory access"
    if(!strcmp(cmdtext,"/tournament"))
    {
        new name[24];
        GetPlayerName(playerid,name,24);
        if(!strcmp(name,"[NoM]Vendetta[BF]") || !strcmp(name,"[BF]Harry[NoM]"))
        {
            SetPlayerPos(playerid,1556.0198, 33.5701, 23.1368);
        }
        return 1;
    }
    dcmd(bounties,8,cmdtext);
    dcmd(duels,5,cmdtext);
    dcmd(duel,4,cmdtext);
    dcmd(duelaccept,10,cmdtext);
    dcmd(duelreject,10,cmdtext);
    dcmd(time,4,cmdtext);
.......................etc etc
Reply
#5

I still dont really get what do you need assistance with.? do u want to turn those command into zcmd? or u want thoee command to stay in dcmd but they dont work? or u updated them into zcmd and they dont work? /:
Reply
#6

Quote:
Originally Posted by DopeX
Посмотреть сообщение
I still dont really get what do you need assistance with.? do u want to turn those command into zcmd? or u want thoee command to stay in dcmd but they dont work? or u updated them into zcmd and they dont work? /:
i ant assistance to get this dcmd working.... if its working fine i'll leave, else i'll have to convert all the commands to zcmd
Reply
#7

wheres the actual command?
like
dcmd_(ur command)
that code? u just showed half code kinda. and do they work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)