Jump to content

i want sound mod like headshot.mp3 onkill


Recommended Posts

hi

i want sound mod

for basemode

i mean when the palyer kill other player i hear the sound headshot on kill

pleeez who want make the script to me

i need this script

who want help me

this is the sound i want this sound on script

http://www.mediafire.com/?zfib82p8kf6dia8

for example this viedo show u the sound on kill player

https://www.youtube.com/watch?v=tcUlbohE ... re=related

i want this script i dont have time to learn lua

and sorry my for bad english

Link to comment

Put into the resource headshot sound (headshot.wav).

Now, open meta.xml and add this after the first line.

  
"headshot.wav" /> 
  

Open your client side script, and add this to "onClientPlayerWasted" event:

  
function someName ( killer, weapon, bodypart ) 
    if(killer == getLocalPlayer()) then 
        local sound = playSound("headshot.wav") 
    end 
end 
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), someName ) --add an event for the local player only 
  

Headshot sound: http://www.mediafire.com/?5v9m65rpajycmae

Link to comment
Put into the resource headshot sound (headshot.wav).

Now, open meta.xml and add this after the first line.

  
"headshot.wav" /> 
  

Open your client side script, and add this to "onClientPlayerWasted" event:

  
function someName ( killer, weapon, bodypart ) 
    if(killer == getLocalPlayer()) then 
        local sound = playSound("headshot.wav") 
    end 
end 
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), someName ) --add an event for the local player only 
  

Headshot sound: http://www.mediafire.com/?5v9m65rpajycmae

thank you very mutch i will test

and thank you agine for the replay and help

Link to comment

No, edit client.lua to this:

function someName ( killer, weapon, bodypart ) 
    if(killer == getLocalPlayer()) then return end 
    if bodypart == 9 then 
        local sound = playSound("headshot.wav",false) 
    end 
end 
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), someName ) 

I added a check to see if the kill wasn't suicide, and also the important thing checking if it was a head shot.

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