Message gang
#8

The ganid / factionid isn't the index so you got the wrong entry
pawn Code:
format(str, sizeof(str), "Your gang %s has taken over a territory not belonging to any gang", GetFactionName(ZoneInfo[i][ZoneAttacker]));
SendFactionMessage(ZoneInfo[i][ZoneAttacker], str);
pawn Code:
GetFactionName(factionid) {
    new name[40];

    for(new t = 0; t < sizeof(FracInfo); t++) {
        if(FracInfo[t][FracID] == factionid) {
            strcat(name, FracInfo[t][FracName]);
            return name;
        }
    }
    name = "Undefined";
    return name;
}

SendFactionMessage(factionid, message[]) {
    foreach(Player, p) {
        if(GetPlayerTeam(p) == factionid) {
            SendClientMessage(p, -1, str);
        }
    }
}
Reply


Messages In This Thread
Message gang - by KamilPolska - 23.04.2020, 14:06
Re: Message gang - by SiM2hmoud - 23.04.2020, 16:34
Re: Message gang - by KamilPolska - 23.04.2020, 16:49
Re: Message gang - by SiaReyes - 24.04.2020, 02:33
Re: Message gang - by KamilPolska - 24.04.2020, 03:08
Re: Message gang - by SiM2hmoud - 24.04.2020, 13:04
Re: Message gang - by KamilPolska - 24.04.2020, 17:06
Re: Message gang - by Nero_3D - 25.04.2020, 02:46
Re: Message gang - by KamilPolska - 25.04.2020, 13:46

Forum Jump:


Users browsing this thread: 3 Guest(s)