25.04.2013, 23:33
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0; }
when adding another command add it under public on play commandtext and it should do the trick so remove if you have more than 1 ublic on player command text
For example
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } if (strcmp("/mycommand2", cmdtext, true, 10) == 0) { // Do something herefg return 1; } return 0; }