Jump to content

help


Actimel

Recommended Posts

Hi i want replace sounds for weapons but when i change weapon id because its custom weapons and doesnt work but when i put id 30 AK then works but not on the custom weapon

 

addEventHandler("onClientPlayerWeaponFire", getRootElement(), 
function ( weapon, ammo, ammoInClip ) 
                local x,y,z = getElementPosition(source) 
                if weapon == 1834 then 
                local sound = playSound3D("sounds/AK74.wav", x,y,z) 
                setSoundVolume(sound,10) 
                setSoundMaxDistance(sound,75) 
        end 
    end 
) 

can someone help?

Link to comment
addEventHandler("onClientPlayerWeaponFire", getRootElement(), 
function ( weapon, ammo, ammoInClip )
	outputChatBox(weapon)
	local x,y,z = getElementPosition(source) 
	if weapon == 1834 then 
		local sound = playSound3D("sounds/AK74.wav", x,y,z) 
		setSoundVolume(sound,10) 
		setSoundMaxDistance(sound,75) 
	end 
end) 

 

  • Like 1
Link to comment
9 minutes ago, NeXuS™ said:

addEventHandler("onClientPlayerWeaponFire", getRootElement(), 
function ( weapon, ammo, ammoInClip )
	outputChatBox(weapon)
	local x,y,z = getElementPosition(source) 
	if weapon == 1834 then 
		local sound = playSound3D("sounds/AK74.wav", x,y,z) 
		setSoundVolume(sound,10) 
		setSoundMaxDistance(sound,75) 
	end 
end) 

 

now when i shoot it doesnt make sounds but spawns in chat id or something

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