OnPlayerCommandText(playerid,"/command");
#6

not true dcmd works in 2 parts!

Код:
#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
add this to the top of your script.

then add this under OnPlayerCommandText.

Код:
dcmd(commands, 8, cmdtext);
its should look something like this

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  /* This Calls The Command */
  dcmd(commands, 8, cmdtext);
  return 0;
}
then add this at the very bottom of your script

Код:
dcmd_commands(playerid, params[])
{
    /* This is were the command will be called! */
	return 1;
}
Hope that helps you understand it
Reply


Messages In This Thread
OnPlayerCommandText(playerid,"/command"); - by Assyria - 21.05.2010, 18:25
Re: OnPlayerCommandText(playerid,"/command"); - by DJDhan - 21.05.2010, 18:31
Re: OnPlayerCommandText(playerid,"/command"); - by Assyria - 21.05.2010, 18:41
Re: OnPlayerCommandText(playerid,"/command"); - by Sergei - 21.05.2010, 18:48
Re: OnPlayerCommandText(playerid,"/command"); - by Assyria - 21.05.2010, 18:56
Re: OnPlayerCommandText(playerid,"/command"); - by BLAbla93 - 21.05.2010, 18:58
Re: OnPlayerCommandText(playerid,"/command"); - by Assyria - 21.05.2010, 19:06
Re: OnPlayerCommandText(playerid,"/command"); - by BLAbla93 - 21.05.2010, 19:08
Re: OnPlayerCommandText(playerid,"/command"); - by Assyria - 21.05.2010, 19:12
Re: OnPlayerCommandText(playerid,"/command"); - by BLAbla93 - 21.05.2010, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)