if(strcmp("/me", cmd[0], true, 10) == 0) { new string2[1024]; format(string2, sizeof(string2), cmdtext); strdel(string2, 0, 3); format(string, sizeof(string), "* %s%s", pName(playerid), string2); ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); return 1; }
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); SendClientMessageToAll(0xFFFF00AA, str); return 1; }
You are probably using two command processor at once (e.g: ZCMD and strcmp)?
|
Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); SendClientMessageToAll(0xFFFF00AA, str); return 1; } |
if(strcmp("/me", cmdtext, true) == 0)
{
new string2[128];
format(string2, sizeof(string2), cmdtext[4]);
format(string, sizeof(string), "* %s %s", pName(playerid), string2);
ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
return 1;
}