Jump to content

Barrack's Sirens


WhoAmI

Recommended Posts

Posted

Well guys,

I want to remove sirens from Barrack's truck, but removeVehicleSirens doesn't work for default gta's sirens. So i thought about turning off sirens, each time when player wants to turn them on. But there is question. How can I do that?

Posted (edited)
  
function sirens ( theVehicle, seat, jacked ) 
    if ( getElementModel ( theVehicle ) == 433 ) then  
         removeVehicleSirens( theVehicle ) 
        else 
        return 
    end 
end 
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), sirens ) 
  

Edited by Guest
Posted

Told you that this function doesn't work for default's GTA sirens, only on added by script.

Anyway, should be

removeVehicleSirens(theVehicle) 

instead.

Posted

I would've went for another approach to enable the default GTA horn. Check for how long the client pressed the key, if it was above a certain tick count, then just let them do the horn. I am not sure if this works though, as you have to toggle the control state and I guess MTA doesn't toggle controls in real-time if key is already being pressed before the key is available again... but it would be worth a shot.

Posted

Yes, but I am not talking about custom sounds, which you are using. I am talking about the same horn sound without any need to download sound files.

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