Arantes Posted May 19, 2020 Share Posted May 19, 2020 Gostaria de checar se há algum jogar no marker, sendo assim , avisando com um outputChatBox . local marker = createMarker (2493.1730957031, -910.67498779297, 125.1, "cylinder", 1.0, 255, 69, 0, 60 ) setTimer (function (theSource) if isElementWithinMarker(theSource, marker) then outputChatBox("Alguém esta no Marker!") end end, 500, 0, source) Mas estou tendo o seguinte erro : Bad argument 'isElementWithinMarker' [ Expected element at argument 1, got nill ] . Link to comment
Blaack Posted May 19, 2020 Share Posted May 19, 2020 Tente: local marker = createMarker (2493.1730957031, -910.67498779297, 125.1, "cylinder", 1.0, 255, 69, 0, 60 ) function verificacao() for i, player in ipairs(getElementsByType("player")) do --Verificação de todos os players do servidor if isElementWithinMarker(player, marker) then -- Verifica se algum player está no MK, se si: outputChatBox("Alguém esta no Marker!") end end end setTimer(verificacao, 500, 0) 1 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