Jump to content

Sound doesnt work?


Bean666

Recommended Posts

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

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