Cristtk Posted March 15, 2020 Share Posted March 15, 2020 Ola, tem como desativar os sons originais das armas por meio de script ? Se sim poderia me dizer como fazer. Desde ja agradeço. Link to comment
raynner Posted March 15, 2020 Share Posted March 15, 2020 Sim é possível use setWorldSoundEnabled 1 1 Link to comment
Cristtk Posted March 16, 2020 Author Share Posted March 16, 2020 function toggleWeaponSounds_f ( ) local enabled = isWorldSoundEnabled ( 5 ) enabled = not enabled local state = "enabled" if ( not enabled ) then state = "disabled" end -- setWorldSoundEnabled ( 5, enabled ) outputChatBox ( "Weapon sounds " .. state ) end addCommandHandler ( "toggleweaponsounds", toggleWeaponSounds_f ) Com comando funciona, mas como faço pra ativar automático sem usar comando? Tipo ligo o mod e ja desativa os sons sem comando. E como faço pro mod funcionar pra todo mundo, desativar o audio de todo mundo? Desde ja agradeço. Link to comment
Angelo Pereira Posted March 16, 2020 Share Posted March 16, 2020 Utilize o Evento "onClientResourceStart" do lado do client-side : addEventHandler("onClientResourceStart", resourceRoot, function() -- Adicione o Script ... end) 1 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