local function playerModels() local alyx_model = Model("path_to_alyxs_model.mdl") local barney_model = Model("path_to_barneys_model") for k,v in pairs(player.GetAll()) do if v:IsAdmin() then v:SetModel(barney_model) elseif v:IsUserGroup("clanmembers") then v:SetModel(alyx_model) end endendhook.Add("TTTPrepareRound", "TTTPrepareRoundModels", playerModels)
local function SetDisguise(ply, cmd, args) if not ValidEntity(ply) or not ply:IsActiveTraitor() then return end if ply:HasEquipmentItem(EQUIP_DISGUISE) then local state = #args == 1 and tobool(args[1]) ply:SetNWBool("disguised", state) if v:IsAdmin() or ply:IsUserGroup("communitymembers") then if state then ply:SetModel(GAMEMODE.playermodel) else if ply:IsAdmin() then ply:SetModel(Model("blablah")) end elseif ply:IsUserGroup("communitymembers") then ply:SetModel(Model("blablah")) end end end LANG.Msg(ply, state and "disg_turned_on" or "disg_turned_off") endend
if ply:IsUserGroup( "" ) then -- If player is of usergroup x
if (CLIENT) then item.name = "Afro" item.model = Model("models/dav0r/hoverball.mdl") // our model local scale = Vector(1.6, 1.6, 1.6) item.LayoutEntity = function(player, entity) local position, angles = vector_zero, angle_zero local bone = player:LookupBone("ValveBiped.Bip01_Head1") // our bone entity:SetModelScale(scale) if (entity:GetMaterial() != "models/weapons/v_stunbaton/w_shaft01a") then entity:SetMaterial("models/weapons/v_stunbaton/w_shaft01a") end if (bone != -1) then position, angles = player:GetBonePosition(bone) position = position -(angles:Right() *5) +(angles:Forward() *8) angles:RotateAroundAxis(angles:Right(), 90) end return entity, position, angles end item.LayoutModel = function(panel, entity) if (entity:GetMaterial() != "models/weapons/v_stunbaton/w_shaft01a") then entity:SetMaterial("models/weapons/v_stunbaton/w_shaft01a") end endend