Hey!
Faced a problem, I want to make sure that when an object (say, a tree) spawns, I can bind such a text to it, as I understand it, it is used when hovering an object, how can I implement it, which function draws it?
Automatic binding of text to objects
> as I understand it, it is used when hovering an object
You are totally wrong here. Such text is drawn with the ddraw console command which can only be executed if player has an admin flag, therefore it is insecure. If you want it to be drawn for items when player looks at them, you will have to perform frequent raycasts from players which will eventually lead into performance problems. I'd recommend you to stay away from features like this one in plugins.
2CHEVSKII
> as I understand it, it is used when hovering an object
You are totally wrong here. Such text is drawn with the ddraw console command which can only be executed if player has an admin flag, therefore it is insecure. If you want it to be drawn for items when player looks at them, you will have to perform frequent raycasts from players which will eventually lead into performance problems. I'd recommend you to stay away from features like this one in plugins.
The screen is made from a popular server, which is always full, this inscription is always visible, even if it is not hovered, it displays the stage of growth of the tree (which he planted himself)
I assumed that they took this drawing when aiming at objects, because the font is very similar, and the dot below confirms this
ParkSM
The screen is made from a popular server, which is always full, this inscription is always visible, even if it is not hovered, it displays the stage of growth of the tree (which he planted himself)
I assumed that they took this drawing when aiming at objects, because the font is very similar, and the dot below confirms this
The font is exactly the same which is used by the ddraw because it is ddraw. Dot below does not confirm nothing, it is just a unicode char written along with other text.
You wouldn't necessarily need raycasts to make this work. Just check the distance and angle of the tree. Does it lag or get out of sync if the player looks around really fast?