27.08.2009, 18:59
Quote:
Originally Posted by japufta
Simple, you are never returning that the command worked in your code, all you have to do is add a "return 1;" line after every command you do is finished.
I did the /me for you: Код:
if(strcmp(cmd, "/me", true) == 0) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]"); return 1; } else { format(string, sizeof(string), "* %s %s", sendername, result); } ProxDetector(30.0, playerid, string, COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY); printf("%s", string); // You need to add this return 1, this tells the program that the command worked successfully (or something like that) return 1; } |
The other ones are for like RPG's and I think he wants it for a RolePlay Script