smw94 Posted May 17, 2014 Share Posted May 17, 2014 how to restrict visibility of createRadarArea ? i've try some code, but it didn't work this is my code that didn't work local visibilityAffect = {} for i,p in ipairs(getElementsByType("player")) do if getElementData(getPlayerTeam(p), "type") > 1 then table.insert(visibilityAffect,p) end end local radArea = createRadarArea( x, y, sizeX, sizeY, red, green, blue, 130, visibilityAffect) this is not working too local radArea = createRadarArea( x, y, sizeX, sizeY, red, green, blue, 130 ) for i, p in ipairs(getElementsByType("player")) do if getElementData(getPlayerTeam(p), "type") > 1 then setElementVisibleTo(radArea, p, false) end end any help ? thanks before Link to comment
DakiLLa Posted May 17, 2014 Share Posted May 17, 2014 Try to set it's visibility to 'true' and then to 'false' like this (I skipped some code before): ... if getElementData(getPlayerTeam(p), "type") > 1 then setElementVisibleTo(radArea, p, true) setElementVisibleTo(radArea, p, false) end Link to comment
smw94 Posted May 17, 2014 Author Share Posted May 17, 2014 Try to set it's visibility to 'true' and then to 'false' like this (I skipped some code before): ... if getElementData(getPlayerTeam(p), "type") > 1 then setElementVisibleTo(radArea, p, true) setElementVisibleTo(radArea, p, false) end thanks bro, it solved 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