dobrograd-13-06-2022/garrysmod/addons/feature-gmpanel/lua/gmpanel/actions/models/server.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

14 lines
372 B
Lua

gmpanel.registerAction('models', function(obj)
local model = obj.model
local skin = obj.skin
if not model or not skin then return false end
local bg = obj.bodygroups or {}
local players = gmpanel.buildTargets(obj.players or {})
for _,pl in ipairs(players) do
pl:SetModel(model)
pl:SetSkin(skin)
for k,v in pairs(bg) do
pl:SetBodygroup(k, v)
end
end
end)