Jump to content

[ AJUDA ] source em setTimer


Recommended Posts

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

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)

 

  • Thanks 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...