• SWEP not holstering?
    2 replies, posted
I have been working on a swep but for some reason it wont holster. Any ideas? Thanks! [CODE]if SERVER then AddCSLuaFile("shared.lua") end if CLIENT then SWEP.PrintName = "Test" SWEP.Slot = 3 SWEP.SlotPos = 3 SWEP.DrawAmmo = false SWEP.DrawCrosshair = false end SWEP.Base = "weapon_cs_base2" SWEP.Author = "Chizzzzz" SWEP.Instructions = "Bootiful" SWEP.Contact = "" SWEP.Purpose = "" SWEP.IconLetter = "" SWEP.ViewModelFOV = 62 SWEP.ViewModelFlip = false SWEP.AnimPrefix = "taser" SWEP.UseHands = false SWEP.Spawnable = false SWEP.AdminSpawnable = true SWEP.NextStrike = 0 SWEP.ViewModel = Model("models/weapons/v_Pistol.mdl") SWEP.WorldModel = Model("models/weapons/w_stunbaton.mdl") SWEP.Sound = Sound("weapons/stunstick/stunstick_swing1.wav") SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = 0 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = 0 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "" function SWEP:Deploy() end function SWEP:Holster() end function SWEP:OnRemove() end function SWEP:Initialize() end function SWEP:DoFlash(ply) end function SWEP:PrimaryAttack() if CLIENT then return end local trace = self.Owner:GetEyeTrace() if trace.Entity:IsPlayer() or trace.Entity:IsNPC() then local model = trace.Entity:GetModel() local ragdoll = ents.Create("prop_ragdoll") ragdoll:SetModel(model) ragdoll:SetPos(trace.Entity:GetPos()) ragdoll:Spawn() ragdoll:Activate() end end function SWEP:SecondaryAttack() end function SWEP:Reload() end[/CODE]
return true in Deploy and Holster functions.
Beautiful. Thanks!
Sorry, you need to Log In to post a reply to this thread.