10.12.2010, 20:01
Alright, new code:
But it's still exactly the same problem. :/
@Above,
that was the previous code, but I couldn't get the 'if is on duty' blabla working. But I might use your code though, I'll check it.
pawn Код:
public SendRadioMessage(playerid, color, string[])
{
foreach(Player, i)
{
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1 && PlayerInfo[i][pOnDuty] == 1) // Police force
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2 && PlayerInfo[i][pOnDuty] == 1) // FBI
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 3 || PlayerInfo[i][pLeader] == 3 && PlayerInfo[i][pOnDuty] == 1) // SASP
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4 && JobDuty[i] == 1) // firemen / medic
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 5 && PlayerInfo[i][pOnDuty] == 1) // national
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 6)
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 7 || PlayerInfo[i][pLeader] == 7)
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 8 || PlayerInfo[i][pLeader] == 8)
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pLeader] == 9)
{
SendClientMessage(i, color, string);
}
else if(PlayerInfo[i][pMember] == 10 || PlayerInfo[i][pLeader] == 10)
{
SendClientMessage(i, color, string);
}
}
}
@Above,
that was the previous code, but I couldn't get the 'if is on duty' blabla working. But I might use your code though, I'll check it.