I was checking the Garry’s Mod wikia and found that in the TTT section there is a list of common weapons.
One of the weapons was something called a Golden Gun, basically its a Detective weapon, one shot, if it hits an Innocent then nothing happens.
If it hits a Traitor then they instantly die, I know, amazing right?!
Is this a custom weapon for servers with hardcore coders or is this something you can find and download?
If you want to check for yourself, here is the link to the wikia ====> http://gmod.wikia.com/wiki/Trouble_in_Terrorist_Town
Thanks to anyone who could help out
if SERVER then
AddCSLuaFile( "shared.lua" )
end
SWEP.HoldType = "pistol"
if CLIENT then
SWEP.PrintName = "Golden Gun"
SWEP.Author = "TTT"
SWEP.Slot = 6
SWEP.SlotPos = 0
SWEP.EquipMenuData = {
type="Weapon",
model="models/weapons/w_pist_usp.mdl",
desc="Shoot a traitor, instant kill.
Shoot an innocent, you die.
Now wouldn't that be a waste?"
};
//SWEP.Icon = "something"
end
SWEP.Base = "weapon_tttbase"
SWEP.Primary.Recoil = 1.3
SWEP.Primary.Damage = 1
SWEP.Primary.Delay = 0.25
SWEP.Primary.Cone = 0.02
SWEP.Primary.ClipSize = 1
SWEP.Primary.Automatic = true
SWEP.Primary.DefaultClip = 1
SWEP.Primary.ClipMax = 1
SWEP.Primary.Ammo = "RPG_Round"
SWEP.Kind = WEAPON_EQUIP
SWEP.CanBuy = {ROLE_DETECTIVE} -- only detectives can buy
SWEP.WeaponID = AMMO_GOLDPISTOL
SWEP.LimitedStock = true
SWEP.AmmoEnt = nil
SWEP.IsSilent = false
SWEP.ViewModel = "models/weapons/v_pist_fiveseven.mdl"
SWEP.WorldModel = "models/weapons/w_pist_fiveseven.mdl"
SWEP.Primary.Sound = Sound( "Weapon_Deagle.Single" )
SWEP.Primary.SoundLevel = 500
SWEP.IronSightsPos = Vector(1.159, 0, -1)
SWEP.IronSightsAng = Vector(0, 0, 0)
SWEP.PrimaryAnim = ACT_VM_PRIMARYATTACK
SWEP.ReloadAnim = ACT_VM_RELOAD
function SWEP:Deploy()
//self.Weapon:SetMaterial("models/deagle_skin1.vtf")
self.Weapon:SendWeaponAnim(ACT_VM_DRAW)
return true
end
function SWEP:PrimaryAttack()
if not self:CanPrimaryAttack() then return end
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
local trace = util.GetPlayerTrace(self.Owner)
local tr = util.TraceLine(trace)
if tr.Entity:IsPlayer() then
if tr.Entity:IsRole(ROLE_TRAITOR) then
bullet = {}
bullet.Num = 1
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector(0, 0, 0)
bullet.Tracer = 0
bullet.Force = 3000
bullet.Damage = 4000
self.Owner:FireBullets(bullet)
self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
self:TakePrimaryAmmo(1)
self.Weapon:EmitSound(Sound( "Weapon_Deagle.Single" ))
end
if tr.Entity:IsRole(ROLE_INNOCENT) or tr.Entity:IsRole(ROLE_DETECTIVE) then
self.Owner:Kill()
self.Weapon:EmitSound(Sound( "Weapon_Deagle.Single" ))
self:TakePrimaryAmmo(1)
end
end
self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
self:TakePrimaryAmmo(1)
self.Owner:EmitSound(Sound( "Weapon_Deagle.Single" ))
end
function SWEP:WasBought(buyer)
if IsValid(buyer) then
// buyer:GiveAmmo( 1, "RPG_Round" )
end
end