Log in to reply

Picture overlay, is it possible?

  • Essentially, I want to put a picture that shows up in the top left corner when a certain event happens
    (ex. player's car crashes into an object).

    If so, please tell me how, I'm in the planning stages for a decently sized script mod for the game.
    However, if this is not possible, it is fine, its a fairly trivial detail that I just wanted to add if possible.

    Thanks for reading!

  • @SealionDiver Yes there is but I haven't done it myself yet. Anyway, you can render usual Windows Forms in the game (example: the Computer+ plugin for LSPDFR) and as with any Windows Form you can place a PictureBox control on it.

  • @Cyron43 Okay, thank you, was curious. Just starting out and I'm very slowly (yet consistently) making progress on my mod, so this answer helps a fair bit. I'll flag as solved.

  • You can also use the DrawTexture function in ScripthookV or ScripthookVDotNet. Don't know how it compares to a PictureBox performance-wise but it's fairly simple to use.

  • @stillhere Thank you for the response! That helps a fair bit, you think it would be able to use animations/ clips though?

  • @SealionDiver It only allows static images unfortunately but you can split a video or gif into multiple images and animate it using a timer.

    For example, if you have a gif that plays at 60 frames per second, you can save all the frames as separate image files and play each of them for 1/60th of a second consecutively.

    DrawTexture has a time param that tells the game how long a particular image should stay on screen. You might want to use GET_GAME_TIMER to keep track of how long ago the last image was drawn.

    If you need to display a video with sound though, it might be possible to use this method, but I'd look around for an external method like Overlay.NET.

  • This post is deleted!

  • @stillhere Okay, thank you! I'll see how this works out.

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.