I make a Swep but confuse models

SO now i wanto make a pack of glocks, which i get from FPSBANANA.com so i get 2 of them, but the models and materials are the same names and i wanto make them 2 different sweps how do i do it?

Change the name probably?

Hexing. Search that word on the forums.

Changing the name isn’t enough, you gotta hex them.

Links here:


Ninja’d, but links still valid

BUt thats to HEX a world model I WANT A VIEW MODEL


WAIT i think i just have to do the same with the V_model as i did with the w_model (i looked at that tut esalaka) I will go look if it works and if it does i will be back.


BUT now the sound i need because its silenced?!!?!?


the sound of the gun is Glock but the other is different and its called glock aswell but now i need it to be different, it works with model names.SO NOW WHAT?

Sound names can be changed without hexing or anything :slight_smile:

But now when i wanto change the sound name what will it be?
[lua]if( SERVER ) then
AddCSLuaFile( “shared.lua” );

if( CLIENT ) then
SWEP.PrintName = “Glock2”
SWEP.Slot = 2
SWEP.SlotPos = 2
SWEP.HoldType = “pistol”
SWEP.DrawCrosshair = true
SWEP.Author = “SPYNeox”
SWEP.IconLetter = “d”

SWEP.Base = “weapon_cs_base” – The Base File, Dont Touch This
SWEP.ViewModelFlip = true – Which Side The Gun Is On, When Testing, Change If Necessary
SWEP.Category = “SPYNeox”

SWEP.Spawnable = false – Weather Everybody Can Spawn The Swep
SWEP.AdminSpawnable = true – If ADMIN Can Spawn, <note> if you want a admin only, set {SWEP.Spawnable}
– to false, and admin to true

SWEP.ViewModel = “addons/SPYs_Sweps/models/weapons/v_pist_glock22.mdl” – what it looks like <refer to model names> READ THE NOTE AT THE TOP IT
SWEP.WorldModel = “addons/SPYs_Sweps/models/weapons/w_pist_glock22.mdl” – what it looks like <refer to model names> READ THE NOTE AT THE TOP IT

SWEP.Weight = 3 – No Need To Change
SWEP.AutoSwitchTo = true – If When You Spawn, It Automaticly Switches To It
SWEP.AutoSwitchFrom = true – Dont Know, Opposite Mayby

SWEP.ForceApply = 3 – Amount of force to give to phys objects
SWEP.TracerFreq = 5 – Show a tracer on every x bullets

SWEP.Primary.Sound = Sound( “addons/Weapon_glock.Single” ) – Sound Of The Swep <refer to model names>
SWEP.Primary.Recoil = 0 – Recoil, How Much It Pushes Back
SWEP.Primary.Damage = 2 – Damage Of Each Shot
SWEP.Primary.NumShots = 1 – How Many Bullets Come Out Of The Gun At Once, A Shotgun Is 5 Where A Normal Gun Is 1
SWEP.Primary.Cone = 0.03 – Spread, A Shotgun Is 0.1, A Normal Gun Is Around 0.03
SWEP.Primary.ClipSize = 16 – How Many Bullets In A Clip
SWEP.Primary.Delay = 0.5 – Time Inbetween Each Bullet(s), In Seconds
SWEP.Primary.DefaultClip = 21 – Ammo You Got Left
SWEP.Primary.Automatic = false – Auto Or Not
SWEP.Primary.Ammo = “pistol” – Type Of Ammo,No Need To Change

SWEP.IronSightsPos = Vector (3.5871, -3.3539, -0.2616)
SWEP.IronSightsAng = Vector (-0.0429, -0.0022, 0.1656)[/lua]


As u see the glock.single is the original glock but now the other silenced one is also glock and look at the Model name its my hexed glock so what will the sound name be?

SWEP.ViewModel = “models/weapons/v_pist_glock22.mdl”
**SWEP.WorldModel = “models/weapons/w_pist_glock22.mdl” **
**SWEP.Primary.Sound = Sound( “Weapon_glock.Single” ) **

The sound name can be whatever you want, its just whatever the name of it is it has to be the same in the shared.lua for the swep.
The things bolded up above there did not have to have the addons/ part to the file path.
Also, I suggest you take a look at this and see how it works.

SO then it must be
SWEP.Primary.Sound = Sound( “Weapon_glock22.Single” ) ?
if its like this:
SWEP.Primary.Sound = Sound( “Weapon_glock.Single” ) it will collide with the normal glock sounds

Do you have a sound called Weapon_glock22.Single? It’s not going to spontaneously appear out of thin air, you know…

Unless you are adding “weapon_glock22.sinlge” in the scripts folder,
(some file in there, but thats irelivant right now)

Your going to have to put the directory to that file, excluding “garrysmod/garrysmod/sounds”
EX: “weapons/shotgun/shotgun_fire7.wav”