Open sh4d0w59 opened 6 years ago
After digging around a bit more I think I've figured out what these numbers and arguments are. These are a lot of assumptions on my part as I don't know much about code. If someone could correct my mistakes, that would be nice.
"nzSpecialWeapons:AddGrenade( "nz_grenade" = this is the weapon class, 4 = this is the max amount of grenades you can carry, false = draw the act/animation in 3rd person???, 0.85 = time in seconds before the primary attack key is activated???, false = use a custom throw function???, 0.4 = time in seconds before the weapon is holstered after the attack key is activated)"
"nzSpecialWeapons:AddKnife( "nz_bowie_knife" = this is the weapon class, true = , 0.65 = time in seconds before the attack is initiated???, 2.5 = time in seconds before the weapon is holstered??? )"
nzSpecialWeapons:AddKnife( class, drawonequip, attackholstertime, drawholstertime )
nzSpecialWeapons:AddGrenade( class, ammo, drawact, throwtime, throwfunc, holstertime )
nzSpecialWeapons:AddSpecialGrenade( class, ammo, drawact, throwtime, throwfunc, holstertime )
Thanks for the help @lolleko . Managed to get some old??? code working from a person who previously attempted to add custom melee and grenades. The thing is, I'm erroring out when I buy the melees off of the wall and when a grenade is thrown for the first time. I'll post the error below and attempt to fix it if I can. If you guys wanna take a crack at it, be my guest.
[TFA Base] lua/weapons/tfa_gun_base/cl_mods.lua:86: bad argument #1 to 'LookupAttachment' (string expected, got table)
File exists in two addons - possible conflicts! lua/ulib/shared/hook.lua (ULib and TFA Base)
[ERROR] lua/weapons/tfa_gun_base/cl_mods.lua:247: bad argument #1 to 'ipairs' (table expected, got nil)
I've been digging around in the files looking for ways to make a grenade or melee weapon from a weapon pack a working special weapon and came across the file to do so, but I can't for the life of me figure out what the numbers and true/false arguments after the weapon class mean.
"nzSpecialWeapons:AddGrenade( "nz_grenade", 4, false, 0.85, false, 0.4 )" "nzSpecialWeapons:AddKnife( "nz_bowie_knife", true, 0.65, 2.5 )"