help , /f chat for family
#1

Hi

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;
}
Reply


Messages In This Thread
help , /f chat for family - by morocco - 19.04.2013, 13:18
Re: help , /f chat for family - by lean1337 - 19.04.2013, 13:23
Re : Re: help , /f chat for family - by morocco - 19.04.2013, 13:25
Re: Re : Re: help , /f chat for family - by lean1337 - 19.04.2013, 13:27
Re : Re: help , /f chat for family - by morocco - 19.04.2013, 14:03
Re: help , /f chat for family - by ryanhawk31 - 19.04.2013, 15:20
Re: help , /f chat for family - by BigGroter - 19.04.2013, 15:31
Re: help , /f chat for family - by RandomDude - 19.04.2013, 15:33
Re: help , /f chat for family - by Chris_Morrison - 19.04.2013, 16:07
Re : Re: help , /f chat for family - by morocco - 19.04.2013, 16:37

Forum Jump:


Users browsing this thread: 2 Guest(s)