• Weapon base NPC compatible?
    4 replies, posted
I'm trying to get the NPCs to be able to use DoD Source weapons. I was able to get them to hold and shoot the guns, but I get spammed with messages about the weapons base every time they shoot. I don't know if the base is just not NPC compatible or what. Is there an easy way to fix this? I'm using the "All WWII DoD Sweps" addon. this is the error [CODE] weapons/weapon_dod_base/shared.lua:449: attempt to call a nil value weapons/weapon_dod_base/shared.lua:449: attempt to call a nil value weapons/weapon_dod_base/shared.lua:449: attempt to call a nil value weapons/weapon_dod_base/shared.lua:449: attempt to call a nil value weapons/weapon_dod_base/shared.lua:449: attempt to call a nil value [/CODE] Edit: I get a weapon base error when using MadCows DoD sweps aswell.
Worshipper supplied me with the code to enable NPCs to shoot his guns. [Code] if (self.Owner:IsPlayer() and IsValid(self.Owner) and self.Owner:GetViewModel()) then self:IdleAnimation(self.Owner:GetViewModel():SequenceDuration() end [/Code]I replaced line 640 in the weapon base.
Oh yeah I supplied you the code to enable NPCs to shoot my guns? I didn't remember. And the line I gave you will not work with other weapons base. You should learn a little bit about LUA before you copy/past something. You'll just fucked up everything. I just add "If self.Owner:IsPlayer then". It removes the ability of a NPC to read the lines.
Way to be a dick. If you read that again.. I said that is the code for YOUR guns. [B]"to enable NPCs to shoot [U]HIS[/U] guns."[/B]
[QUOTE=Worshipper;19509050] And the line I gave you will not work with other weapons base.[/QUOTE]
Sorry, you need to Log In to post a reply to this thread.