• Garry's Mod PointShop issues
    0 replies, posted
Hi, I recently started trying to to install the lasermgun from workshop and I have it working but the only issue is I am trying to make it so that people can't pick that weapon up in TTT but only buy it, however if people can't pick it up, it does not show in the pointshop. Is there anyway around this? below is my shared.lua for the weapon [CODE]if SERVER then AddCSLuaFile( "shared.lua" ) end SWEP.HoldType = "ar2" if CLIENT then SWEP.PrintName = "MAC10" SWEP.Slot = 4 SWEP.Icon = "VGUI/ttt/icon_mac" end SWEP.Base = "weapon_tttbase" SWEP.Kind = WEAPON_HEAVY SWEP.WeaponID = AMMO_MAC10 SWEP.Primary.Damage = 12 SWEP.Primary.Delay = 0.065 SWEP.Primary.Cone = 0.03 SWEP.Primary.ClipSize = 30 SWEP.Primary.ClipMax = 60 SWEP.Primary.DefaultClip = 30 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "smg1" SWEP.Primary.Recoil = 1.15 SWEP.Primary.Sound = Sound( "Weapon_mac10.Single" ) SWEP.AutoSpawnable = false SWEP.AmmoEnt = "item_ammo_smg1_ttt" SWEP.UseHands = true SWEP.ViewModelFlip = false SWEP.ViewModelFOV = 54 SWEP.ViewModel = "models/weapons/v_minigun.mdl" SWEP.WorldModel = "models/weapons/w_minigun.mdl" SWEP.IronSightsPos = Vector(-8.921, -9.528, 2.9) SWEP.IronSightsAng = Vector(0.699, -5.301, -7) SWEP.DeploySpeed = 3 function SWEP:GetHeadshotMultiplier(victim, dmginfo) local att = dmginfo:GetAttacker() if not IsValid(att) then return 2 end local dist = victim:GetPos():Distance(att:GetPos()) local d = math.max(0, dist - 150) -- decay from 3.2 to 1.7 return 1.7 + math.max(0, (1.5 - 0.002 * (d ^ 1.25))) end [/CODE] [CODE]ITEM.Name = 'Laser Machine Gun' ITEM.Price = 0 ITEM.Model = 'models/weapons/w_minigun.mdl' ITEM.WeaponClass = 'weapon_ttt_lasermgun' ITEM.AllowedUserGroups = {"superadmin", "admin", "vip"} function ITEM:OnBuy(ply) ply:Give(self.WeaponClass) ply:SelectWeapon(self.WeaponClass) end function ITEM:OnHolster(ply) ply:StripWeapon(self.WeaponClass) end function ITEM:OnEquip(ply) ply:Give(self.WeaponClass) ply:SelectWeapon(self.WeaponClass) end[/CODE] Fixed the weaponclass [editline]29th May 2014[/editline] bump - supposed to be for VIP only.
Sorry, you need to Log In to post a reply to this thread.