09.06.2012, 17:09
everyone on the server can see when someone types in a /me and i want that only the ppl in range of the player can see it
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me { if(!cmdtext[3])return SendClientMessage(playerid, 0xFEFEFEFF, "USAGE: /me [action]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); SendClientMessage(0xFFFF00AA, str); return 1; }
it is my code if(strcmp(cmdtext, "/me", true, 3)==0) { new pname1[24], string[256]; GetPlayerName(playerid, pname1, 24); format(string, 256, "{762B76}*** {FFFFFF}%s {762B76}%s", pname1, cmdtext[4]); SendClientMessage(0xFFFFFFAA , string); return 1; }
You have SendClientMessageToAll, change that to SendClientMessage only...
Try with this... Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me { if(!cmdtext[3])return SendClientMessage(playerid, 0xFEFEFEFF, "USAGE: /me [action]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); SendClientMessage(0xFFFF00AA, str); return 1; } |