ReboX Posted February 3, 2014 Share Posted February 3, 2014 Hello I am looking for a scripter I am paying him to do the job, is this good I want that when a players shoot that 3D sound come who has a 2 side streets heard the shot, since I can edit the distance that can be heard the shot. (the sound of the shot will be changed, I'll spend a script already with the sounds and just by the sound in 3D) contact via skype: Brunelhos Link to comment
WASSIm. Posted February 3, 2014 Share Posted February 3, 2014 you mean change weapon sound ? Link to comment
ReboX Posted February 3, 2014 Author Share Posted February 3, 2014 you mean change weapon sound ? I've done it, I say put the 3D sound who are away from where the shooting will listen. Link to comment
manawydan Posted February 3, 2014 Share Posted February 3, 2014 just use setSoundMaxDistance Link to comment
Gtagasje Posted February 4, 2014 Share Posted February 4, 2014 Just use this; https://community.multitheftauto.com/index.php?p= ... includes=1 You can change the distance in the client.lua (default is 75) If you want different sounds you can just change the audio files in the sounds folder. If you want to remove sounds you just remove parts of the script; for example: elseif weapon == 22 then --pistol if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("sounds/weapon/pistole.wav", x,y,z) else local sound = playSound3D("sounds/weapon/pistole.wav", x,y,z) setSoundMaxDistance(sound, distance) end If you would remove that part the pistol wouldn't have a custom sound anymore. Link to comment
Snow-Man Posted February 4, 2014 Share Posted February 4, 2014 @ Gtagasje Distance not Definated at line 7 Link to comment
ReboX Posted February 4, 2014 Author Share Posted February 4, 2014 Just use this;https://community.multitheftauto.com/index.php?p= ... includes=1 You can change the distance in the client.lua (default is 75) If you want different sounds you can just change the audio files in the sounds folder. If you want to remove sounds you just remove parts of the script; for example: elseif weapon == 22 then --pistol if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("sounds/weapon/pistole.wav", x,y,z) else local sound = playSound3D("sounds/weapon/pistole.wav", x,y,z) setSoundMaxDistance(sound, distance) end If you would remove that part the pistol wouldn't have a custom sound anymore. I want to use every weapon at a distance "X" and I'm not getting .. I do not want the same distance for all weapons, could help me? Link to comment
Saml1er Posted February 4, 2014 Share Posted February 4, 2014 Well, you want to modify Sound for every weapon? You mean not like this? addEventHandler("onClientWeaponFire", getRootElement(), function (ammoInClip, reloadSoundEnabled) if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("sounds/weapon/pistole.wav", x,y,z) else local sound = playSound3D("sounds/weapon/pistole.wav", x,y,z) setSoundMaxDistance(sound, distance) end end ) Link to comment
TAPL Posted February 4, 2014 Share Posted February 4, 2014 Well, you want to modify Sound for every weapon?You mean not like this? addEventHandler("onClientWeaponFire", getRootElement(), function (ammoInClip, reloadSoundEnabled) if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("sounds/weapon/pistole.wav", x,y,z) else local sound = playSound3D("sounds/weapon/pistole.wav", x,y,z) setSoundMaxDistance(sound, distance) end end ) Note: This event is only for custom weapons that were created with createWeapon, for player held weapons use onClientPlayerWeaponFire. I don't know from where you got these parameters, but neither onClientWeaponFire nor onClientPlayerWeaponFire have these parameters. Link to comment
Saml1er Posted February 4, 2014 Share Posted February 4, 2014 Well, you want to modify Sound for every weapon?You mean not like this? addEventHandler("onClientWeaponFire", getRootElement(), function (ammoInClip, reloadSoundEnabled) if(ammoInClip == 0 and reloadSoundEnabled)then pistolReload("sounds/weapon/pistole.wav", x,y,z) else local sound = playSound3D("sounds/weapon/pistole.wav", x,y,z) setSoundMaxDistance(sound, distance) end end ) Note: This event is only for custom weapons that were created with createWeapon, for player held weapons use onClientPlayerWeaponFire. I don't know from where you got these parameters, but neither onClientWeaponFire nor onClientPlayerWeaponFire have these parameters. It was just an example to make him understand. 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