dobrograd-13-06-2022/octolib/addon/lua/weapons/octolib_custom/init.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

40 lines
891 B
Lua

AddCSLuaFile 'shared.lua'
AddCSLuaFile 'cl_init.lua'
include 'shared.lua'
function SWEP:SetWorldModel(model, data)
self.WorldModel = model
self.WorldModelPos = data.pos or self.WorldModelPos
self.WorldModelAng = data.ang or self.WorldModelAng
local worldModel = { model = model }
table.Merge(worldModel, data)
self:SetNetVar('WorldModel', worldModel)
end
function SWEP:Initialize()
if not self:GetNetVar('WorldModel') then
self.WorldModelBodyGroups.BaseClass = nil -- WHAT THE FUCK?!
self:SetWorldModel(self.WorldModel, {
pos = self.WorldModelPos,
ang = self.WorldModelAng,
attachment = self.WorldModelAtt,
scale = self.WorldModelScale,
bones = self.WorldModelBones,
skin = self.WorldModelSkin,
bodyGroups = self.WorldModelBodyGroups,
})
end
end
function SWEP:Deploy()
self:SetHoldType(self.HoldType)
end
function SWEP:Holster()
return true
end