Jump to content

Oque tá errado aq ??


Recommended Posts

local mrk = createMarker(-2420.59448, -608.15979, 131.56250, "cylinder", 1.6, 255,0,0, 40)


addEventHandler("onClientKey", getRootElement(), function(button, press)
	if isElementWithinMarker( root, mrk ) then
		if button == "F1" or "F3" then
			cancelEvent()
		end
	end
end)

 

 

Oque q tá errado aq ?? alguém me ajuda

 

Edited by Baguera
Link to comment
local mrk = createMarker(-2420.59448, -608.15979, 131.56250, "cylinder", 1.6, 255,0,0, 40)


addEventHandler("onClientKey", getRootElement(), 
function(button, press)
	if isElementWithinMarker( source, mrk ) then
		if button == "F1" or "F3" then
			cancelEvent()
		end
	end
end)

Não testei mas veja se funciona

Link to comment
1 hour ago, Gustavo Freire said:

local mrk = createMarker(-2420.59448, -608.15979, 131.56250, "cylinder", 1.6, 255,0,0, 40)


addEventHandler("onClientKey", getRootElement(), 
function(button, press)
	if isElementWithinMarker( source, mrk ) then
		if button == "F1" or "F3" then
			cancelEvent()
		end
	end
end)

Não testei mas veja se funciona

Não funcionou, o script ta no Client

Link to comment
  • Other Languages Moderators
local mrk = createMarker (-2420.59, -608.16, 131.56, "cylinder", 1.6, 255, 0, 0, 40) -- Não é necessário coordenada com mais de 2 decimais.

addEventHandler ("onClientKey", root, function (button, press) -- root = getRootElement()
    if (isElementWithinMarker (localPlayer, mrk)) then -- Não se verifica root, verifique se localPlayer está no marker.
        if (button == "F1" or button == "F3") then -- or == "F3" não existe. Você precisa especificar o que é igual a F3 novamente.
            cancelEvent()
        end
    end
end)

 

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...