Custom CS Base SWEP not working...

Hello everyone,
I made a CS Base SWEP in Lua, but it can’t shoot and has a flipped view model.
I am putting the code below. Thanks :slight_smile:


if ( SERVER ) then

	AddCSLuaFile( "shared.lua" )
	
	SWEP.HoldType			= "pistol"
	
end

if ( CLIENT ) then

	SWEP.PrintName	   = "S.P.Y 18"			
	SWEP.Author		   = "Olive Tech"
	SWEP.DrawAmmo      = false

	SWEP.Slot			= 1
	SWEP.SlotPos			= 1
	SWEP.IconLetter			= "A"
	
	local Color_Icon = Color( 255, 80, 0, 128 )
	killicon.AddFont( "weapon_usp", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) )

end

SWEP.Base			    = "weapon_cs_base"
SWEP.Category           = "Olive Tech"
SWEP.Spawnable			= true
SWEP.AdminSpawnable		= true

SWEP.ViewModel			= "models/weapons/v_pist_glock18.mdl"
SWEP.WorldModel			= "models/weapons/w_pist_glock18.mdl"

SWEP.Weight			= 3
SWEP.AutoSwitchTo		= false
SWEP.AutoSwitchFrom		= false

SWEP.Primary.Sound			= Sound( "Weapon_glock18.Single" )
SWEP.Primary.Recoil			= 2.0
SWEP.Primary.Damage			= 35
SWEP.Primary.NumShots		= 2
SWEP.Primary.Cone			= 0.03
SWEP.Primary.ClipSize		= 15
SWEP.Primary.Delay			= 0.7
SWEP.Primary.DefaultClip	= 48
SWEP.Primary.Automatic		= false
SWEP.Primary.Ammo			= "pistol"

SWEP.Secondary.ClipSize		= 15
SWEP.Secondary.DefaultClip	= 15
SWEP.Secondary.Automatic	= true
SWEP.Secondary.Ammo			= "pistol"


[editline]29th December 2012[/editline]

By the way, I DO have CSS installed, have it enabled in Gmod (no CSS weapons though), it is legal, and I am not getting any console errors. What could the problem be?

To my knowledge as of Gmod 13 the CS base no longer exists, so it could be that you’re deriving from a nonexistent base.