Creating function to send to law enforcement only
#1

Hey guys. I'm getting the famous warning 213: tag mismatch warnings...

I'm not really sure how to go about it, since I don't have an OrgID to go with and only the type which is 1 for law enforcement.

Код:
(1984) : warning 213: tag mismatch
(1985) : warning 213: tag mismatch
(1988) : warning 213: tag mismatch
PHP код:
if(PlayerInfo[i][OrgID] == -1) continue; // 1984
if(oInfo[PlayerInfo[i][OrgID]][Type] == 1)  //1985
SendClientMessage(ioInfo[PlayerInfo[i][OrgID]][Color], text); //1988 
PHP код:
SendLawRadioMessage(text[])
{
    foreach(new 
i:Player)
     {
        if(
PlayerInfo[i][OrgID] == -1) continue; //If a player online isn't in an organisation it skips.
          
if(oInfo[PlayerInfo[i][OrgID]][Type] == 1//Gets the player's organization type if equal to 1 (Law) continues
        
{
            if(
GetPlayerWantedLevel(i) > 0) continue; //If player is in an Law Org but is wanted it skips them.
             
SendClientMessage(ioInfo[PlayerInfo[i][OrgID]][Color], text); //Displays the message to those that are in a law type org.
           
}
    }
    return 
1;

I hope I explained it enough for you.
Reply
#2

Can you paste the variables definition?
Reply
#3

Never mind I was being silly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)