SendRadioMessage, problem.
#1

Hello, I'm working on a radio system for a friend's GF server, but it doesn't really work well.
The problem is, everyone recieves the radio message, doesn't metter what their stats are. And, if they're not on duty, they will also still recieve the radio message.

Code:
pawn Код:
public SendRadioMessage(playerid, color, string[])
{
foreach(Player, i)
{
    if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
    if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1 && PlayerInfo[i][pOnDuty] == 1) // Police force
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2 && PlayerInfo[i][pOnDuty] == 1) // FBI
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 3 || PlayerInfo[i][pLeader] == 3 && PlayerInfo[i][pOnDuty] == 1) // SASP
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4 && JobDuty[i] == 1) // firemen / medic
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 5 && PlayerInfo[i][pOnDuty] == 1) // national
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 6)
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 7 || PlayerInfo[i][pLeader] == 7)
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 8 || PlayerInfo[i][pLeader] == 8)
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pLeader] == 9)
    {
    SendClientMessage(i, color, string);
    continue;
    }
    else if(PlayerInfo[i][pMember] == 10 || PlayerInfo[i][pLeader] == 10)
    {
    SendClientMessage(i, color, string);
    continue;
    }
 }
}
Reply


Messages In This Thread
SendRadioMessage, problem. - by Biesmen - 10.12.2010, 18:31
Re: SendRadioMessage, problem. - by Jochemd - 10.12.2010, 18:37
Re: SendRadioMessage, problem. - by Biesmen - 10.12.2010, 19:33
Re: SendRadioMessage, problem. - by Scenario - 10.12.2010, 19:34
Re: SendRadioMessage, problem. - by Hiitch - 10.12.2010, 19:35
Re: SendRadioMessage, problem. - by Vince - 10.12.2010, 19:37
Re: SendRadioMessage, problem. - by Mokerr - 10.12.2010, 19:53
Re: SendRadioMessage, problem. - by Biesmen - 10.12.2010, 20:01
Re: SendRadioMessage, problem. - by Scenario - 10.12.2010, 20:08
Re: SendRadioMessage, problem. - by Mokerr - 10.12.2010, 20:09

Forum Jump:


Users browsing this thread: 5 Guest(s)