Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ITEM.Name = "HK45C"
- ITEM.Price = 10000
- ITEM.Model = "models/weapons/w_hk45c.mdl"
- ITEM.SingleUse = false
- function ITEM:OnEquip(ply)
- --hook.Add("TTTBeginRound", "loadoutsec", function()
- for _, k in pairs(ply:GetWeapons()) do
- local wepclass = k:GetClass()
- local weptable = weapons.Get(wepclass)
- if weptable.Kind == WEAPON_PISTOL then --WEAPON_HEAVY if primary weapon, WEAPON_PISTOL if secondary.
- ply:StripWeapon(wepclass)
- end
- end
- if IsValid(ply) and ply:Alive() then
- ply:Give(self.WeaponClass)
- timer.Simple(1, function()
- ply:GiveAmmo( weapons.Get(self.WeaponClass).Primary.ClipMax, weapons.Get(self.WeaponClass).Primary.Ammo, false )
- end )
- end
- --end)
- end
- function ITEM:OnSell(ply)
- --hook.Remove("loadoutsec")
- end
- function ITEM:OnHolster(ply)
- --hook.Remove("loadoutsec")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement