• Dframe with a dmodelpanel some help needed
    6 replies, posted
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 [lua] function Models( ply ) local Panel = vgui.Create( "DPanel" ) Panel:SetPos( 10, 10 ) Panel:SetSize( 500, 500 ) local icon = vgui.Create( "DModelPanel", Panel ) icon:SetSize(250,250) 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. end hook.Add("ShowSpare1", "selection", Models) [/lua] 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 [url]http://i.imgur.com/72PTtZi.jpg[/url] [editline]21st October 2014[/editline] Bump sorry if its a little early.
BUMP
Just use some DButtons for the arrows.
[url]http://wiki.garrysmod.com/page/GM/ShowSpare1[/url] 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
Sorry, you need to Log In to post a reply to this thread.