• Help with DModelPanel please :)
    2 replies, posted
Well, I'm trying to figure out what the model just shows up without going away? :\ [t]http://i.imgur.com/tDMbfzT.png[/t] Code: [code]local icon = vgui.Create("DModelPanel") local IconModel = Model if type(Model) == "table" then IconModel = Model[math.random(#Model)] end icon:SetModel(IconModel) local ent = icon:GetEntity() local headPos = ent:GetBonePosition(ent:LookupBone("ValveBiped.Bip01_Head1")) ent:SetEyeTarget(Vector(20, 00, 65)) -- otherwise the model will have its eyes pointing down icon:SetCamPos(Vector(25, 0, 65)) if headPos then icon:SetLookAt(headPos) -- look at the head of the model else icon:SetCamPos(Vector(30, 10, 75)) end icon:SetAnimated(false) function icon:LayoutEntity() end --disable rotation icon:SetSize(128, 128) icon:SetToolTip() icon.OnCursorEntered = function() icon.PaintOverOld = icon.PaintOver icon.PaintOver = icon.PaintOverHovered Info[1] = DarkRP.getPhrase("job_name") .. name Info[2] = DarkRP.getPhrase("job_description") .. description Info[3] = DarkRP.getPhrase("job_weapons") .. Weapons model = IconModel UpdateInfo() end icon.OnCursorExited = function() if ( icon.PaintOver == icon.PaintOverHovered ) then icon.PaintOver = icon.PaintOverOld end Info = {} if modelpanel and modelpanel:IsValid() and icon:IsValid() then modelpanel:Remove() UpdateInfo(false) end end[/code]
Use [URL="http://wiki.garrysmod.com/page/render/SetScissorRect"]render.SetScissorRect[/URL] on your list
[QUOTE=brandonj4;43203456]Use [URL="http://wiki.garrysmod.com/page/render/SetScissorRect"]render.SetScissorRect[/URL] on your list[/QUOTE] I honestly don't know where I'm suppose to put that :\
Sorry, you need to Log In to post a reply to this thread.