Jump to content

x[استفسار]x اكواد تغيير الاصوات


yasin0

Recommended Posts

2 hours ago, Default said:

setWorldSoundEnabled
'onVehicleWeaponFire' -- https://wiki.multitheftauto.com/wiki/OnVehicleWeaponFire
playSound

 

سويته مشكور لكن ماعرف اطفي صوت المدفعية فا يختلط 

setWorldSoundEnabled ( 5, false )

 

Link to comment
6 minutes ago, Default said:

العفو حياك الله :)

حاولت اخلي الصوت يظهر بعد ثانيتين من اطلاق النار بس مانفع وش المشكلة 

function SoundEffect(gType,gVeh)
setWorldSoundEnabled ( 4, false )
playSound ("Wow.mp3", false )
end
addEvent('onClientVehicleWeaponFire')
addEventHandler('onClientVehicleWeaponFire',getLocalPlayer(),SoundEffect)
setTimer( SoundEffect, 5000, 1 )

الصوت يتكرر

Edited by yasin0
Link to comment

جرب كذا :

addEvent ( 'onClientVehicleWeaponFire', true )
addEventHandler ( 'onClientVehicleWeaponFire', root, function ( gType, gVeh )
setWorldSoundEnabled ( 4, false )
setTimer ( function (    )
        playSound ("Wow.mp3", false )
    end, 5000, 1 )
end )


armedVehicles = {[425]=true, [520]=true, [476]=true, [447]=true, [430]=true, [432]=true, [464]=true, [407]=true, [601]=true}
function vehicleWeaponFire(key, keyState, vehicleFireType)
    local vehModel = getElementModel(getPedOccupiedVehicle(localPlayer))
    if (armedVehicles[vehModel]) then
        triggerEvent("onClientVehicleWeaponFire", localPlayer, vehicleFireType, vehModel)
    end
end
bindKey("vehicle_fire", "down", vehicleWeaponFire, "primary")
bindKey("vehicle_secondary_fire", "down", vehicleWeaponFire, "secondary")

 

Edited by #,+( _xiRoc[K]; >
Link to comment
armedVehicles = {[425]=true, [520]=true, [476]=true, [447]=true, [430]=true, [432]=true, [464]=true, [407]=true, [601]=true}
function vehicleWeaponFire(key, keyState, vehicleFireType)
	local vehModel = getElementModel(getPedOccupiedVehicle(localPlayer))
	if (armedVehicles[vehModel]) then
		triggerEvent("onClientVehicleWeaponFire", localPlayer, vehicleFireType, vehModel)
	end
end
bindKey("vehicle_fire", "down", vehicleWeaponFire, "primary")
bindKey("vehicle_secondary_fire", "down", vehicleWeaponFire, "secondary")



addEvent ( "onClientVehicleWeaponFire" , true ) ; 
addEventHandler ( "onClientVehicleWeaponFire" , root , function ( _ , model )  
if ( model == 432 ) then 
setTimer (playSound,2000,1,"Wow.mp3");
end
end ) ; 

 

Link to comment
3 minutes ago, #,+( _xiRoc[K]; > said:

جرب كذا :


addEventHandler ( 'onClientVehicleWeaponFire', root, function ( gType, gVeh )
setTimer ( function (    )
    setWorldSoundEnabled ( 4, false )
        playSound ("Wow.mp3", false )
    end, 5000, 1 )
end )

addEvent ( 'onClientVehicleWeaponFire' )


armedVehicles = {[425]=true, [520]=true, [476]=true, [447]=true, [430]=true, [432]=true, [464]=true, [407]=true, [601]=true}
function vehicleWeaponFire(key, keyState, vehicleFireType)
    local vehModel = getElementModel(getPedOccupiedVehicle(localPlayer))
    if (armedVehicles[vehModel]) then
        triggerEvent("onClientVehicleWeaponFire", localPlayer, vehicleFireType, vehModel)
    end
end
bindKey("vehicle_fire", "down", vehicleWeaponFire, "primary")
bindKey("vehicle_secondary_fire", "down", vehicleWeaponFire, "secondary")

 

الصوت صار مايظهر

4 minutes ago, Default said:

armedVehicles = {[425]=true, [520]=true, [476]=true, [447]=true, [430]=true, [432]=true, [464]=true, [407]=true, [601]=true}
function vehicleWeaponFire(key, keyState, vehicleFireType)
	local vehModel = getElementModel(getPedOccupiedVehicle(localPlayer))
	if (armedVehicles[vehModel]) then
		triggerEvent("onClientVehicleWeaponFire", localPlayer, vehicleFireType, vehModel)
	end
end
bindKey("vehicle_fire", "down", vehicleWeaponFire, "primary")
bindKey("vehicle_secondary_fire", "down", vehicleWeaponFire, "secondary")



addEvent ( "onClientVehicleWeaponFire" , true ) ; 
addEventHandler ( "onClientVehicleWeaponFire" , root , function ( _ , model )  
if ( model == 432 ) then 
setTimer (playSound,2000,1,"Wow.mp3");
end
end ) ; 

 

شكرا ضبط

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