Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2024, 07:06:35 PM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Not giving purchased equipment?
Pages: [1]
Author Topic: Not giving purchased equipment?  (Read 2973 times)
Snowmang
Poster

Posts: 3


« on: April 26, 2010, 01:05:40 AM »

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?
llamalords
Poster

Posts: 23


« Reply #1 on: April 26, 2010, 05:18:18 AM »

Probably SWEP.IsEquipment I dunno though heres what I did that worked with my SWEP ammo despencer:

SWEP.Kind = WEAPON_EQUIP
SWEP.CanBuy = { ROLE_DETECTIVE }
SWEP.Icon = "VGUI/ttt/icon_nades"
SWEP.AllowDrop = true
 
SWEP.EquipMenuData = {
     type="Ammo Deployer",
     desc="Throw ammo at your friends!"
  };
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #2 on: April 26, 2010, 08:22:18 AM »

I already replied to your PM before I saw the thread, but for the record: there's a bug where your weapon's classname has to start with weapon_ttt or weapon_zm.
Snowmang
Poster

Posts: 3


« Reply #3 on: April 27, 2010, 02:37:33 AM »

Alright thanks, I realized that if I'm having this problem so are others so I might aswell ask publicly :)
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Not giving purchased equipment? « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.008 seconds with 17 queries.