04.06.2010, 21:50
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
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(command, 7, cmdtext); // the command, number of letters, cmdtext
return 0;
}
dcmd_command(playerid, params[])
{
#pragma unused params
SendClientMessage(playerid, color, "LOL");
return 1;
}