Bean666 Posted April 17, 2015 Share Posted April 17, 2015 hi guys , me and my friend made this script and he needs help cause he doesnt have an account here , this script will make the rhino fire and reload make sounds , but the problem is the sound doesnt play any help? code: function rhinoFire() if isPedInVehicle ( localPlayer ) and not isCursorShowing() then local veh = getPedOccupiedVehicle ( localPlayer ) if (veh) then if ( getElementModel ( veh ) == 432 ) and (getPedControlState(localPlayer, "vehicle_fire") == true) then local fireSound = playSound ("rhino_fire.wav") setSoundMaxDistance(fireSound, 50) soundTimer = setTimer(function() local sound = playSound("rhino_reload.wav") setSoundVolume(sound, 0.5) end, 1000, 1) end end end end addEventHandler("onClientVehicleEnter", getRootElement(), rhinoFire) Link to comment
dugasz1 Posted April 17, 2015 Share Posted April 17, 2015 The function only starts when you enter a vehicle(onClientVehicleEnter) you should change the eventhandler to onClientClick 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