4MaticPL Posted December 27, 2014 Share Posted December 27, 2014 Hi Is there any way to get players in marker? Link to comment
xeon17 Posted December 27, 2014 Share Posted December 27, 2014 You can use the following function to check is the element within marker; isElementWithinMarker And use this,if you want to get all elements in a marker; function getElementsWithinMarker(marker) if (not isElement(marker) or getElementType(marker) ~= "marker") then return false end local markerColShape = getElementColShape(marker) local elements = getElementsWithinColShape(markerColShape) return elements end Link to comment
manawydan Posted December 27, 2014 Share Posted December 27, 2014 or you can try this(no tested) function getPlayersInMarker(marker) local players = getElementsByType("player") local t = {} for k,v in ipairs(players) do if(isElementWithinMarker(v,marker))then table.insert(v,t) end end return t end Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now