Bullyn Posted March 14, 2021 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
Gustavo Freire Posted March 14, 2021 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
Bullyn Posted March 14, 2021 Author 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
Moderators Lord Henry Posted March 15, 2021 Moderators 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) Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
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