29.08.2010, 10:31
Quote:
|
copy of dcmd? renamed to mcmd? is this any faster then dcmd at least..?
|
pawn Code:
#define mcmd(%0,%1,%2,%3) \
if (!strcmp(#%0, %1, true, (%2))) mcmd_%0((%3), %1[(%2) + 1])
#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
Edit:
mcmd is like a dcmd. Isn't a copy in scripting, I made it.
dcmd is much longer than mcmd. I don't know if dcmd is best, but I like what I made.
Edit 2:
mcmd_init removes the "/" and then mcmd checks if the command is = to the function, then it calls the function. I don't know what does dcmd, but I think mcmd is too much simple than dcmd.


