Bullyn Posted March 14, 2021 Share Posted March 14, 2021 (edited) 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 March 14, 2021 by Baguera Link to comment
Gustavo Freire Posted March 14, 2021 Share Posted March 14, 2021 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
Bullyn Posted March 14, 2021 Author Share Posted March 14, 2021 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 Lord Henry Posted March 15, 2021 Other Languages Moderators Share Posted March 15, 2021 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
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