• Black Mesa mp5 SWEP textures and LUA help
    0 replies, posted
Hi, I'm the Coldsnap Leader, creator of the Black Mesa mp5 SWEP and i have been having trouble finding ways to fix the textures for the v_model, w_model, and grenades. Do you know anything to fix textures? I also need a bit of help on the LUA. Please tell me if there are any errors. here's the LUA code: -- Swep Creator - The Coldsnap Leader // Made By Black Mesa Mod Development Team //General Settings \\ SWEP.AdminSpawnable = true // Is the swep spawnable for admin SWEP.ViewModelFOV = 94 // How much of the weapon do u see ? SWEP.ViewModel = "models/weapons/v_mp5/v_mp5.mdl" // The viewModel, the model you se when you are holding it-.- SWEP.WorldModel = "models/weapons/w_mp5/w_mp5.mdl" // The worlmodel, The model yu when it's down on the ground SWEP.AutoSwitchTo = false // when someone walks over the swep, chould i automatectly change to your swep ? SWEP.Slot = 2 // Deside wich slot you want your swep do be in 1 2 3 4 5 6 SWEP.HoldType = "ar2" // How the swep is hold Pistol smg greanade melee SWEP.PrintName = "Black Mesa MP5" // your sweps name SWEP.Author = "The Coldsnap Leader" // Your name SWEP.Spawnable = true // Can everybody spawn this swep ? - If you want only admin keep this false and adminsapwnable true. SWEP.AutoSwitchFrom = false // Does the weapon get changed by other sweps if you pick them up ? SWEP.FiresUnderwater = true // Does your swep fire under water ? SWEP.Weight = 3 // Chose the weight of the Swep SWEP.DrawCrosshair = true // Do you want it to have a crosshair ? SWEP.Category = "Black Mesa" // Make your own catogory for the swep SWEP.SlotPos = 2 // Deside wich slot you want your swep do be in 1 2 3 4 5 6 SWEP.DrawAmmo = true // Does the ammo show up when you are using it ? True / False SWEP.ReloadSound = "reload.wav" // Reload sound, you can use the default ones, or you can use your one; Example; "sound/myswepreload.waw" SWEP.Instructions = "Primary: fire bullets. Secondary: launch grenade" // How do pepole use your swep ? SWEP.Contact = "YourMailAdress" // How Pepole chould contact you if they find bugs, errors, etc SWEP.Purpose = "WhatsThePurposeOfThisSwep" // What is the purpose with this swep ? SWEP.base = "weapon_base" //General settings\\ //PrimaryFire Settings\\ SWEP.Primary.Sound = "single2.wav" // The sound that plays when you shoot :] SWEP.Primary.Damage = 10 // How much damage the swep is doing SWEP.Primary.TakeAmmo = 1 // How much ammo does it take for each shot ? SWEP.Primary.ClipSize = 30 // The clipsize SWEP.Primary.Ammo = "pistol" // ammmo type pistol/ smg1 SWEP.Primary.DefaultClip = 120 // How much ammo does the swep come with `? SWEP.Primary.Spread = 0.2 // Does the bullets spread all over, if you want it fire exactly where you are aiming leave it o.1 SWEP.Primary.NumberofShots = 1 // How many bullets you are firing each shot. SWEP.Primary.Automatic = true // Is the swep automatic ? SWEP.Primary.Recoil = 1 // How much we should punch the view SWEP.Primary.Delay = 0.1 // How long time before you can fire again SWEP.Primary.Force = 10 // The force of the shot //PrimaryFire settings\\ //SecondaryProp Settings\\ SWEP.Secondary.NumberofShots = 1 // How many props are you firing for each shot SWEP.Secondary.Force = 100 // The props force. SWEP.Secondary.Spread = 0.1 // How much does the props spread ? SWEP.Secondary.Sound = "double.wav" // Sound for the swep.. SWEP.Secondary.DefaultClip = 3 // ClipSize SWEP.Secondary.Automatic = false // Is it automatic ? SWEP.Secondary.AngVelocity = Angle(0,0,0) // Scary Stuff, Dont look at it ! SWEP.Secondary.Ammo = "smg1_grenade" // ammo, Leave this as pistol SWEP.Secondary.Model = "models/weapons/mp5 grenade/w_mp5grenade.mdl" // the model you want to fire. SWEP.Secondary.Recoil = 2 // How much we should punch the view SWEP.Secondary.Delay = 0.5 // How much time before you can fire again SWEP.Secondary.TakeAmmo = 1 // Ammo each shot take SWEP.Secondary.ClipSize = 3 // ClipSize SWEP.Secondary.Damage = 75 // Damage of the prop -.- //SecondaryProp Settings \\ -- Just leave this stuff untouched :) //SWEP:Initialize()\\ function SWEP:Initialize() util.PrecacheSound(self.Primary.Sound) util.PrecacheSound(self.Secondary.Sound) if ( SERVER ) then self:SetWeaponHoldType( self.HoldType ) end end //SWEP:Initialize()\\ //SWEP:PrimaryFire()\\ function SWEP:PrimaryAttack() if ( !self:CanPrimaryAttack() ) then return end local bullet = {} bullet.Num = self.Primary.NumberofShots bullet.Src = self.Owner:GetShootPos() bullet.Dir = self.Owner:GetAimVector() bullet.Spread = Vector( self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0) bullet.Tracer = 0 bullet.Force = self.Primary.Force bullet.Damage = self.Primary.Damage bullet.AmmoType = self.Primary.Ammo local rnda = self.Primary.Recoil * -1 local rndb = self.Primary.Recoil * math.random(-1, 1) self:ShootEffects() self.Owner:FireBullets( bullet ) self.Weapon:EmitSound(Sound(self.Primary.Sound)) self.Owner:ViewPunch( Angle( rnda,rndb,rnda ) ) self:TakePrimaryAmmo(self.Primary.TakeAmmo) self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) self.Weapon:SetNextSecondaryFire( CurTime() + self.Primary.Delay ) end //SWEP:PrimaryFire()\\ //SWEP:SecondaryFire()\\ function SWEP:SecondaryAttack() self:TakePrimaryAmmo(self.Secondary.TakeAmmo) self:Throw_Attack (self.Secondary.Model, self.Primary.Sound, self.Secondary.AngVelocity) self.Weapon:SetNextPrimaryFire( CurTime() + self.Secondary.Delay ) self.Weapon:SetNextSecondaryFire( CurTime() + self.Secondary.Delay ) end //SWEP:SecondaryFire()\\ //SWEP:Throw_Attack(Model, Sound, Angle)\\ function SWEP:Throw_Attack (Model, Sound, Angle) local tr = self.Owner:GetEyeTrace() self.Weapon:EmitSound (Sound) self.BaseClass.ShootEffects (self) if (!SERVER) then return end local ent = ents.Create ("prop_physics") ent:SetModel (Model) ent:SetPos (self.Owner:EyePos() + (self.Owner:GetAimVector() * 16)) ent:SetAngles (self.Owner:EyeAngles()) ent:Spawn() local phys = ent:GetPhysicsObject() local shot_length = tr.HitPos:Length() phys:ApplyForceCenter (self.Owner:GetAimVector():GetNormalized() * math.pow (shot_length, 7)) phys:AddAngleVelocity(Angle) cleanup.Add (self.Owner, "props", ent) undo.Create ("Thrown model") undo.AddEntity (ent) undo.SetPlayer (self.Owner) undo.Finish() local eyetrace = self.Owner:GetEyeTrace() self:EmitSound ( self.Secondary.Sound ) //Adds sound self:ShootEffects() local explode = ents.Create("env_explosion") explode:SetPos( eyetrace.HitPos ) //Puts the explosion where you are aiming explode:SetOwner( self.Owner ) //Sets the owner of the explosion explode:Spawn() explode:SetKeyValue("iMagnitude","175") //Sets the magnitude of the explosion explode:Fire("Explode", 0, 0 ) //Tells the explode entity to explode explode:EmitSound("explode_7.wav", 400, 400 ) //Adds sound to the explosion end //Throw_Attack(Model, Sound, Angle)\\ oh and I also forgot, PLEASE REPLY!!
Sorry, you need to Log In to post a reply to this thread.