Jump to content

[PAID] Script with 3D sound


ReboX

Recommended Posts

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

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

Well, you want to modify Sound for every weapon?

You mean not like this? :oops:

  
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
Well, you want to modify Sound for every weapon?

You mean not like this? :oops:

  
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
Well, you want to modify Sound for every weapon?

You mean not like this? :oops:

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

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