Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2024, 08:43:57 AM
Home Help Login Register
News: Zombie Master 2 discussion

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Annoying Custom Weapon Error
Pages: [1]
Author Topic: Annoying Custom Weapon Error  (Read 7405 times)
Apozen
Poster

Posts: 18


« on: February 11, 2012, 10:01:55 PM »

I get an error every time I add in this ak47:

if SERVER then
AddCSLuaFile( "shared.lua" )
end

if CLIENT then
  SWEP.PrintName = "AK47"
  SWEP.Slot      = 2 -- add 1 to get the slot number key

  SWEP.ViewModelFOV  = 72
  SWEP.ViewModelFlip = true
end

SWEP.CanBuy = {ROLE_INNOCENT, ROLE_DETECTIVE, ROLE_TRAITOR}
SWEP.Base = "weapon_tttbase"

SWEP.LimitedStock = false
SWEP.NoSights = false
SWEP.IsSilent = false
SWEP.AllowDelete = false
SWEP.AllowDrop = true

SWEP.HoldType = "ar2"

SWEP.Primary.Delay       = 0.08
SWEP.Primary.Recoil      = 1.9
SWEP.Primary.Automatic   = true
SWEP.Primary.Damage      = 13
SWEP.Primary.Cone        = 0.025
SWEP.Primary.Ammo        = "smg1"
SWEP.Primary.ClipSize    = 30
SWEP.Primary.ClipMax     = 60
SWEP.Primary.DefaultClip = 30
SWEP.Primary.Sound       = Sound( "Weapon_AK47.Single" )

SWEP.IronSightsPos = Vector( 6.05, -5, 2.4 )
SWEP.IronSightsAng = Vector( 2.2, -0.1, 0 )

SWEP.ViewModel  = "models/weapons/v_rif_ak47.mdl"
SWEP.WorldModel = "models/weapons/w_rif_ak47.mdl"
SWEP.Kind = WEAPON_HEAVY
SWEP.WeaponID = AMMO_AK47
SWEP.AutoSpawnable = true
SWEP.AmmoEnt = "item_ammo_smg1_ttt"
SWEP.InLoadoutFor = nil
SWEP.AllowDrop = true
SWEP.IsSilent = false
SWEP.NoSights = false

if CLIENT then
SWEP.EquipMenuData = {
     type = "Weapon",
 model="models/weapons/v_rif_ak47.mdl",
     desc = "An AK47. Pew Pew."
  };
  SWEP.Icon = "vgui/ttt/icon_lks_ak47"
end

Help would be appreciated. When I add it the gun it works, but it error's out the Traitor's menu, making the menu blank.
Tommynator
Poster

Posts: 173

Tommynator is a traitor!


« Reply #1 on: February 11, 2012, 10:19:54 PM »

Another one stealing from the cache.
I see the error, but I will not help stealers
sniperduck
Poster

Posts: 178


|:NxS:| Staff! :D


« Reply #2 on: February 11, 2012, 11:34:51 PM »

We don't take kindly to your kind here. -.-

Overtime these forums have made me an asshole. ;D (TTT subforum)
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27016
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: <COMING SOON>
Apozen
Poster

Posts: 18


« Reply #3 on: February 11, 2012, 11:48:27 PM »

I actually have no clue how to steal from caches, and never intend to.
I got this from pastebin and just wanted to fix it up.
I see otherwise now, thanks though.

EDIT: if I stole from a cache, don't you think it would have worked?
« Last Edit: February 11, 2012, 11:50:14 PM by Apozen »
sniperduck
Poster

Posts: 178


|:NxS:| Staff! :D


« Reply #4 on: February 12, 2012, 07:25:13 AM »

I actually have no clue how to steal from caches, and never intend to.
I got this from pastebin and just wanted to fix it up.
I see otherwise now, thanks though.

EDIT: if I stole from a cache, don't you think it would have worked?


We still dont take kindle to those who steal code in general. Anywho, why use this version of an AK when you can use the AK SCRIPT THAT BKU RELEASED!?

Overtime these forums have made me an asshole. ;D (TTT subforum)
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27016
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: <COMING SOON>
Apozen
Poster

Posts: 18


« Reply #5 on: February 12, 2012, 01:51:35 PM »

I wanted to see the error in this lua, even though I could use a working one at any moment.
I know BKU has a ak47 on his website in the custom weapons section, but again.
I'm sorry I 'stole' a code from pastebin that's nearly the same as any other ak47.
In advance, I do not see this going anywhere, and I apologize for any inconvenience.
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Annoying Custom Weapon Error « 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.01 seconds with 17 queries.