• error mad cow guns
    3 replies, posted
so ALMOST everytime u kill someone with mad cow guns they get this error? [ERROR] addons/madcow addon/lua/weapons/weapon_mad_base/shared.lua:719: Tried to use a NULL entity! 1. __index - [C]:-1 2. unknown - addons/madcow addon/lua/weapons/weapon_mad_base/shared.lua:719 how do i fix that
I'd have to see what's around line 719 in that lua file
Post lines 700-730 of weapon_mad_base's shared.lua
this is 704- 732 [CODE] self.Owner:MuzzleFlash() // Crappy muzzle light self.Owner:SetAnimation(PLAYER_ATTACK1) // 3rd Person Animation local effectdata = EffectData() effectdata:SetOrigin(self.Owner:GetShootPos()) effectdata:SetEntity(self.Weapon) effectdata:SetStart(self.Owner:GetShootPos()) effectdata:SetNormal(self.Owner:GetAimVector()) effectdata:SetAttachment(1) // Add a timer to solve this problem : in multiplayer, when you aim with the ironsights, tracers, effects, etc. still come from where the barrel is when you don't aim with ironsights if ((game.SinglePlayer() and SERVER) or CLIENT) then timer.Simple(0, function() if not IsValid(self.Owner) then return end if (not IsFirstTimePredicted() or not self.Owner:Alive())then return end if (self.Shotgun) then util.Effect("effect_mad_shotgunsmoke", effectdata) else util.Effect("effect_mad_gunsmoke", effectdata) end end) end // Shell eject //timer.Simple(self.ShellDelay, function() // if not self.Owner then return end // if not IsFirstTimePredicted() then return end // if not self.Owner:IsNPC() and not self.Owner:Alive() then return end[/CODE]
Sorry, you need to Log In to post a reply to this thread.