Hello,
I am currently trying to create some extra SWEPs for the Traitors and Detectives but I have come to a problem.
The traitor can purchase the item and the credit is lost and it does say it was purchased, but it is not given to the player.
There is no lua error either which is quite odd, here's a little snippet of the code
if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
end
if ( CLIENT ) then
SWEP.PrintName = "The Big Boy"
SWEP.Slot = 6
SWEP.SlotPos = 0
SWEP.IconLetter = "i"
SWEP.ViewModelFlip = false
SWEP.EquipMenuData = {
type ="Weapon",
model="models/weapons/w_snip_awp.mdl",
desc="Do an unessecary headshot.\n"
};
SWEP.Icon = "VGUI/ttt/icon_bullet"
end
SWEP.Base = "weapon_tttbase"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.ViewModel = "models/weapons/v_snip_awp.mdl"
SWEP.WorldModel = "models/weapons/w_snip_awp.mdl"
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
SWEP.Primary.Sound = Sound( "weapons/AWP/awp1.wav" )
SWEP.Primary.Recoil = 6
SWEP.Primary.Damage = 115
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.008
SWEP.Primary.ClipSize = -1
SWEP.Primary.Delay = 1.0
SWEP.Primary.DefaultClip = -1
SWEP.DrawCrosshair = false
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.MuzzleVelocity = 800
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = true
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 1
SWEP.IsEquipment = true
SWEP.AllowDrop = true
SWEP.Kind = WEAPON_EQUIP
SWEP.LimitedStock = false
SWEP.CanBuy = {ROLE_TRAITOR}
Anyone notice a problem?