Jump to content

Not display message for certain people in col


Recommended Posts

Posted

Here is my script

local private1 = createColPolygon(111.7880859375, 1336.2998046875, 110.7744140625, 1484.421875, 287.123046875, 1484.427734375, 288.1416015625, 1336.296875, 111.7900390625, 1336.2958984375) 
  
local theTeam = getTeamFromName("Fort Carson Police Department") 
local teamMembers = getPlayersInTeam(theTeam) 
  
function privatejames(thePlayer, matchingDimension) 
    for key, value in ipairs(teamMembers) do 
    outputChatBox("[RADIO] This is dispatch, We've have seen someone on James Brandon's Compound, Over.", value, 0, 183, 239) 
    outputChatBox("[RADIO] Detain Him On Site, Over.", value, 0, 183, 239) 
    end 
end 
addEventHandler("onColShapeHit", private1, privatejames) 

Posted
local private1 = createColPolygon(111.7880859375, 1336.2998046875, 110.7744140625, 1484.421875, 287.123046875, 1484.427734375, 288.1416015625, 1336.296875, 111.7900390625, 1336.2958984375) 
  
local theTeam = getTeamFromName("Fort Carson Police Department") 
  
function privatejames(thePlayer, matchingDimension) 
    if getElementType(thePlayer) ~= "player" or not matchingDimension then return end 
    if getPlayerTeam(thePlayer) == theTeam then return end 
    local teamMembers = getPlayersInTeam(theTeam) 
    for key, value in ipairs(teamMembers) do 
    outputChatBox("[RADIO] This is dispatch, We've have seen someone on James Brandon's Compound, Over.", value, 0, 183, 239) 
    outputChatBox("[RADIO] Detain Him On Site, Over.", value, 0, 183, 239) 
    end 
end 
addEventHandler("onColShapeHit", private1, privatejames) 

Make sure you actually create the team.

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...