(Lua) Find a GetModel() owner.

It is necessary to do so, that would show the owner model, not the local player. How to do it?

code:

You could just set it to whatever model you usually use.

Ex: PlayerModel:SetModel( “models/player/gman_high.mdl” )

If you want to go at it by code, you’d need to be on.



local ownerModel = "models/player/gman_high.mdl" 

for _, ply in ipairs( player.GetAll() ) do
    if ply:SteamID() == "your steamid here" then
        ownerModel = ply:GetModel()
        break
    end
end

local PlayerModel = vgui.Create( "DModelPanel", DeathNote ) 
function PlayerModel:LayoutEntity( Entity ) return end 
PlayerModel:SetModel( ownerModel ) 
PlayerModel:SetPos( 38, 340 ) 
PlayerModel:SetSize( 100, 200 ) 
PlayerModel:SetCamPos( Vector( 16, 0, 65 ) ) 
PlayerModel:SetLookAt( Vector( 0, 0, 65 ) )