Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
hekut146

Please help to adding new grenade in game (don't throw grenade)

Recommended Posts

Hi, when i add new grenade (in new addon) i don't throw (new grenade)

 
class CfgAmmo {

class GrenadeHand_stone; // External class reference
class MolotovCoctailAmmo : GrenadeHand_stone {
CraterEffects = "NoCrater";
explosionEffects = "GlassSmash";
soundHit[] = {"\z\addons\hapodha9i_coji9ihka_main\molotov\sounds\bottle_break_0", 0.5, 1, 60};
model = "\z\addons\hapodha9i_coji9ihka_main\molotov\models\molotov.p3d";
};

};
class CfgMagazines {

class HandGrenade_Stone; // External class reference
class MolotovCoctail : HandGrenade_Stone {
displayName = "Коктейль Молотова";
descriptionShort = "СтеклÑÐ½Ð½Ð°Ñ Ð±ÑƒÑ‚Ñ‹Ð»ÐºÐ° ÑÐ¾Ð´ÐµÑ€Ð¶Ð°Ñ‰Ð°Ñ Ð³Ð¾Ñ€ÑŽÑ‡ÑƒÑŽ жидкоÑть и запал.";
model = "\z\addons\hapodha9i_coji9ihka_main\molotov\models\molotov.p3d";
picture = "\dayz_equip\textures\equip_bottle_jd_ca.paa";
ammo = "MolotovCoctailAmmo";
};

};
class cfgWeapons {

class ThrowMuzzle;
class MolotovCocktailMuzzle : ThrowMuzzle {
displayName = "БроÑить";
magazines[] = {"MolotovCoctail"};
};

};

Why i don't have drop (throw) my grenade, i have this in code: displayName = "БроÑить"; //Throw
Please, say me, where my error? 

Thanks.

Share this post


Link to post
Share on other sites

Are you specifically giving the units the MolotovCocktailMuzzle weapon, or you just want to be able to throw the molotov magazine from the normal ThrowMuzzle weapon? If that is the case, add the magazine to the ThrowMuzzle instead of defining a new weapon class, unless you specifically wanted to only let some units use it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×