19.04.2013, 13:18
Hi
i have this cmd /f , but if one in family 1 and say anything on /f , family 2 can see chat on /f
i have this cmd /f , but if one in family 1 and say anything on /f , family 2 can see chat on /f
pawn Код:
CMD:f(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!PlayerInfo[playerid][pFam]) return SendClientMessage(playerid, COLOR_GREY, "You are not in a family.");
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/f)amilychat [text]");
if(AntiAdv(playerid, params)) return 1;
format(string, sizeof(string), "***[ %s %s: %s ]***",/* [FAM](%d) <== PlayerInfo[playerid][pFamRank], */RPFaRN(playerid), RPN(playerid), params);
SendPlayerFamMessage(playerid, COLOR_CYAN, string);
return 1;
}
pawn Код:
stock SendPlayerFamMessage(playerid, color, string[])
{
foreach(Player, i)
{
if(IsPlayerLoggedIn(i) && PlayerInfo[i][pFac] == PlayerInfo[playerid][pFac])
{
SendClientMessage(i, color, string);
}
}
return 1;
}