21.05.2010, 18:25
Hello.
Function: OnPlayerCommandText(playerid,"/command");
Version of that for dcmd?
Regards,
Assyria
Function: OnPlayerCommandText(playerid,"/command");
Version of that for dcmd?
Regards,
Assyria
dcmd(commands,8,cmdtext);
dcmd_commands(playerid,params[]) { if(!strlen(params)) return SendClientMessage(playerid, LIGHTBLUE2, "Usage: /commands"); //Your script here }
#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
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; }
dcmd_commands(playerid, params)
Originally Posted by [T_S
DeStunter ]
Код:
dcmd_commands(playerid, params) |