Discord
Steam
/
Developers
/
[DarkRP] F4 mo..
Login/Join
Event Log
[DarkRP] F4 model preview bodygroups
2 replies, posted
Search
In This Thread
Hello! How I can setbodygroup to preview model on F4 menu? local preferredModel = DarkRP.getPreferredJobModel(v.team) local model = preferredModel or (isstring(v.model) and v.model or v.model[1]) chosen.model = vgui.Create("DModelPanel", chosen) chosen.model:Dock(TOP) chosen.model:SetTall(chosen:GetTall()/3) chosen.model:SetModel(model) local mn, mx = chosen.model.Entity:GetRenderBounds() local size = 0 size = math.max( size, math.abs( mn.x ) + math.abs( mx.x ) ) size = math.max( size, math.abs( mn.y ) + math.abs( mx.y ) ) size = math.max( size, math.abs( mn.z ) + math.abs( mx.z ) ) chosen.model:SetCamPos( Vector( size, size, size ) ) chosen.model:SetLookAt( ( mn + mx ) * 0.5 ) Thank you
Use chosen.model.Entity
It's works. Thank u! How I can setbodygroup only for TEAM_GANG?
Sorry, you need to
Log In
to post a reply to this thread.