21.05.2010, 18:58
not true dcmd works in 2 parts!
add this to the top of your script.
then add this under OnPlayerCommandText.
its should look something like this
then add this at the very bottom of your script
Hope that helps you understand it
Код:
#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
then add this under OnPlayerCommandText.
Код:
dcmd(commands, 8, cmdtext);
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { /* This Calls The Command */ dcmd(commands, 8, cmdtext); return 0; }
Код:
dcmd_commands(playerid, params[]) { /* This is were the command will be called! */ return 1; }