05.03.2013, 19:21
Quote:
strcmp to y_cmd 1. strcmp commands are all held in the OnPlayerCommandText callback, and will look like so: if(strcmp(cmdtext, "/command", true) == 0) { // Code for command return 1; } 2. Take the code from part 1 and place it in a function like so, outside of all callbacks: YCMD:command(playerid, params[], help) { if(help) { SendClientMessage(playerid, 0xFF0000AA, "Write a short help message here."); } else { // Code for command } return 1; } Then delete all the code from part 1. |