Hello guys, I have this problem in this script was for him to open the door only for gangs, but it is opening for any player and is giving this one on the console as you can see below if you can help me thanks!
CODE!
gate = createObject(971, 1543.400390625, -1628.2001953125, 15.89999961853, 0, 0, 90)
x,y,z = getElementPosition (gate)
zona = createColCircle ( x,y, 7, 7 )
function open()
playerTeam = getPlayerTeam ( source )
Clann = getTeamFromName ("BOPE")
if (playerTeam) == Clann then
moveObject(gate, 2000, 1543.4000244141, -1619.0999755859, 15.89999961853 )
end
end
addEventHandler ( "onColShapeHit", zona, open )
function close()
moveObject(gate, 2000, 1543.400390625, -1628.2001953125, 15.89999961853 )
end
addEventHandler ( "onColShapeLeave", zona, close )