Oh, my bad...
getTeamName gets the name of a team element not player's team name. ?
function stage100()
setTimer(stage110, 10000, 1)
for i, c in ipairs(alliedteams) do
for k, v in ipairs(getPlayersInTeam(getTeamFromName((c)[1]))) do
if isElementWithinColShape(v, rc) then
local theVehicle = getPedOccupiedVehicle ( v )
if theVehicle then
outputChatBox("#54F764[Rescue-Mission]: #FF0000Warning! You are in a vehicle, get off your vehicle to earn progress!", v, 255, 0, 0, true)
else
triggerClientEvent("draw100", v)
end
end
end
end
local playersInCol = getElementsWithinColShape(rc, "player")
if #playersInCol > 0 then
for i, player in ipairs(playersInCol) do
local playerTeam = getPlayerTeam(player)
if playerTeam and getTeamName (playerTeam) == "Blue Team" then
outputChatBox("Can't trigger event, blue team is in colshape", root)
return
end
end
triggerClientEvent("showheli", root, hiddenmarker)
helicopter = true;
end
end