add sborka
This commit is contained in:
15
garrysmod/addons/tfa_base/lua/tfa/modules/tfa_bodygroups.lua
Normal file
15
garrysmod/addons/tfa_base/lua/tfa/modules/tfa_bodygroups.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local sp = game.SinglePlayer()
|
||||
|
||||
hook.Add("PlayerSwitchWeapon", "TFA_Bodygroups_PSW", function(ply, oldwep, wep)
|
||||
if not IsValid(wep) or not wep.IsTFAWeapon then return end
|
||||
|
||||
timer.Simple(0, function()
|
||||
if not IsValid(ply) or ply:GetActiveWeapon() ~= wep then return end
|
||||
|
||||
wep:ApplyViewModelModifications()
|
||||
|
||||
if sp then
|
||||
wep:CallOnClient("ApplyViewModelModifications")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user