Jump to content
Sign in to follow this  
dragon zen

Who can give a brief intro to cfgWeapons??

Recommended Posts

Hey bros:

Nowadays I'm working on scripts such as selecting weapon, adding ammo. I want to find a brief introduction of cfgWeapon.

XXX >> XXX >> XXX, too much kinds of these, I don't know the meaning and relationship of them, so I seek for an intro of structure of cfg, especially cfgWeapon now. If I get the display name of magazine, what code should I write so that I can search it, locate it and then get more information about it? :confused:

Many more question. For example, there is a {_weapon >> "type"}, which number refer to which kinds of type, where can I learn this kind of thing? If I get new addons (for example ACE2), how can I view the weaponlist more easily?

In all, I don't know where can I learn these. It seems that wiki didn't provide this aspect of info??:butbut:

So, I appreciate if anyone can give some advice.

DragonZen

---------- Post added at 11:13 PM ---------- Previous post was at 11:09 PM ----------

Of course, learn from other's scripts, I can follow their code and do some things. But I still can't use it in a flexible way, so I want to know the structure of cfgWeapon pur se.

Share this post


Link to post
Share on other sites

Here are the configs in all their glory with ACE support:

http://browser.dev-heaven.net/configclasses/config/CfgWeapons

http://browser.dev-heaven.net/configclasses/config/CfgMagazines

How to get a magazine's display name:

_magname=getText (configFile/"CfgMagazines"/_mag/"displayname")

A weapon's type in config determines whether it's 0) not visibly wielded, 1) rifle, 2) sidearm, 4) launcher or 5) big rifle.

Edited by Celery

Share this post


Link to post
Share on other sites

What's more, there is a question about "isClass":

I still don't know how to check whether a weapon is access, just check weapon, not check Addons. how to write the isClass code?

Share this post


Link to post
Share on other sites
What's more, there is a question about "isClass":

I still don't know how to check whether a weapon is access, just check weapon, not check Addons. how to write the isClass code?

hintSilent format ["%1",isClass (configFile/"CfgWeapons"/"weaponclass")]

Share this post


Link to post
Share on other sites

OK, thanks, after I view the link you give me, I learn alot. :D

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  

×