Jump to content
Sign in to follow this  
DSabre

simple weapon safety for vehicles

Recommended Posts

While trying to add a horn to my ships:

Found a simple way to add a safety to your vehicle weapon. 

The horn did not work for unknown reasons -  but it can works fine as weapon safety : )

 

class cfgWeapons

{

   class TruckHorn;   
    class xyz_weapon_safety : TruckHorn {displayname ="Safety";};

};

 

feel free to copy

 

PS: If anyone knows how to make a working horn, would be much appreciated.

  • Like 1

Share this post


Link to post
Share on other sites

Need more info to help with your horn issue..

Are you trying to add a completely new horn?

     

class cfgWeapons
{
	class TruckHorn;
	class yourhornclass: TruckHorn
	{
		displayname = "Ship Horn";
		reloadTime = 4;
		scope = 2;
		drySound[] = {"filepath_to_custom_sound", 1, 1, 200};
	};
};

then add

weapons[] = {"yourhornclass"};

into your ship's class under cfgVehicles

Share this post


Link to post
Share on other sites

The problem I had was that I did not get a sound. Did expect to hear the default horn.

I`ll try that and will try to find a free ship horn sound. many thanks.

Share this post


Link to post
Share on other sites

If that's the case you should be able to get away with just using

 

weapons[] = {"TruckHorn"};

 

I might take a closer look tonight

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×