Jump to content

[HELP] How to make this script?


Tokio

Recommended Posts

1 minute ago, Dimos7 said:

addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart) 
    if bodypart ==5 then
      playSound
      end 
    end) 

 

This play sound for killed player or localplayer?

Link to comment
addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart) 
    if bodypart == 9 then
local x,y,z = getElementPosition(localPlayer)
local sonido = playSound3D("files/yoursound.mp3", x, y, z)
attachElements (sonido,localPlayer, 0, 0, 0 )
setSoundVolume( sonido, 1 )
setSoundMinDistance(sonido, 1)
setSoundMaxDistance(sonido, 50)
      end 
    end) 

 

 

That will make the sound heard for the local player

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