Files
wnsrc/lua/pac3/extra/shared/pac_weapon.lua
lifestorm 73479cff9e Upload
2024-08-04 22:55:00 +03:00

99 lines
2.1 KiB
Lua

--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
do return end
local SWEP = {Primary = {}, Secondary = {}}
SWEP.Author = "CapsAdmin"
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = ""
SWEP.PrintName = "pac weapon"
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
SWEP.ViewModel = "models/weapons/v_pistol.mdl"
SWEP.WorldModel = "models/weapons/w_pistol.mdl"
SWEP.DrawWeaponInfoBox = true
SWEP.Base = "weapon_base"
SWEP.SlotPos = 1
SWEP.Slot = 1
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.AutoSwitchTo = true
SWEP.AutoSwitchFrom = true
SWEP.Weight = 1
SWEP.HoldType = "normal"
SWEP.Primary.ClipSize = 10
SWEP.Primary.DefaultClip = 10
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "pistol"
SWEP.Secondary.ClipSize = 10
SWEP.Secondary.DefaultClip = 10
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "pistol"
function SWEP:OnDrop()
end
function SWEP:GetViewModelPosition(pos, ang)
return pos, ang
end
function SWEP:TranslateActivity(act)
return act
end
function SWEP:Deploy()
return true
end
function SWEP:Initialize() end
function SWEP:DrawHUD() end
function SWEP:PrintWeaponInfo() end
function SWEP:DrawWeaponSelection(x,y,w,t,a) end
function SWEP:DrawWorldModel() return true end
function SWEP:CanPrimaryAttack() return true end
function SWEP:CanSecondaryAttack() return true end
function SWEP:Reload() return false end
function SWEP:Holster() return true end
function SWEP:ShouldDropOnDie() return false end
weapons.Register(SWEP, "pac_weapon", true)
if CLIENT then
local BUILDER, PART = pac.PartTemplate("base")
PART.ClassName = "weapon"
BUILDER:StartStorableVars()
for key, val in pairs(SWEP) do
if not istable(val) and not isfunction(val) then
BUILDER:GetSet(key, val)
end
end
for key, val in pairs(SWEP.Primary) do
BUILDER:GetSet("Primary"..key, val)
end
for key, val in pairs(SWEP.Secondary) do
BUILDER:GetSet("Secondary"..key, val)
end
BUILDER:EndStorableVars()
BUILDER:Register()
end