25.04.2020, 02:46
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);
}
}
}