Is it possible to add a silencer onto an ak47? if so what would i need to put in this file?
[CODE]if SERVER then
AddCSLuaFile( "shared.lua" )
end
if CLIENT then
SWEP.PrintName = "AK47"
SWEP.Slot = 6 -- add 1 to get the slot number key
SWEP.ViewModelFOV = 72
SWEP.ViewModelFlip = true
end
-- Always derive from weapon_tttbase.
SWEP.Base = "weapon_tttbase"
--- Standard GMod values
SWEP.HoldType = "ar2"
SWEP.Primary.Delay = 0.08
SWEP.Primary.Recoil = .50
SWEP.Primary.Automatic = true
SWEP.Primary.Damage = 25
SWEP.Primary.Cone = 0.025
SWEP.Primary.Ammo = "smg1"
SWEP.Primary.ClipSize = 30
SWEP.Primary.ClipMax = 90
SWEP.Primary.DefaultClip = 60
SWEP.IsSilent = true
SWEP.Primary.Sound = Sound( "weapons/m4a1/m4a1-1.wav" )
SWEP.Primary.SoundLevel = 75
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"
function SWEP:Deploy()
self.Weapon:SendWeaponAnim(ACT_VM_DRAW_SILENCED)
return true
end
SWEP.HeadshotMultiplier = 3
--- TTT config values
-- Kind specifies the category this weapon is in. Players can only carry one of
-- each. Can be: WEAPON_... MELEE, PISTOL, HEAVY, NADE, CARRY, EQUIP1, EQUIP2 or ROLE.
-- Matching SWEP.Slot values: 0 1 2 3 4 6 7 8
SWEP.Kind = WEAPON_HEAVY
-- If AutoSpawnable is true and SWEP.Kind is not WEAPON_EQUIP1/2, then this gun can
-- be spawned as a random weapon. Of course this AK is special equipment so it won't,
-- but for the sake of example this is explicitly set to false anyway.
SWEP.AutoSpawnable = false
-- The AmmoEnt is the ammo entity that can be picked up when carrying this gun.
SWEP.AmmoEnt = "item_ammo_smg1_ttt"
-- CanBuy is a table of ROLE_* entries like ROLE_TRAITOR and ROLE_DETECTIVE. If
-- a role is in this table, those players can buy this.
-- InLoadoutFor is a table of ROLE_* entries that specifies which roles should
-- receive this weapon as soon as the round starts. In this case, none.
-- If LimitedStock is true, you can only buy one per round.
-- If AllowDrop is false, players can't manually drop the gun with Q
SWEP.AllowDrop = true
-- If IsSilent is true, victims will not scream upon death.
SWEP.IsSilent = true
-- If NoSights is true, the weapon won't have ironsights
SWEP.NoSights = false
resource.AddFile("models/weapons/w_rif_ak47.mdl")
resource.AddFile("models/weapons/v_rif_ak47.mdl")
-- Equipment menu information is only needed on the client
if CLIENT then
-- Path to the icon material
SWEP.Icon = "VGUI/ttt/icon_ak47"
-- Text shown in the equip menu
SWEP.EquipMenuData = {
type = "Weapon",
desc = "AK47."
};
end[/CODE]
You can't have a silencer on the model without getting a custom model by default. You can make the sound silent by changing SWEP.Primary.Sound = Sound("soundfilehere")
[QUOTE=Sm63;42889938]You can't have a silencer on the model without getting a custom model by default. You can make the sound silent by changing SWEP.Primary.Sound = Sound("soundfilehere")[/QUOTE]
Actually you can always use SCK to put the model on the end requiring no modelling experience.
[QUOTE=Jarva;42890074]Actually you can always use SCK to put the model on the end requiring no modelling experience.[/QUOTE]
Yes, but I assume the OP is new to coding?
[QUOTE=Jarva;42890074]Actually you can always use SCK to put the model on the end requiring no modelling experience.[/QUOTE]
how would i go about to do this? and yes i am novice at coding
Sorry, you need to Log In to post a reply to this thread.