Need a bit of help with a traitor weapon for TTT

-fixed-

Your type is wrong (Should be “Weapon” or “item_weapon” or something of this sort) -
You have SWEP.Icon twice in the code
You don’t have any of the TTT config values in there
There’s no CanBuy so ofc Traitors can’t buy it
You already get 10 shots when you get the sniper - That’s what DefaultClip is for, so SWEP:WasBought is useless

I’m a retard. lets see if that fixes the issue :stuck_out_tongue:

(plus it’s a sniper rifle so it shouldn’t really matter, of course it can be edited, which I’ll actually do, thanks for the point ^^)

Also here are the values (Set to my Silenced Rifle):


-- Kind specifies the category this weapon is in. Players can only carry one of
-- each. Can be: WEAPON_... MELEE, PISTOL, HEAVY, NADE, CARRY, EQUIP1, EQUIP2 or ROLE.
-- Matching SWEP.Slot values: 0      1       2     3      4      6       7        8
SWEP.Kind = WEAPON_EQUIP1

-- If AutoSpawnable is true and SWEP.Kind is not WEAPON_EQUIP1/2, then this gun can
-- be spawned as a random weapon. Of course this AK is special equipment so it won't,
-- but for the sake of example this is explicitly set to false anyway.
SWEP.AutoSpawnable = false

-- The AmmoEnt is the ammo entity that can be picked up when carrying this gun.
SWEP.AmmoEnt = "item_ammo_357_ttt"

-- CanBuy is a table of ROLE_* entries like ROLE_TRAITOR and ROLE_DETECTIVE. If
-- a role is in this table, those players can buy this.
SWEP.CanBuy = { ROLE_TRAITOR }

-- InLoadoutFor is a table of ROLE_* entries that specifies which roles should
-- receive this weapon as soon as the round starts. In this case, none.
SWEP.InLoadoutFor = nil

-- If LimitedStock is true, you can only buy one per round.
SWEP.LimitedStock = true

-- If AllowDrop is false, players can't manually drop the gun with Q
SWEP.AllowDrop = true

-- If IsSilent is true, victims will not scream upon death.
SWEP.IsSilent = true

-- If NoSights is true, the weapon won't have ironsights
SWEP.NoSights = false

Fucking hell. I’ve uploaded the wrong fucking file. Thanks for the help xD