PC GTA IV ScriptHook mod menu help

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

ClonkAndre

New Member
Jan 3, 2019
2
0
1
Hello Guys!
I am new in this Forum and i have a Question about GTA IV creating a Mod Menu.

I'am using Visual Studio 2013 to create a Mod Menu and i almost finished the Trainer but i have 1 big Problem!

When i try to add the Menu Items the Items overlapps itself :/
Here is an Image: https://imgur.com/a/4RMVshs (on imgur)
You see?

It schould be like that:
  • lol0
  • lol1
  • lol2
  • lol3
  • lol4
  • lol5
Here is my Code: (vb.net)
Code:
Private avatext(5) As String
Public Sub New()
  avatext(0) = "lol0"
  avatext(1) = "lol1"
  avatext(2) = "lol2"
  avatext(3) = "lol3"
  avatext(4) = "lol4"
  avatext(5) = "lol5"
End Sub

Private Sub GTAIV_TEST_MENU2_PerFrameDrawing(ByVal sender As Object, ByVal e As GTA.GraphicsEventArgs) Handles MyBase.PerFrameDrawing
  Dim num As Integer = 0
  Dim topItem As UShort = PtopItem

  If menuOpen Then
  'While CInt(topItem) <= CInt(PtopItem) + 30 AndAlso CInt(topItem) < Me.avatext.Length
  '  e.Graphics.DrawText(avatext(CInt(topItem)), 20.0F, 30.0F, If(CInt(PtopItem) = CInt(Me.selectedItem), Me.selectedItemColor, Me.defaultItemColor))
  '  topItem += 1
  'End While

  For Each Element As String In avatext
  e.Graphics.DrawText(Element, 10, 10 + 30, If(CInt(topItem) = CInt(Me.selectedItem), Me.selectedItemColor, Me.defaultItemColor))
  Next
  End If
End Sub
 

coldmurda

Member
Nov 14, 2013
20
13
63
DrawText has X and Y coordinate parameters. Right now you are drawing each on the same place.

You want a column of items so your X should stay the same value for each item, but your Y needs to increase for every item. I don't know much about that garbage VisualBasic language, but I can give you an example in C:

Code:
float x = 20.0f;
float y = 20.0f;
float spacing = 0.04f; // change this to increase space between each item
for (int i = 0; i < item_count; i++)
{
    // set up text formatting here
    DISPLAY_TEXT_WITH_LITERAL_STRING(x, y + (i * spacing), "STRING", "Menu Item Text");
}

If you need to use .NET, C# is at least a little better. Or C++ ScriptHook if you want to be a champion.
 

lxlKingzOFAllModzlxl

Community Veteran
Retired Staff
Community Veteran
Determined Poster
Active Member
Console ID Poster
May 1, 2016
1,386
1,161
398
inside your mind
DrawText has X and Y coordinate parameters. Right now you are drawing each on the same place.

You want a column of items so your X should stay the same value for each item, but your Y needs to increase for every item. I don't know much about that garbage VisualBasic language, but I can give you an example in C:

Code:
float x = 20.0f;
float y = 20.0f;
float spacing = 0.04f; // change this to increase space between each item
for (int i = 0; i < item_count; i++)
{
    // set up text formatting here
    DISPLAY_TEXT_WITH_LITERAL_STRING(x, y + (i * spacing), "STRING", "Menu Item Text");
}

If you need to use .NET, C# is at least a little better. Or C++ ScriptHook if you want to be a champion.
Thank you for helping him, great work m8 ;)
 

ClonkAndre

New Member
Jan 3, 2019
2
0
1
DrawText has X and Y coordinate parameters. Right now you are drawing each on the same place.

You want a column of items so your X should stay the same value for each item, but your Y needs to increase for every item. I don't know much about that garbage VisualBasic language, but I can give you an example in C:

Code:
float x = 20.0f;
float y = 20.0f;
float spacing = 0.04f; // change this to increase space between each item
for (int i = 0; i < item_count; i++)
{
    // set up text formatting here
    DISPLAY_TEXT_WITH_LITERAL_STRING(x, y + (i * spacing), "STRING", "Menu Item Text");
}

If you need to use .NET, C# is at least a little better. Or C++ ScriptHook if you want to be a champion.

Much thanks to you, it's working now! ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • @ QM|T_JinX:
    nah where you put your thumbs press that to open a update menu
  • @ QM|T_JinX:
    on the second picture can you scroll donw ? i dont see temp folder in there
  • @ Cr1ms:
    QM|T_JinX said:
    nah where you put your thumbs press that to open a update menu
    i see this
  • @ Cr1ms:
    I see “tmp”
  • @ Cr1ms:
    In second url 2 picture
  • @ QM|T_JinX:
    thats good try to put those other 2 files and put it in there
  • @ Cr1ms:
    And i can play?
  • @ QM|T_JinX:
    if im correct yea
  • @ Cr1ms:
    I join in game, but mod dont work
  • @ QM|T_JinX:
    did you check the update number of the menu and the update number from the game ?
  • @ Cr1ms:
    How?
  • @ QM|T_JinX:
    when you downloaded the menu it should have said on what update
  • @ Cr1ms:
    do you have a mod for the latest tbogt update?
  • @ Cr1ms:
    How check version gta ;?
  • @ QM|T_JinX:
    me nah never modded tbogt so not sure on what update it is
  • @ QM|T_JinX:
    best bet is to google gta tbogt mod menu hen bc i cant seem to find anything i can link to you
  • @ QM|T_JinX:
    or change is to look on Youtube but alot of things wont work so it wont be the first thing you find
  • @ QM|T_JinX:
    things ike this
  • @ QM|T_JinX:
    sorry cant be more of help but i hope you will find something
  • Chat Bot:
    flexovh is our newest member. Welcome!
  • Chat Bot:
    188betctcom is our newest member. Welcome!
  • Chat Bot:
    Cr1ms has joined the room.
    Chat Bot: Cr1ms has joined the room.