• How to make button around player
    4 replies, posted
Hello Before create this topic, i have searched a lot in forums,wiki... And i didn't found what i want I sant something like that : https://files.facepunch.com/forum/upload/157326/d3af7a70-bd15-4e1b-aabe-d90d7aea3342/IMG_20180224_094758.png I want to put button around player but i didn't have any idea for do it I hope it's in clientside Sorry for my english i'm french Thanks you
Its just normal dbuttons (Category) positioned nicely near the player on 2D side of the client, I assume you cant just click them, you would have to gui.EnableScreenClicker(). On top of that, I have no idea why anyone would need this system as it would be a hassle to look at the player, and attempt to click whilst looking?
Okay thanks you, but i think it will be difficult to do something like that for me How i can get the pos of the player and transform it into 2d pos? I know it's difficult to use but it's not for me We can use it just by opening the context menu ☺
Well if your just looking at the player you just use ScrW()/2, ScrH()/2 to center or if you want to translate x,y,z to 2D you can use Vector/ToScreen For example you do: for k,v in pairs( player.GetAll() ) do local pos = v:GetPos():ToScreen() -- positions the players 3D pos to 2D pos local x = pos.x local y = pos.y local visible = pos.visible -- if the player can see this pos within a 180 spin. -- draw -- end I suppose you just fiddle with it from there, like adding or subtracting. I hope this helps.
Oh nice thanks you, yeah it will really help me I have understand the code
Sorry, you need to Log In to post a reply to this thread.