Hey, I'm trying to make an icon follow a player (Similar to the Tbuddy icon system) but im having trouble finding something to referenace off of.
I would appreaciate if you could point me in the right direction towards the Tbuddy script or something similar.
Any help would be appreaciated
-Adam
Use the following method if you intend to be able to see the icon "through walls".
[url]https://wiki.garrysmod.com/page/GM/HUDPaint[/url]
[url]https://wiki.garrysmod.com/page/surface/DrawTexturedRect[/url]
[url]http://wiki.garrysmod.com/page/Vector/ToScreen[/url]
[url]http://wiki.garrysmod.com/page/Entity/GetPos[/url]
Would you be able to give me a quick exaple of how these would be used together etc? because i haven't managed to get any sucess
Reverse engineer what you want to make. You want to draw an icon (DrawTexturedRect) on the screen (HUDPaint) at the screen coordinates (ToScreen) that are equivalent to a position in 3D space (GetPos). Taking that in the opposite order and then you first gotta get your position from the world with GetPos, convert it into screen coordinates using ToScreen and drawing an icon on the screen there using DrawTexturedRect, which must be in a HUDPaint hook.
Sorry, you need to Log In to post a reply to this thread.