Noox Posted June 22, 2014 Share Posted June 22, 2014 Do they work like normal Windows forms? I couldn't find anything about them in this forum or the documentation, could you please make an example just to see how stuff is done? I assume the location of the objects changes based on the resolution, just like CSS, right? Link to comment Share on other sites More sharing options...
UltraNineNine Posted June 22, 2014 Share Posted June 22, 2014 (edited) Do they work like normal Windows forms? I couldn't find anything about them in this forum or the documentation, could you please make an example just to see how stuff is done? I assume the location of the objects changes based on the resolution, just like CSS, right? GTA has many type of forms,one of the type is: Imports System.Windows.Forms=To set a hotkey for your mod like:If e.key = keys.A then Imports System.Drawing=To draw a shapes and text on screen (MENU,HUD,MESSAGE) Imports System.IO=To draw a non game image on screen But the most basic is this one Imports GTA and Imports System This will make visual studio understand that you are coding for GTA 4 Edited June 22, 2014 by UltraNineNine Wiebrendh, WEISHENCHENG99 and Maro Hannover 3 Link to comment Share on other sites More sharing options...
Maro Hannover Posted June 22, 2014 Share Posted June 22, 2014 ok how do i draw a game message that is shown in missions and everything. also in simple native trainer when you spawn a car it says car spawned with the same message used ingame and also how do i color a part of it like "Get in the car" i want to make the car work blue. In gta sa we used ~ and + like Get in the ~b~car~w~. or Get in the +b+car+w+. and if you don't understand +b+ means blue +w+ means white Link to comment Share on other sites More sharing options...
UltraNineNine Posted June 22, 2014 Share Posted June 22, 2014 ok how do i draw a game message that is shown in missions and everything. also in simple native trainer when you spawn a car it says car spawned with the same message used ingame and also how do i color a part of it like "Get in the car" i want to make the car work blue. In gta sa we used ~ and + like Get in the ~b~car~w~. or Get in the +b+car+w+. and if you don't understand +b+ means blue +w+ means white For the blue message use this: abc.Graphics.DrawText(" " + keyaction, 0.43f, 0.07f, System.Drawing.Color.FromArgb(pokaz, System.Drawing.Color.AliceBlue)); abc.Graphics.DrawText("[destroy all nearly running engines]", 0.36f, 0.09f, System.Drawing.Color.DodgerBlue); If you want to display the same message used ingame then use this: msgEx("Whatever Text You Want", 3000) WEISHENCHENG99 1 Link to comment Share on other sites More sharing options...
Jitnaught Posted June 22, 2014 Share Posted June 22, 2014 ok how do i draw a game message that is shown in missions and everything. also in simple native trainer when you spawn a car it says car spawned with the same message used ingame and also how do i color a part of it like "Get in the car" i want to make the car work blue. In gta sa we used ~ and + like Get in the ~b~car~w~. or Get in the +b+car+w+. and if you don't understand +b+ means blue +w+ means white For the blue message use this: abc.Graphics.DrawText(" " + keyaction, 0.43f, 0.07f, System.Drawing.Color.FromArgb(pokaz, System.Drawing.Color.AliceBlue)); abc.Graphics.DrawText("[destroy all nearly running engines]", 0.36f, 0.09f, System.Drawing.Color.DodgerBlue); If you want to display the same message used ingame then use this: msgEx("Whatever Text You Want", 3000) No no no, he wants to color part of the message I believe. If you'd like to do that, use these codes http://psx-scene.com/forums/f312/customize-strings-colors-blips-other-things-107029/#post1035288 And "msgEx" is not a function in ScriptHook .NET. Use this: private static void Subtitle(string info, int millisecs = 1500) { GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", info, millisecs, 1); } Do they work like normal Windows forms? I couldn't find anything about them in this forum or the documentation, could you please make an example just to see how stuff is done? I assume the location of the objects changes based on the resolution, just like CSS, right? Are you trying to use GTA.Forms, or what UltraNineNine said? Link to comment Share on other sites More sharing options...
Noox Posted June 22, 2014 Author Share Posted June 22, 2014 ok how do i draw a game message that is shown in missions and everything. also in simple native trainer when you spawn a car it says car spawned with the same message used ingame and also how do i color a part of it like "Get in the car" i want to make the car work blue. In gta sa we used ~ and + like Get in the ~b~car~w~. or Get in the +b+car+w+. and if you don't understand +b+ means blue +w+ means white For the blue message use this: abc.Graphics.DrawText(" " + keyaction, 0.43f, 0.07f, System.Drawing.Color.FromArgb(pokaz, System.Drawing.Color.AliceBlue)); abc.Graphics.DrawText("[destroy all nearly running engines]", 0.36f, 0.09f, System.Drawing.Color.DodgerBlue); If you want to display the same message used ingame then use this: msgEx("Whatever Text You Want", 3000) No no no, he wants to color part of the message I believe. If you'd like to do that, use these codes http://psx-scene.com/forums/f312/customize-strings-colors-blips-other-things-107029/#post1035288 And "msgEx" is not a function in ScriptHook .NET. Use this: private static void Subtitle(string info, int millisecs = 1500) { GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", info, millisecs, 1); } Do they work like normal Windows forms? I couldn't find anything about them in this forum or the documentation, could you please make an example just to see how stuff is done? I assume the location of the objects changes based on the resolution, just like CSS, right? Are you trying to use GTA.Forms, or what UltraNineNine said? No I saw some other mods and I think it's too early for GUIs Link to comment Share on other sites More sharing options...
Jitnaught Posted June 22, 2014 Share Posted June 22, 2014 ok how do i draw a game message that is shown in missions and everything. also in simple native trainer when you spawn a car it says car spawned with the same message used ingame and also how do i color a part of it like "Get in the car" i want to make the car work blue. In gta sa we used ~ and + like Get in the ~b~car~w~. or Get in the +b+car+w+. and if you don't understand +b+ means blue +w+ means white For the blue message use this: abc.Graphics.DrawText(" " + keyaction, 0.43f, 0.07f, System.Drawing.Color.FromArgb(pokaz, System.Drawing.Color.AliceBlue)); abc.Graphics.DrawText("[destroy all nearly running engines]", 0.36f, 0.09f, System.Drawing.Color.DodgerBlue); If you want to display the same message used ingame then use this: msgEx("Whatever Text You Want", 3000) No no no, he wants to color part of the message I believe. If you'd like to do that, use these codes http://psx-scene.com/forums/f312/customize-strings-colors-blips-other-things-107029/#post1035288 And "msgEx" is not a function in ScriptHook .NET. Use this: private static void Subtitle(string info, int millisecs = 1500) { GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", info, millisecs, 1); } Do they work like normal Windows forms? I couldn't find anything about them in this forum or the documentation, could you please make an example just to see how stuff is done? I assume the location of the objects changes based on the resolution, just like CSS, right? Are you trying to use GTA.Forms, or what UltraNineNine said? No I saw some other mods and I think it's too early for GUIs Um... ok? 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