Krypstar Posted August 25, 2021 Share Posted August 25, 2021 Hello all, I've been looking around for information regarding my question about how to draw 3d text ingame with ScripthookVDotNet3. I'm already able to draw simple 2d text, but I'm wondering how to draw text above peds, vehicles, or objects. I'm not looking for how to really attach the text to peds, which I can figure out my own, but how to basically draw 3d text into the game in general. What I've done/searched so far: - Searching for any documentation about this. Couldn't find any so far. - Searching for examples on this forum, and other forums. It would give me examples of 8 years ago for GTA IV, which isn't compatible ofcourse. - Most documentation for drawing 3d text I found was only for FiveM mods, but I'm not using FiveM, I want to implement such a thing in basic GTA V singleplayer. - Downloaded mods which contained 3d graphics on objects and peds, like an old Watch Dogs mod. Tried to decompiled to read the source code. Unfortunately, the code was obfuscated and protected so not readable. - I've tried to use Scaleforms (got it from another mod source code), to draw text above a ped. This works, but it actually draws a multiplayer player name, which is actually a dirty workaround in my opinion. This won't suit me as I would like to add more text or graphical items in the future. So, could anyone help me getting started with how to draw 3d text? Is there any documentation about it elsewhere? It would be enough for me at this moment to share some basic information, links or documentation so I can try out to write some basic code myself. It's just the point I couldn't find any information about it for my situation (plain GTA V, ScriptHookVDotNet3, singleplayer). I know it would be possible, as I've seen other mods were able to do it as well. If you do need any other information please let me know. Thanks in advance! Link to comment Share on other sites More sharing options...
Krypstar Posted August 25, 2021 Author Share Posted August 25, 2021 For example I found next topic: It mentions the native function "GET VIEWPORT POSITION OF COORD". It seems that this one was useful back then for GTA IV. I searched for a similair native function in GTA V native function list, but couldn't find any.. Link to comment Share on other sites More sharing options...
Krypstar Posted August 28, 2021 Author Share Posted August 28, 2021 Omg, nevermind. I just find it. There's was already something default built-in in scripthook for this.. Just had to use GTA.UI.Screen.WorldToScreen() method, which translates the positions itself. Just came across that method myself. No docs mention it. Link to comment Share on other sites More sharing options...
DuncanMac Posted August 28, 2021 Share Posted August 28, 2021 (edited) Strange, that function is no longer supported. Are you still using SHVDN2? You should upgrade to 3. https://github.com/crosire/scripthookvdotnet/issues/903 Edited August 28, 2021 by DuncanMac Link to comment Share on other sites More sharing options...
Krypstar Posted August 29, 2021 Author Share Posted August 29, 2021 11 hours ago, DuncanMac said: Strange, that function is no longer supported. Are you still using SHVDN2? You should upgrade to 3. https://github.com/crosire/scripthookvdotnet/issues/903 I've been using the SHVDN3 already, I forgot to mention in my first post, so this makes it a less lot strange :) Link to comment Share on other sites More sharing options...
DuncanMac Posted September 12, 2021 Share Posted September 12, 2021 Can you post your code. I've done 2d with draw, never tried 3d Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now