ABR Posted January 26, 2023 Share Posted January 26, 2023 (edited) Quero fazer com que quando o player passar em cima de meu marker ele desse um efeito sonoro mas não sei utilizar o playSound e não sei vincular o lado Client e Server. Spoiler function Markerum(player) if veiculo[player] and isElement(veiculo[player]) then destroyElement(Marker1) setElementFrozen( veiculo[player], true) setTimer ( function() exports["[HS]Inventory_system_2"]:takeItem(player, 'cafe', 1) local Recompensa = math.random(500,3000) givePlayerMoney(player, Recompensa) setElementVisibleTo(Blip1, player, false) setElementVisibleTo(Blip2, player, true) setElementVisibleTo(Marker2, player, true) setElementFrozen( veiculo[player], false) exports["[HS]Notify_System"]:notify(player, 'Você entregou a pizza com sucesso, vá até o próximo local marcado em seu mapa', 'success') end, 5000, 1) triggerClientEvent (player, "MST.sendPlayerNotification", player, "Entregando...", "information", 5) end end addEventHandler("onMarkerHit", Marker1, Markerum) Edited January 27, 2023 by Lord Henry Código convertido de texto para Lua e colocado dentro de Spoiler devido ao excesso de linhas em branco. Link to comment
Moderators Vinyard Posted January 26, 2023 Moderators Share Posted January 26, 2023 Hi, Your thread has been moved to the Portuguese scripting section so you can get better assistance in your native language. Make sure to always use English when posting outside this language-specific section! 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