Jump to content
Sign in to follow this  
chronicsilence

Determining if weapon is primary, secondary, or handgun

Recommended Posts

If I have a Cfg name, such as "arifle_Katiba_F", I can get the config entry for it in CfgWeapons. Cool. Now, how do I determine whether a given Cfg is a primary, secondary, or handgun weapon? I've searched through the whole config class and I can't find any simple way to tell which type it is. Anyone know which property I'm looking for?

Thanks!

Share this post


Link to post
Share on other sites

_type=getNumber (configFile >> "CfgWeapons" >> "arifle_Katiba_F" >> "Type");

For a primary weapon it is 1, a handgun is 2 and a launcher is 3.

Share this post


Link to post
Share on other sites

Ah, cool. I was looking at that but I was confused because "hgun_PDW2000_F" has a type of 1, and I thought it was a handgun. Turns out it actually goes in the primary slot. Thanks!

---------- Post added at 11:49 ---------- Previous post was at 11:32 ----------

Update: looks like launchers (aka "secondary") is actually type=4. There's nothing in CfgWeapons with type=3;

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  

×