Quote:
Originally Posted by DTV
This is my first tutorial, I hope you like it
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0; }
CMD:search(playerid, params[]) //This is stating what the command will be named between the "CMD:" and "(", in this case, it's 'search'. { SetTimerEx("SearchSystem", 5000, false, "i", playerid); //This is the timer that will go off for the player when he types the command in. GameTextForPlayer(playerid, "Searching...", 4500, 3); //A message that will appear on the screen, showing that it's working. return 1; }
|
NEVER return 0 under OnPlayerCommandText if you're using zcmd. It will not work correctly.
Return 1 or remove the OnPlayerCommandText callback.