Hi, i have some houses with the same interiors but different virtual worlds, and the players see anything you say in the local chat from another house.
I want to not see what are the players from another house saing.
Код:
if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/say", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "{30a030}[TZ]: {ffffff}You cant speak.");
return 0;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "{30a030}[TZ]: {ffffff}You need to be logged in!.");
return 1;
}
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_GRAD2, "» Type (/l)ocal [local chat]");
return 1;
}
// --------------- Anti Advertising Open (By Blake)
if(FindIP((result))) /// Anti-Advertising
{
format(string, sizeof(string), "{30a030}[TZ]: {ff6347}%s has been banned. Reason: Advertising.",sendername);
SendClientMessageToAll(0xFF6347FF,string);
PlayerInfo[playerid][pBanned] = 4;
BanLog(string);
Kick(playerid);
return 1;
}
// --------------- Anti Andvertising Closed (By Blake)
format(string, sizeof(string), "%s's %s", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
return 1;
}