SA-MP Forums Archive
dcmd - How does it work? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dcmd - How does it work? (/showthread.php?tid=161496)



dcmd - How does it work? - Agent Smith - 20.07.2010

I know it's a kinda stupid question but how does all of this code make a command work?

pawn Код:
#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
And how is dcmd and zcmd faster than using strcmp? Thanks for your help


Re: dcmd - How does it work? - kLx - 20.07.2010

zcmd is fastest.


Re: dcmd - How does it work? - iJumbo - 20.07.2010

zcmd go directly to command ...