TTT Custom weapon help?

I’m rather new to lua, and I’ve been trying to make a SWep work with TTT. It’s a spartan kick. When I buy it from the traitor store, it gives me the weapon, although it’s in slot one (crowbar slot) and I can’t use it. This is the code. (ignore the icon stuff)

[lua] if( SERVER ) then
AddCSLuaFile( “shared.lua” );
end

if( CLIENT ) then
SWEP.PrintName = “Spartan Kick”;
end

SWEP.EquipMenuData = {
type = “Spartan KICK!”,
desc = “Kick people. :3”
};
SWEP.Base = “weapon_tttbase”
SWEP.Kind = WEAPON_HEAVY
SWEP.AutoSpawnable = true
SWEP.AmmoEnt = “item_ammo_spartanammo_ttt”
SWEP.InLoadoutFor = nil
SWEP.AllowDrop = true
SWEP.IsSilent = false
SWEP.NoSights = true
SWEP.Icon = “VGUI/ttt/icon_myserver_ak47”
SWEP.CanBuy = { ROLE_TRAITOR }
SWEP.LimitedStock = true

SWEP.Author = “Shot846”
SWEP.Instructions = “Spartan Kick! Cheats=Slowmo”
SWEP.Contact = “shot846@freemail.hu”
SWEP.Purpose = “THIS IS SPARTAAAAAAA!”

SWEP.ViewModelFOV = 75
SWEP.ViewModelFlip = false

SWEP.Spawnable = true
SWEP.AdminSpawnable = true

SWEP.NextStrike = 0;

SWEP.ViewModel = “models/weapons/v_kick.mdl”
SWEP.WorldModel = “”

-------------Primary Fire Attributes----------------------------------------
SWEP.Primary.Delay = 0.2 --In seconds
SWEP.Primary.Recoil = 0 --Gun Kick
SWEP.Primary.Damage = 15 --Damage per Bullet
SWEP.Primary.NumShots = 1 --Number of shots per one fire
SWEP.Primary.Cone = 0 --Bullet Spread
SWEP.Primary.ClipSize = 3 --Use “-1 if there are no clips”
SWEP.Primary.DefaultClip = 1 --Number of shots in next clip
SWEP.Primary.Automatic = true --Pistol fire (false) or SMG fire (true)
SWEP.Primary.Ammo = “none” --Ammo Type

util.PrecacheSound(“player/skick/madness.mp3”)
util.PrecacheSound(“player/skick/foot_kickwall.wav”)
util.PrecacheSound(“player/skick/foot_kickbody.wav”)
util.PrecacheSound(“player/skick/sparta.mp3”)
util.PrecacheSound(“player/skick/kick1.wav”)
util.PrecacheSound(“player/skick/kick2.wav”)
util.PrecacheSound(“player/skick/kick3.wav”)
util.PrecacheSound(“player/skick/kick4.wav”)
util.PrecacheSound(“player/skick/kick5.wav”)
util.PrecacheSound(“player/skick/kick6.wav”)

function SWEP:Initialize()
if( SERVER ) then
self:SetWeaponHoldType(“normal”);
end
self.Hit = {
Sound( “player/kick/foot_kickwall.wav” )};
self.FleshHit = {
Sound( “player/kick/kick1.wav” ),
Sound( “player/kick/kick2.wav” ),
Sound( “player/kick/kick3.wav” ),
Sound( “player/kick/kick4.wav” ),
Sound( “player/kick/kick5.wav” ),
Sound( “player/kick/kick6.wav” ) } ;

end

function SWEP:Precache()
end

function SWEP:Deploy()
self.Weapon:SendWeaponAnim( ACT_VM_IDLE );
return true;
end

function SWEP:PrimaryAttack()
if( CurTime() < self.NextStrike ) then return; end
self.Weapon:EmitSound(“player/skick/sparta.mp3”)
self.NextStrike = ( CurTime() + 3.5 );
timer.Simple( 1.80, function() self.AttackAnim(self) end)
timer.Simple( 2.40, function() self.Weapon:SendWeaponAnim( ACT_VM_IDLE ) end)
timer.Simple( 2.0, function() self.ShootBullets (self) end)
self.Owner:SetAnimation( PLAYER_ATTACK1 );
end

function SWEP:ShootBullets()
self.Weapon:EmitSound(“player/kick/foot_swing.wav”);
local trace = self.Owner:GetEyeTrace();
if trace.HitPos:Distance(self.Owner:GetShootPos()) <= 130 then
if( trace.Entity:IsPlayer() or trace.Entity:IsNPC() or trace.Entity:GetClass()==“prop_ragdoll” ) then
timer.Simple(0, function() game.ConsoleCommand("host_timescale 0.1
") end)
timer.Simple(0.5, function() game.ConsoleCommand("host_timescale 1
") end)
self.Owner:EmitSound( self.FleshHit[math.random(1,#self.FleshHit)] );
else
self.Owner:EmitSound( self.Hit[math.random(1,#self.Hit)] );
end
bullet = {}
bullet.Num = 5
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector(0.04, 0.04, 0.04)
bullet.Tracer = 0
bullet.Force = 450
bullet.Damage = 1000000
self.Owner:FireBullets(bullet)
end

if trace.Entity:GetClass() == "prop_door_rotating" then
 trace.Entity:EmitSound(Sound("physics/wood/wood_box_impact_hard3.wav"))
 trace.Entity:Fire("open", "", .001)
 trace.Entity:Fire("unlock", "", .001)
 local pos = trace.Entity:GetPos()
 local ang = trace.Entity:GetAngles()
 local model = trace.Entity:GetModel()
 local skin = trace.Entity:GetSkin()
 trace.Entity:SetNotSolid(true)
 trace.Entity:SetNoDraw(true)
 local function ResetDoor(door, fakedoor)
 door:SetNotSolid(false)
 door:SetNoDraw(false)
 fakedoor:Remove()
 end
 local norm = (pos - self.Owner:GetPos()):Normalize()
 local push = 1000000 * norm
 local ent = ents.Create("prop_physics")
 ent:SetPos(pos)
 ent:SetAngles(ang)
 ent:SetModel(model)
if(skin) then
  ent:SetSkin(skin)
end
 ent:Spawn()
 timer.Simple(.01, ent.SetVelocity, ent, push)               
 timer.Simple(.01, ent:GetPhysicsObject().ApplyForceCenter, ent:GetPhysicsObject(), push)
 timer.Simple(140, ResetDoor, trace.Entity, ent)

end

end

function SWEP:SecondaryAttack()
if( CurTime() < self.NextStrike ) then return; end
self.Weapon:EmitSound(“player/skick/madness.mp3”)
self.NextStrike = ( CurTime() + 2.9 );
end

function SWEP:AttackAnim()
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
end [/lua]

bump. c:

Can anybody help me?

Lol really? http://ttt.badking.net/custom-weapon-guide
I just how you a Little copy from my crafter weapon for TTT


   SWEP.Author = "[SC] Snorlax Jenkins"
   SWEP.PrintName                       = "Crafter"
   SWEP.Slot                            = 5

SWEP.Slot = 5 will result it in being in slot 6. I actually dont know why i think it is because Badking not want other then crowbar to be in slot 1
So your slot + 1. Slot = 5 + 1 = 6 but you just write 5 it Automatic adds 1 more on it