rnThe system is based on standard weapons. We take the index of the essence of the weapon in your hands, and set the weapon code .
rnThe technology by which I do this is spied on in the systems of ZombieMod CS 1.6, and KORD_172 Weaponmod and else plugins.
rn
idx_wpn = Id in m_pActiveItemrnentity_set_int(idx_wpn, EV_INT_iuser4, i)
rn
rnDemo video in YouTube
rn
rnAfter setting clip ammo, hud and models, start the registration of the Primary and Secondary attacks takes place, during which the substitution of the function takes place:
rnsound overlay (if available) / changing the attack speed
rnor if this is a special type of weapon that does not exist by default, then virtual functions are launched that simulate an attack in which you yourself prescribe a script.
rnAn important feature of this option is reading parameters from a text file, which contains a list of weapons, their characteristics and everything that is needed is written to a multidimensional array with pointers. now we don't need to produce countless plugins, because here we can set a flexible configuration.
rn
rnThe special code is the line number in the text . this eliminates the iteration of the search for strings with matches of special code. because this is a direct link. so be careful.
rnthe plugin already provides a system of submodels in advance, you can assign 1 model file and specify the submodel number in a text file, or use unique models. the plugin already works in two modes automatically.
rnAnimations and sounds of the player will be used on the basis of standard weapons that you choose as a reference base. HUD cartridges of whatever you wish from the whole list. the rest is much broader. I repeat, or you specify a special type of weapon, but this can be provided with a special type of attack.In general, the plugin architecture is very similar to the weapons system in Quake 1.
rn
rnToday, the plugin has a lot of holes and inaccuracies, and I need the help of experienced coders. I built the plugin on my knee, and every time I improve and optimize it, I would like feedback and help. we need to speed up some functions and data processing. Perhaps somewhere you should make additional checks and interrupt with a return

