IIIIlllllIII Posted July 30, 2011 Share Posted July 30, 2011 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
Sharingan Posted August 2, 2011 Share Posted August 2, 2011 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
IIIIlllllIII Posted August 5, 2011 Author Share Posted August 5, 2011 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
IIIIlllllIII Posted August 5, 2011 Author Share Posted August 5, 2011 ok now i upload my script i dont know did i do the true pleeez check my script and tell me wrong or true http://www.mediafire.com/?53a5luht6wgd9c2 >>>> im arabic and this my first time to learn lua files script. Link to comment
JR10 Posted August 5, 2011 Share Posted August 5, 2011 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
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