Dframe with a dmodelpanel some help needed

Hello, im trying to add a player model selection witch is donator only i want a arrow to change selections i will post a picture my current code is

function Models( ply )
local Panel = vgui.Create( “DPanel” )
Panel:SetPos( 10, 10 )
Panel:SetSize( 500, 500 )

    local icon = vgui.Create( "DModelPanel", Panel )
    icon:SetModel( "models/player/alyx.mdl" ) -- you can only change colors on playermodels
    function icon:LayoutEntity( Entity ) return end -- disables default rotation
    function icon.Entity:GetPlayerColor() return Vector (1, 0, 0) end --we need to set it to a Vector not a Color, so the values are normal RGB values divided by 255.

hook.Add(“ShowSpare1”, “selection”, Models)

i found that on the wiki might as well use it it was what i was trying to do but the problem i need help with is that arrow that changes selection heres a pic to show you what im trying to acomplish

[editline]21st October 2014[/editline]

Bump sorry if its a little early.


Just use some DButtons for the arrows.

It’s a server-side hook.

thnx but how would i make another playermodel showup once the arrow is clicked

Set the model to something else under an OnClick function for your button

ok thankyou