• Quick button on context menu liked to player bone "ValveBiped.Bip01_Spine"
    6 replies, posted
Hello, I develop an addon for my server, I am looking to add quick action buttons in the context menu. I searched how to do I did not find. https://files.facepunch.com/forum/upload/139978/b5115f33-c853-4fff-96cf-054a78aec0d2/image.png Player name just hover the head hot bone linked. Admin tag linked to bone.
Post a code
I did not find how to display buttons. for k,ply  in pairs(player.GetAll()) do     local bv, ba = ply:GetBonePosition(ply:LookupBone( "ValveBiped.Bip01_Spine" ))     local xOffset = 0     local zOffset = 0     local yOffset = 0     local x = bv.x     local y = bv.y     local z = bv.z     local pos = Vector(x+xOffset,y+yOffset,z+zOffset)     local pos2d = pos:ToScreen()     draw.DrawText("ADMIN","Default",pos2d.x,pos2d.y,Color(255,255,255,255), TEXT_ALIGN_CENTER)   end
Do you have problem with text on player? About contex menu. Do you want your own menu like "Player Model" menu or custom buttons inside it?
If I understand what you mean, I think you're looking for properties.Add to add an option into the context menu.
I'm referencing to title of thread
Create the buttons if they don't already exist using vgui.Create and make them unique. Position them in real-time using Vector/ToScreen and the players position. Remove them if the player is out of sight or the context menu is not open.
Sorry, you need to Log In to post a reply to this thread.