Files
VnUtest/garrysmod/addons/tfa_base/lua/tfa/modules/tfa_bodygroups.lua
2026-03-31 10:27:04 +03:00

16 lines
390 B
Lua

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)