SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/12/2017, 04:02 AM   #1
Tass007
Gangsta
 
Tass007's Avatar
 
Join Date: May 2011
Location: Somewhere not near you
Posts: 733
Reputation: 31
Default Creating function to send to law enforcement only

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.

Code:
(1984) : warning 213: tag mismatch
(1985) : warning 213: tag mismatch
(1988) : warning 213: tag mismatch
PHP Code:
if(PlayerInfo[i][OrgID] == -1) continue; // 1984
if(oInfo[PlayerInfo[i][OrgID]][Type] == 1)  //1985
SendClientMessage(ioInfo[PlayerInfo[i][OrgID]][Color], text); //1988 
PHP Code:
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.
__________________
Copyright 2016 vR Studios
Currently working with vR Studios
Copying and pasting doesn't allow you to learn the things that reading and understanding will.
Tass007 is offline   Reply With Quote
Old 02/12/2017, 09:11 AM   #2
pollo97
Big Clucker
 
pollo97's Avatar
 
Join Date: Sep 2011
Location: Italy
Posts: 83
Reputation: 4
Default Re: Creating function to send to law enforcement only

Can you paste the variables definition?
pollo97 is offline   Reply With Quote
Old 02/12/2017, 09:52 PM   #3
Tass007
Gangsta
 
Tass007's Avatar
 
Join Date: May 2011
Location: Somewhere not near you
Posts: 733
Reputation: 31
Default Re: Creating function to send to law enforcement only

Never mind I was being silly.
__________________
Copyright 2016 vR Studios
Currently working with vR Studios
Copying and pasting doesn't allow you to learn the things that reading and understanding will.
Tass007 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP function broken? Can't send long strings! linuxthefish Scripting Help 5 13/11/2017 08:31 PM
ConnectSpawn function - send messages to a player when he first connects noPANDA Scripting Help 3 07/04/2017 06:34 AM
Creating a function Alvin007 Scripting Help 15 20/02/2015 07:04 PM


All times are GMT. The time now is 02:52 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.