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.