Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,761 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Guad

[.NET] NativeUI

Recommended Posts

qiangqiang101

 

 

 

 

There's a bug: if you press enter on the previous menu, and it will goto new menu. But it also select the item in new menu.

How to fix it??

 

https://www.youtube.com/watch?v=fCKgfpTtU-w&feature=youtu.be

 

In the Video my codes...

Public Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)        Dim nl = Environment.NewLine        UI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)    End Sub     Public Sub CategoryItemChange(sender As UIMenu, index As Integer)        Dim nl = Environment.NewLine        UI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)    End Sub

That has been fixed already, you can grab it off girhub.

Sir, another error after update to your latest source code on github

 

System.NullReferenceException: Object reference not set to an instance of an object.   at NativeUI.MenuPool.<>c.<ProcessControl>b__8_0(UIMenu menu)   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()   at NativeUI.MenuPool.ProcessControl()   at NativeUI.MenuPool.ProcessMenus()   at PremiumDeluxeMotorsport.NET.pdmcarshop.OnTick(Object o, EventArgs e)   at GTA.Script.raise_Tick(Object value0, EventArgs value1)   at GTA.Script.MainLoop()
the code causing the error is just as helpful as the error code if not more

 

 

but the problem is Guad's menu also not show when i hit F5

Share this post


Link to post
Share on other sites
Guad

 

 

 

 

 

 

There's a bug: if you press enter on the previous menu, and it will goto new menu. But it also select the item in new menu.

How to fix it??

 

https://www.youtube.com/watch?v=fCKgfpTtU-w&feature=youtu.be

 

In the Video my codes...

Public Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)        Dim nl = Environment.NewLine        UI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)    End Sub     Public Sub CategoryItemChange(sender As UIMenu, index As Integer)        Dim nl = Environment.NewLine        UI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)    End Sub

That has been fixed already, you can grab it off girhub.

Sir, another error after update to your latest source code on github

 

System.NullReferenceException: Object reference not set to an instance of an object.   at NativeUI.MenuPool.<>c.<ProcessControl>b__8_0(UIMenu menu)   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()   at NativeUI.MenuPool.ProcessControl()   at NativeUI.MenuPool.ProcessMenus()   at PremiumDeluxeMotorsport.NET.pdmcarshop.OnTick(Object o, EventArgs e)   at GTA.Script.raise_Tick(Object value0, EventArgs value1)   at GTA.Script.MainLoop()
the code causing the error is just as helpful as the error code if not more

 

 

 

but the problem is Guad's menu also not show when i hit F5

 

 

MenuPool has been changed since 0.9, it's no longer static. In your script constructor you will have to initialize it and then add every menu you create to it with myMenuPool.Add(myMenu). Then you can use myMenuPool.ProcessMenus().

The example in the OP is for 0.9 and will not work for the github version. 1.0 release is expected for this weekend or next monday/tuesday.

Share this post


Link to post
Share on other sites
Guad

I have another question:when using ScriptHookVDotNet UI, we have this to trigger a function:

button.Activated += (sender, args) =>        {            UI.Notify("You cannot afford it");        };

my question is, can I do something similar with the NativeUI, so that i don't have to make every button's function in the "OnItemSelect"?

Yeah sure, you can perfectly do that with

 

item.Activated += (menu, item) =>                 {                       UI.Notify("Button activated");                 }

Share this post


Link to post
Share on other sites
qiangqiang101

 

 

 

 

 

 

 

There's a bug: if you press enter on the previous menu, and it will goto new menu. But it also select the item in new menu.

How to fix it??

 

https://www.youtube.com/watch?v=fCKgfpTtU-w&feature=youtu.be

 

In the Video my codes...

Public Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)        Dim nl = Environment.NewLine        UI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)    End Sub     Public Sub CategoryItemChange(sender As UIMenu, index As Integer)        Dim nl = Environment.NewLine        UI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)    End Sub

That has been fixed already, you can grab it off girhub.

Sir, another error after update to your latest source code on github

 

System.NullReferenceException: Object reference not set to an instance of an object.   at NativeUI.MenuPool.<>c.<ProcessControl>b__8_0(UIMenu menu)   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()   at NativeUI.MenuPool.ProcessControl()   at NativeUI.MenuPool.ProcessMenus()   at PremiumDeluxeMotorsport.NET.pdmcarshop.OnTick(Object o, EventArgs e)   at GTA.Script.raise_Tick(Object value0, EventArgs value1)   at GTA.Script.MainLoop()
the code causing the error is just as helpful as the error code if not more

 

 

 

but the problem is Guad's menu also not show when i hit F5

 

 

MenuPool has been changed since 0.9, it's no longer static. In your script constructor you will have to initialize it and then add every menu you create to it with myMenuPool.Add(myMenu). Then you can use myMenuPool.ProcessMenus().

The example in the OP is for 0.9 and will not work for the github version. 1.0 release is expected for this weekend or next monday/tuesday.

 

 

Can you fix my code?

 

Imports SystemImports System.Collections.GenericImports System.DrawingImports System.Windows.FormsImports GTAImports GTA.NativeImports NativeUIImports System.LinqImports System.TextImports System.Threading.TasksPublic Class pdmcarshopInherits ScriptPrivate player As PlayerPrivate playerPed As PedPrivate simeon As PedPrivate mainMenu As UIMenuPrivate motorMenu As UIMenuPrivate compactMenu As UIMenuPrivate coupeMenu As UIMenuPrivate sedanMenu As UIMenuPrivate sportMenu As UIMenuPrivate classicMenu As UIMenuPrivate exoticMenu As UIMenuPrivate muscleMenu As UIMenuPrivate offroadMenu As UIMenuPrivate suvMenu As UIMenuPrivate vanMenu As UIMenuPrivate utilityMenu As UIMenuPrivate armouredMenu As UIMenuDim itemMotor As New UIMenuItem("Motorcycles")Dim itemCompact As New UIMenuItem("Compacts")Dim itemCoupe As New UIMenuItem("Coupes")Dim itemSedan As New UIMenuItem("Sedans")Dim itemSport As New UIMenuItem("Sports")Dim itemClassic As New UIMenuItem("Classics")Dim itemExotic As New UIMenuItem("Exotics")Dim itemMuscle As New UIMenuItem("Muscle")Dim itemOffRoad As New UIMenuItem("Off-Road")Dim itemSuv As New UIMenuItem("SUVs")Dim itemVan As New UIMenuItem("Vans")Dim itemUtility As New UIMenuItem("Utility")Dim itemArmoured As New UIMenuItem("Armoured")Private motorcycle As String = Application.StartupPath & "\scripts\PDMCarShop\motorcycle.ini"Private compact As String = Application.StartupPath & "\scripts\PDMCarShop\compact.ini"Private coupe As String = Application.StartupPath & "\scripts\PDMCarShop\coupe.ini"Private sedan As String = Application.StartupPath & "\scripts\PDMCarShop\sedan.ini"Private sport As String = Application.StartupPath & "\scripts\PDMCarShop\sport.ini"Private classic As String = Application.StartupPath & "\scripts\PDMCarShop\classic.ini"Private exotic As String = Application.StartupPath & "\scripts\PDMCarShop\exotic.ini"Private muscle As String = Application.StartupPath & "\scripts\PDMCarShop\muscle.ini"Private offroad As String = Application.StartupPath & "\scripts\PDMCarShop\offroad.ini"Private suv As String = Application.StartupPath & "\scripts\PDMCarShop\suv.ini"Private van As String = Application.StartupPath & "\scripts\PDMCarShop\van.ini"Private utility As String = Application.StartupPath & "\scripts\PDMCarShop\utility.ini"Private armoured As String = Application.StartupPath & "\scripts\PDMCarShop\armoured.ini"Private parameters As String() = {"[name]", "[hash]", "[price]", "[price2]", "[model]"}Private _menuPool As MenuPoolPublic Sub ReadMotorcycle()Dim format As New BTEFormatReader(motorcycle, parameters)Dim qty As Integer = format.Count - 1motorMenu = New UIMenu("PDM Car Shop", "~r~MOTORCYCLES")_menuPool.Add(motorMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))motorMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextmotorMenu.RefreshIndex()mainMenu.BindMenuToItem(motorMenu, itemMotor)End SubPublic Sub ReadCompact()Dim format As New BTEFormatReader(compact, parameters)Dim qty As Integer = format.Count - 1compactMenu = New UIMenu("PDM Car Shop", "~r~COMPACTS")_menuPool.Add(compactMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))compactMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextcompactMenu.RefreshIndex()mainMenu.BindMenuToItem(compactMenu, itemCompact)End SubPublic Sub ReadCoupe()Dim format As New BTEFormatReader(coupe, parameters)Dim qty As Integer = format.Count - 1coupeMenu = New UIMenu("PDM Car Shop", "~r~COUPES")_menuPool.Add(coupeMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))coupeMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextcoupeMenu.RefreshIndex()mainMenu.BindMenuToItem(coupeMenu, itemCoupe)End SubPublic Sub ReadSedan()Dim format As New BTEFormatReader(sedan, parameters)Dim qty As Integer = format.Count - 1sedanMenu = New UIMenu("PDM Car Shop", "~r~SEDANS")_menuPool.Add(sedanMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))sedanMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsedanMenu.RefreshIndex()mainMenu.BindMenuToItem(sedanMenu, itemSedan)End SubPublic Sub ReadSport()Dim format As New BTEFormatReader(sport, parameters)Dim qty As Integer = format.Count - 1sportMenu = New UIMenu("PDM Car Shop", "~r~SPORTS")_menuPool.Add(sportMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))sportMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsportMenu.RefreshIndex()mainMenu.BindMenuToItem(sportMenu, itemSport)End SubPublic Sub ReadClassic()Dim format As New BTEFormatReader(classic, parameters)Dim qty As Integer = format.Count - 1classicMenu = New UIMenu("PDM Car Shop", "~r~CLASSICS")_menuPool.Add(classicMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))classicMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextclassicMenu.RefreshIndex()mainMenu.BindMenuToItem(classicMenu, itemClassic)End SubPublic Sub ReadExotic()Dim format As New BTEFormatReader(exotic, parameters)Dim qty As Integer = format.Count - 1exoticMenu = New UIMenu("PDM Car Shop", "~r~EXOTICS")_menuPool.Add(exoticMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))exoticMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextexoticMenu.RefreshIndex()mainMenu.BindMenuToItem(exoticMenu, itemExotic)End SubPublic Sub ReadMuscle()Dim format As New BTEFormatReader(muscle, parameters)Dim qty As Integer = format.Count - 1muscleMenu = New UIMenu("PDM Car Shop", "~r~MUSCLES")_menuPool.Add(muscleMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))muscleMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextmuscleMenu.RefreshIndex()mainMenu.BindMenuToItem(muscleMenu, itemMuscle)End SubPublic Sub ReadOffroad()Dim format As New BTEFormatReader(offroad, parameters)Dim qty As Integer = format.Count - 1offroadMenu = New UIMenu("PDM Car Shop", "~r~OFF-ROAD")_menuPool.Add(offroadMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))offroadMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextoffroadMenu.RefreshIndex()mainMenu.BindMenuToItem(offroadMenu, itemOffRoad)End SubPublic Sub ReadSuv()Dim format As New BTEFormatReader(suv, parameters)Dim qty As Integer = format.Count - 1suvMenu = New UIMenu("PDM Car Shop", "~r~SUVS")_menuPool.Add(suvMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))suvMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsuvMenu.RefreshIndex()mainMenu.BindMenuToItem(suvMenu, itemSuv)End SubPublic Sub ReadVan()Dim format As New BTEFormatReader(van, parameters)Dim qty As Integer = format.Count - 1vanMenu = New UIMenu("PDM Car Shop", "~r~VANS")_menuPool.Add(vanMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))vanMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextvanMenu.RefreshIndex()mainMenu.BindMenuToItem(vanMenu, itemVan)End SubPublic Sub ReadUtility()Dim format As New BTEFormatReader(utility, parameters)Dim qty As Integer = format.Count - 1utilityMenu = New UIMenu("PDM Car Shop", "~r~UTILITIES")_menuPool.Add(utilityMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))utilityMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextutilityMenu.RefreshIndex()mainMenu.BindMenuToItem(utilityMenu, itemUtility)End SubPublic Sub ReadArmoured()Dim format As New BTEFormatReader(armoured, parameters)_menuPool.Add(armouredMenu)Dim qty As Integer = format.Count - 1armouredMenu = New UIMenu("PDM Car Shop", "~r~ARMOURED")For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))armouredMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextarmouredMenu.RefreshIndex()mainMenu.BindMenuToItem(armouredMenu, itemArmoured)End SubPublic Sub New()AddHandler Tick, AddressOf OnTickAddHandler KeyDown, AddressOf OnKeyDown_menuPool = New MenuPool()mainMenu = New UIMenu("PDM Car Shop", "~b~CATEGORIES")_menuPool.Add(mainMenu)mainMenu.AddItem(itemMotor)mainMenu.AddItem(itemCompact)mainMenu.AddItem(itemCoupe)mainMenu.AddItem(itemSedan)mainMenu.AddItem(itemSport)mainMenu.AddItem(itemClassic)mainMenu.AddItem(itemExotic)mainMenu.AddItem(itemMuscle)mainMenu.AddItem(itemOffRoad)mainMenu.AddItem(itemSuv)mainMenu.AddItem(itemVan)mainMenu.AddItem(itemUtility)mainMenu.AddItem(itemArmoured)mainMenu.RefreshIndex()ReadMotorcycle()ReadCompact()ReadCoupe()ReadSedan()ReadSport()ReadClassic()ReadExotic()ReadMuscle()ReadOffroad()ReadSuv()ReadVan()ReadUtility()ReadArmoured()AddHandler mainMenu.OnItemSelect, AddressOf ItemSelectHandlerAddHandler motorMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler compactMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler coupeMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler sedanMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler sportMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler classicMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler exoticMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler muscleMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler offroadMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler suvMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler vanMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler utilityMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler armouredMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler motorMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler compactMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler coupeMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler sedanMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler sportMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler classicMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler exoticMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler muscleMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler offroadMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler suvMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler vanMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler utilityMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler armouredMenu.OnIndexChange, AddressOf CategoryItemChangeEnd SubPublic Sub ItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)UI.Notify("You have selected: ~b~" + selectedItem.Text)End SubPublic Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)Dim nl = Environment.NewLineUI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)End SubPublic Sub CategoryItemChange(sender As UIMenu, index As Integer)Dim nl = Environment.NewLineUI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)End SubPublic Sub OnTick(o As Object, e As EventArgs)_menuPool.ProcessMenus()End SubPublic Sub OnKeyDown(o As Object, e As KeyEventArgs)If e.KeyCode = Keys.F9 ThenmainMenu.Visible = Not mainMenu.VisibleEnd IfEnd SubEnd Class
Edited by qiangqiang101

Share this post


Link to post
Share on other sites
Guad

 

 

 

 

 

 

 

 

There's a bug: if you press enter on the previous menu, and it will goto new menu. But it also select the item in new menu.

How to fix it??

 

https://www.youtube.com/watch?v=fCKgfpTtU-w&feature=youtu.be

 

In the Video my codes...

Public Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)        Dim nl = Environment.NewLine        UI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)    End Sub     Public Sub CategoryItemChange(sender As UIMenu, index As Integer)        Dim nl = Environment.NewLine        UI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)    End Sub

That has been fixed already, you can grab it off girhub.

Sir, another error after update to your latest source code on github

 

System.NullReferenceException: Object reference not set to an instance of an object.   at NativeUI.MenuPool.<>c.<ProcessControl>b__8_0(UIMenu menu)   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()   at NativeUI.MenuPool.ProcessControl()   at NativeUI.MenuPool.ProcessMenus()   at PremiumDeluxeMotorsport.NET.pdmcarshop.OnTick(Object o, EventArgs e)   at GTA.Script.raise_Tick(Object value0, EventArgs value1)   at GTA.Script.MainLoop()
the code causing the error is just as helpful as the error code if not more

 

 

 

but the problem is Guad's menu also not show when i hit F5

 

 

MenuPool has been changed since 0.9, it's no longer static. In your script constructor you will have to initialize it and then add every menu you create to it with myMenuPool.Add(myMenu). Then you can use myMenuPool.ProcessMenus().

The example in the OP is for 0.9 and will not work for the github version. 1.0 release is expected for this weekend or next monday/tuesday.

 

 

Can you fix my code?

 

 

Imports SystemImports System.Collections.GenericImports System.DrawingImports System.Windows.FormsImports GTAImports GTA.NativeImports NativeUIImports System.LinqImports System.TextImports System.Threading.TasksPublic Class pdmcarshopInherits ScriptPrivate player As PlayerPrivate playerPed As PedPrivate simeon As PedPrivate mainMenu As UIMenuPrivate motorMenu As UIMenuPrivate compactMenu As UIMenuPrivate coupeMenu As UIMenuPrivate sedanMenu As UIMenuPrivate sportMenu As UIMenuPrivate classicMenu As UIMenuPrivate exoticMenu As UIMenuPrivate muscleMenu As UIMenuPrivate offroadMenu As UIMenuPrivate suvMenu As UIMenuPrivate vanMenu As UIMenuPrivate utilityMenu As UIMenuPrivate armouredMenu As UIMenuDim itemMotor As New UIMenuItem("Motorcycles")Dim itemCompact As New UIMenuItem("Compacts")Dim itemCoupe As New UIMenuItem("Coupes")Dim itemSedan As New UIMenuItem("Sedans")Dim itemSport As New UIMenuItem("Sports")Dim itemClassic As New UIMenuItem("Classics")Dim itemExotic As New UIMenuItem("Exotics")Dim itemMuscle As New UIMenuItem("Muscle")Dim itemOffRoad As New UIMenuItem("Off-Road")Dim itemSuv As New UIMenuItem("SUVs")Dim itemVan As New UIMenuItem("Vans")Dim itemUtility As New UIMenuItem("Utility")Dim itemArmoured As New UIMenuItem("Armoured")Private motorcycle As String = Application.StartupPath & "\scripts\PDMCarShop\motorcycle.ini"Private compact As String = Application.StartupPath & "\scripts\PDMCarShop\compact.ini"Private coupe As String = Application.StartupPath & "\scripts\PDMCarShop\coupe.ini"Private sedan As String = Application.StartupPath & "\scripts\PDMCarShop\sedan.ini"Private sport As String = Application.StartupPath & "\scripts\PDMCarShop\sport.ini"Private classic As String = Application.StartupPath & "\scripts\PDMCarShop\classic.ini"Private exotic As String = Application.StartupPath & "\scripts\PDMCarShop\exotic.ini"Private muscle As String = Application.StartupPath & "\scripts\PDMCarShop\muscle.ini"Private offroad As String = Application.StartupPath & "\scripts\PDMCarShop\offroad.ini"Private suv As String = Application.StartupPath & "\scripts\PDMCarShop\suv.ini"Private van As String = Application.StartupPath & "\scripts\PDMCarShop\van.ini"Private utility As String = Application.StartupPath & "\scripts\PDMCarShop\utility.ini"Private armoured As String = Application.StartupPath & "\scripts\PDMCarShop\armoured.ini"Private parameters As String() = {"[name]", "[hash]", "[price]", "[price2]", "[model]"}Private _menuPool As MenuPoolPublic Sub ReadMotorcycle()Dim format As New BTEFormatReader(motorcycle, parameters)Dim qty As Integer = format.Count - 1motorMenu = New UIMenu("PDM Car Shop", "~r~MOTORCYCLES")_menuPool.Add(motorMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))motorMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextmotorMenu.RefreshIndex()mainMenu.BindMenuToItem(motorMenu, itemMotor)End SubPublic Sub ReadCompact()Dim format As New BTEFormatReader(compact, parameters)Dim qty As Integer = format.Count - 1compactMenu = New UIMenu("PDM Car Shop", "~r~COMPACTS")_menuPool.Add(compactMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))compactMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextcompactMenu.RefreshIndex()mainMenu.BindMenuToItem(compactMenu, itemCompact)End SubPublic Sub ReadCoupe()Dim format As New BTEFormatReader(coupe, parameters)Dim qty As Integer = format.Count - 1coupeMenu = New UIMenu("PDM Car Shop", "~r~COUPES")_menuPool.Add(coupeMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))coupeMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextcoupeMenu.RefreshIndex()mainMenu.BindMenuToItem(coupeMenu, itemCoupe)End SubPublic Sub ReadSedan()Dim format As New BTEFormatReader(sedan, parameters)Dim qty As Integer = format.Count - 1sedanMenu = New UIMenu("PDM Car Shop", "~r~SEDANS")_menuPool.Add(sedanMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))sedanMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsedanMenu.RefreshIndex()mainMenu.BindMenuToItem(sedanMenu, itemSedan)End SubPublic Sub ReadSport()Dim format As New BTEFormatReader(sport, parameters)Dim qty As Integer = format.Count - 1sportMenu = New UIMenu("PDM Car Shop", "~r~SPORTS")_menuPool.Add(sportMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))sportMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsportMenu.RefreshIndex()mainMenu.BindMenuToItem(sportMenu, itemSport)End SubPublic Sub ReadClassic()Dim format As New BTEFormatReader(classic, parameters)Dim qty As Integer = format.Count - 1classicMenu = New UIMenu("PDM Car Shop", "~r~CLASSICS")_menuPool.Add(classicMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))classicMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextclassicMenu.RefreshIndex()mainMenu.BindMenuToItem(classicMenu, itemClassic)End SubPublic Sub ReadExotic()Dim format As New BTEFormatReader(exotic, parameters)Dim qty As Integer = format.Count - 1exoticMenu = New UIMenu("PDM Car Shop", "~r~EXOTICS")_menuPool.Add(exoticMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))exoticMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextexoticMenu.RefreshIndex()mainMenu.BindMenuToItem(exoticMenu, itemExotic)End SubPublic Sub ReadMuscle()Dim format As New BTEFormatReader(muscle, parameters)Dim qty As Integer = format.Count - 1muscleMenu = New UIMenu("PDM Car Shop", "~r~MUSCLES")_menuPool.Add(muscleMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))muscleMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextmuscleMenu.RefreshIndex()mainMenu.BindMenuToItem(muscleMenu, itemMuscle)End SubPublic Sub ReadOffroad()Dim format As New BTEFormatReader(offroad, parameters)Dim qty As Integer = format.Count - 1offroadMenu = New UIMenu("PDM Car Shop", "~r~OFF-ROAD")_menuPool.Add(offroadMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))offroadMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextoffroadMenu.RefreshIndex()mainMenu.BindMenuToItem(offroadMenu, itemOffRoad)End SubPublic Sub ReadSuv()Dim format As New BTEFormatReader(suv, parameters)Dim qty As Integer = format.Count - 1suvMenu = New UIMenu("PDM Car Shop", "~r~SUVS")_menuPool.Add(suvMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))suvMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsuvMenu.RefreshIndex()mainMenu.BindMenuToItem(suvMenu, itemSuv)End SubPublic Sub ReadVan()Dim format As New BTEFormatReader(van, parameters)Dim qty As Integer = format.Count - 1vanMenu = New UIMenu("PDM Car Shop", "~r~VANS")_menuPool.Add(vanMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))vanMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextvanMenu.RefreshIndex()mainMenu.BindMenuToItem(vanMenu, itemVan)End SubPublic Sub ReadUtility()Dim format As New BTEFormatReader(utility, parameters)Dim qty As Integer = format.Count - 1utilityMenu = New UIMenu("PDM Car Shop", "~r~UTILITIES")_menuPool.Add(utilityMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))utilityMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextutilityMenu.RefreshIndex()mainMenu.BindMenuToItem(utilityMenu, itemUtility)End SubPublic Sub ReadArmoured()Dim format As New BTEFormatReader(armoured, parameters)_menuPool.Add(armouredMenu)Dim qty As Integer = format.Count - 1armouredMenu = New UIMenu("PDM Car Shop", "~r~ARMOURED")For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))armouredMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextarmouredMenu.RefreshIndex()mainMenu.BindMenuToItem(armouredMenu, itemArmoured)End SubPublic Sub New()AddHandler Tick, AddressOf OnTickAddHandler KeyDown, AddressOf OnKeyDown_menuPool = New MenuPool()mainMenu = New UIMenu("PDM Car Shop", "~b~CATEGORIES")_menuPool.Add(mainMenu)mainMenu.AddItem(itemMotor)mainMenu.AddItem(itemCompact)mainMenu.AddItem(itemCoupe)mainMenu.AddItem(itemSedan)mainMenu.AddItem(itemSport)mainMenu.AddItem(itemClassic)mainMenu.AddItem(itemExotic)mainMenu.AddItem(itemMuscle)mainMenu.AddItem(itemOffRoad)mainMenu.AddItem(itemSuv)mainMenu.AddItem(itemVan)mainMenu.AddItem(itemUtility)mainMenu.AddItem(itemArmoured)mainMenu.RefreshIndex()ReadMotorcycle()ReadCompact()ReadCoupe()ReadSedan()ReadSport()ReadClassic()ReadExotic()ReadMuscle()ReadOffroad()ReadSuv()ReadVan()ReadUtility()ReadArmoured()AddHandler mainMenu.OnItemSelect, AddressOf ItemSelectHandlerAddHandler motorMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler compactMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler coupeMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler sedanMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler sportMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler classicMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler exoticMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler muscleMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler offroadMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler suvMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler vanMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler utilityMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler armouredMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler motorMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler compactMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler coupeMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler sedanMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler sportMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler classicMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler exoticMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler muscleMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler offroadMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler suvMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler vanMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler utilityMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler armouredMenu.OnIndexChange, AddressOf CategoryItemChangeEnd SubPublic Sub ItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)UI.Notify("You have selected: ~b~" + selectedItem.Text)End SubPublic Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)Dim nl = Environment.NewLineUI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)End SubPublic Sub CategoryItemChange(sender As UIMenu, index As Integer)Dim nl = Environment.NewLineUI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)End SubPublic Sub OnTick(o As Object, e As EventArgs)_menuPool.ProcessMenus()End SubPublic Sub OnKeyDown(o As Object, e As KeyEventArgs)If e.KeyCode = Keys.F9 ThenmainMenu.Visible = Not mainMenu.VisibleEnd IfEnd SubEnd Class

 

 

 

I'm not a VB programmer, sorry. Also here's a tip, you can make a button open another menu by using firstMenu.BindMenuToItem(secondMenu, itemThatOpensIt)

Share this post


Link to post
Share on other sites
qiangqiang101

 

 

 

 

 

 

 

 

 

There's a bug: if you press enter on the previous menu, and it will goto new menu. But it also select the item in new menu.

How to fix it??

 

https://www.youtube.com/watch?v=fCKgfpTtU-w&feature=youtu.be

 

In the Video my codes...

Public Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)        Dim nl = Environment.NewLine        UI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)    End Sub     Public Sub CategoryItemChange(sender As UIMenu, index As Integer)        Dim nl = Environment.NewLine        UI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)    End Sub

That has been fixed already, you can grab it off girhub.

Sir, another error after update to your latest source code on github

 

System.NullReferenceException: Object reference not set to an instance of an object.   at NativeUI.MenuPool.<>c.<ProcessControl>b__8_0(UIMenu menu)   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()   at NativeUI.MenuPool.ProcessControl()   at NativeUI.MenuPool.ProcessMenus()   at PremiumDeluxeMotorsport.NET.pdmcarshop.OnTick(Object o, EventArgs e)   at GTA.Script.raise_Tick(Object value0, EventArgs value1)   at GTA.Script.MainLoop()
the code causing the error is just as helpful as the error code if not more

 

 

 

but the problem is Guad's menu also not show when i hit F5

 

 

MenuPool has been changed since 0.9, it's no longer static. In your script constructor you will have to initialize it and then add every menu you create to it with myMenuPool.Add(myMenu). Then you can use myMenuPool.ProcessMenus().

The example in the OP is for 0.9 and will not work for the github version. 1.0 release is expected for this weekend or next monday/tuesday.

 

 

Can you fix my code?

 

 

Imports SystemImports System.Collections.GenericImports System.DrawingImports System.Windows.FormsImports GTAImports GTA.NativeImports NativeUIImports System.LinqImports System.TextImports System.Threading.TasksPublic Class pdmcarshopInherits ScriptPrivate player As PlayerPrivate playerPed As PedPrivate simeon As PedPrivate mainMenu As UIMenuPrivate motorMenu As UIMenuPrivate compactMenu As UIMenuPrivate coupeMenu As UIMenuPrivate sedanMenu As UIMenuPrivate sportMenu As UIMenuPrivate classicMenu As UIMenuPrivate exoticMenu As UIMenuPrivate muscleMenu As UIMenuPrivate offroadMenu As UIMenuPrivate suvMenu As UIMenuPrivate vanMenu As UIMenuPrivate utilityMenu As UIMenuPrivate armouredMenu As UIMenuDim itemMotor As New UIMenuItem("Motorcycles")Dim itemCompact As New UIMenuItem("Compacts")Dim itemCoupe As New UIMenuItem("Coupes")Dim itemSedan As New UIMenuItem("Sedans")Dim itemSport As New UIMenuItem("Sports")Dim itemClassic As New UIMenuItem("Classics")Dim itemExotic As New UIMenuItem("Exotics")Dim itemMuscle As New UIMenuItem("Muscle")Dim itemOffRoad As New UIMenuItem("Off-Road")Dim itemSuv As New UIMenuItem("SUVs")Dim itemVan As New UIMenuItem("Vans")Dim itemUtility As New UIMenuItem("Utility")Dim itemArmoured As New UIMenuItem("Armoured")Private motorcycle As String = Application.StartupPath & "\scripts\PDMCarShop\motorcycle.ini"Private compact As String = Application.StartupPath & "\scripts\PDMCarShop\compact.ini"Private coupe As String = Application.StartupPath & "\scripts\PDMCarShop\coupe.ini"Private sedan As String = Application.StartupPath & "\scripts\PDMCarShop\sedan.ini"Private sport As String = Application.StartupPath & "\scripts\PDMCarShop\sport.ini"Private classic As String = Application.StartupPath & "\scripts\PDMCarShop\classic.ini"Private exotic As String = Application.StartupPath & "\scripts\PDMCarShop\exotic.ini"Private muscle As String = Application.StartupPath & "\scripts\PDMCarShop\muscle.ini"Private offroad As String = Application.StartupPath & "\scripts\PDMCarShop\offroad.ini"Private suv As String = Application.StartupPath & "\scripts\PDMCarShop\suv.ini"Private van As String = Application.StartupPath & "\scripts\PDMCarShop\van.ini"Private utility As String = Application.StartupPath & "\scripts\PDMCarShop\utility.ini"Private armoured As String = Application.StartupPath & "\scripts\PDMCarShop\armoured.ini"Private parameters As String() = {"[name]", "[hash]", "[price]", "[price2]", "[model]"}Private _menuPool As MenuPoolPublic Sub ReadMotorcycle()Dim format As New BTEFormatReader(motorcycle, parameters)Dim qty As Integer = format.Count - 1motorMenu = New UIMenu("PDM Car Shop", "~r~MOTORCYCLES")_menuPool.Add(motorMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))motorMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextmotorMenu.RefreshIndex()mainMenu.BindMenuToItem(motorMenu, itemMotor)End SubPublic Sub ReadCompact()Dim format As New BTEFormatReader(compact, parameters)Dim qty As Integer = format.Count - 1compactMenu = New UIMenu("PDM Car Shop", "~r~COMPACTS")_menuPool.Add(compactMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))compactMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextcompactMenu.RefreshIndex()mainMenu.BindMenuToItem(compactMenu, itemCompact)End SubPublic Sub ReadCoupe()Dim format As New BTEFormatReader(coupe, parameters)Dim qty As Integer = format.Count - 1coupeMenu = New UIMenu("PDM Car Shop", "~r~COUPES")_menuPool.Add(coupeMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))coupeMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextcoupeMenu.RefreshIndex()mainMenu.BindMenuToItem(coupeMenu, itemCoupe)End SubPublic Sub ReadSedan()Dim format As New BTEFormatReader(sedan, parameters)Dim qty As Integer = format.Count - 1sedanMenu = New UIMenu("PDM Car Shop", "~r~SEDANS")_menuPool.Add(sedanMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))sedanMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsedanMenu.RefreshIndex()mainMenu.BindMenuToItem(sedanMenu, itemSedan)End SubPublic Sub ReadSport()Dim format As New BTEFormatReader(sport, parameters)Dim qty As Integer = format.Count - 1sportMenu = New UIMenu("PDM Car Shop", "~r~SPORTS")_menuPool.Add(sportMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))sportMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsportMenu.RefreshIndex()mainMenu.BindMenuToItem(sportMenu, itemSport)End SubPublic Sub ReadClassic()Dim format As New BTEFormatReader(classic, parameters)Dim qty As Integer = format.Count - 1classicMenu = New UIMenu("PDM Car Shop", "~r~CLASSICS")_menuPool.Add(classicMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))classicMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextclassicMenu.RefreshIndex()mainMenu.BindMenuToItem(classicMenu, itemClassic)End SubPublic Sub ReadExotic()Dim format As New BTEFormatReader(exotic, parameters)Dim qty As Integer = format.Count - 1exoticMenu = New UIMenu("PDM Car Shop", "~r~EXOTICS")_menuPool.Add(exoticMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))exoticMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextexoticMenu.RefreshIndex()mainMenu.BindMenuToItem(exoticMenu, itemExotic)End SubPublic Sub ReadMuscle()Dim format As New BTEFormatReader(muscle, parameters)Dim qty As Integer = format.Count - 1muscleMenu = New UIMenu("PDM Car Shop", "~r~MUSCLES")_menuPool.Add(muscleMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))muscleMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextmuscleMenu.RefreshIndex()mainMenu.BindMenuToItem(muscleMenu, itemMuscle)End SubPublic Sub ReadOffroad()Dim format As New BTEFormatReader(offroad, parameters)Dim qty As Integer = format.Count - 1offroadMenu = New UIMenu("PDM Car Shop", "~r~OFF-ROAD")_menuPool.Add(offroadMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))offroadMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextoffroadMenu.RefreshIndex()mainMenu.BindMenuToItem(offroadMenu, itemOffRoad)End SubPublic Sub ReadSuv()Dim format As New BTEFormatReader(suv, parameters)Dim qty As Integer = format.Count - 1suvMenu = New UIMenu("PDM Car Shop", "~r~SUVS")_menuPool.Add(suvMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))suvMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextsuvMenu.RefreshIndex()mainMenu.BindMenuToItem(suvMenu, itemSuv)End SubPublic Sub ReadVan()Dim format As New BTEFormatReader(van, parameters)Dim qty As Integer = format.Count - 1vanMenu = New UIMenu("PDM Car Shop", "~r~VANS")_menuPool.Add(vanMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))vanMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextvanMenu.RefreshIndex()mainMenu.BindMenuToItem(vanMenu, itemVan)End SubPublic Sub ReadUtility()Dim format As New BTEFormatReader(utility, parameters)Dim qty As Integer = format.Count - 1utilityMenu = New UIMenu("PDM Car Shop", "~r~UTILITIES")_menuPool.Add(utilityMenu)For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))utilityMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextutilityMenu.RefreshIndex()mainMenu.BindMenuToItem(utilityMenu, itemUtility)End SubPublic Sub ReadArmoured()Dim format As New BTEFormatReader(armoured, parameters)_menuPool.Add(armouredMenu)Dim qty As Integer = format.Count - 1armouredMenu = New UIMenu("PDM Car Shop", "~r~ARMOURED")For i As Integer = 0 To format.Count - 1Dim item As New UIMenuItem(format(i)("name") & " $" & format(i)("price"))armouredMenu.AddItem(item)With item.Hash = format(i)("hash").Model = format(i)("model").Price = format(i)("price")End WithNextarmouredMenu.RefreshIndex()mainMenu.BindMenuToItem(armouredMenu, itemArmoured)End SubPublic Sub New()AddHandler Tick, AddressOf OnTickAddHandler KeyDown, AddressOf OnKeyDown_menuPool = New MenuPool()mainMenu = New UIMenu("PDM Car Shop", "~b~CATEGORIES")_menuPool.Add(mainMenu)mainMenu.AddItem(itemMotor)mainMenu.AddItem(itemCompact)mainMenu.AddItem(itemCoupe)mainMenu.AddItem(itemSedan)mainMenu.AddItem(itemSport)mainMenu.AddItem(itemClassic)mainMenu.AddItem(itemExotic)mainMenu.AddItem(itemMuscle)mainMenu.AddItem(itemOffRoad)mainMenu.AddItem(itemSuv)mainMenu.AddItem(itemVan)mainMenu.AddItem(itemUtility)mainMenu.AddItem(itemArmoured)mainMenu.RefreshIndex()ReadMotorcycle()ReadCompact()ReadCoupe()ReadSedan()ReadSport()ReadClassic()ReadExotic()ReadMuscle()ReadOffroad()ReadSuv()ReadVan()ReadUtility()ReadArmoured()AddHandler mainMenu.OnItemSelect, AddressOf ItemSelectHandlerAddHandler motorMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler compactMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler coupeMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler sedanMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler sportMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler classicMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler exoticMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler muscleMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler offroadMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler suvMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler vanMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler utilityMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler armouredMenu.OnItemSelect, AddressOf CategoryItemSelectHandlerAddHandler motorMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler compactMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler coupeMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler sedanMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler sportMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler classicMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler exoticMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler muscleMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler offroadMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler suvMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler vanMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler utilityMenu.OnIndexChange, AddressOf CategoryItemChangeAddHandler armouredMenu.OnIndexChange, AddressOf CategoryItemChangeEnd SubPublic Sub ItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)UI.Notify("You have selected: ~b~" + selectedItem.Text)End SubPublic Sub CategoryItemSelectHandler(sender As UIMenu, selectedItem As UIMenuItem, index As Integer)Dim nl = Environment.NewLineUI.Notify("Name: ~b~" & selectedItem.Text & nl & "~s~Model: ~r~" & selectedItem.Model & nl & "~s~Hash: ~y~" & selectedItem.Hash & nl & "~s~Price: ~g~" & selectedItem.Price)End SubPublic Sub CategoryItemChange(sender As UIMenu, index As Integer)Dim nl = Environment.NewLineUI.ShowSubtitle("Name: ~b~" & sender.MenuItems(index).Text & nl & "~s~Model: ~r~" & sender.MenuItems(index).Model & nl & "~s~Hash: ~y~" & sender.MenuItems(index).Hash & nl & "~s~Price: ~g~" & sender.MenuItems(index).Price)End SubPublic Sub OnTick(o As Object, e As EventArgs)_menuPool.ProcessMenus()End SubPublic Sub OnKeyDown(o As Object, e As KeyEventArgs)If e.KeyCode = Keys.F9 ThenmainMenu.Visible = Not mainMenu.VisibleEnd IfEnd SubEnd Class

 

 

 

I'm not a VB programmer, sorry. Also here's a tip, you can make a button open another menu by using firstMenu.BindMenuToItem(secondMenu, itemThatOpensIt)

 

yes i did! see >>>mainMenu.BindMenuToItem(sedanMenu, itemSedan)

Share this post


Link to post
Share on other sites
GeorgeZhang

 

I have another question:when using ScriptHookVDotNet UI, we have this to trigger a function:

button.Activated += (sender, args) =>        {            UI.Notify("You cannot afford it");        };

my question is, can I do something similar with the NativeUI, so that i don't have to make every button's function in the "OnItemSelect"?

Yeah sure, you can perfectly do that with

item.Activated += (menu, item) =>                 {                       UI.Notify("Button activated");                 }

but I cannot find myItem.Activated, it says: NativeUI.UIMenuItem does not contain a definition for "Activated", am i doing something wrong? can you show me a simple example please?

Share this post


Link to post
Share on other sites
alex8b

It would be great if you merge it into ScriptHookDotNet. That would solve all the problems with distribution/incompatible versions.

Edited by alex8b

Share this post


Link to post
Share on other sites
Guad

 

 

I have another question:when using ScriptHookVDotNet UI, we have this to trigger a function:

button.Activated += (sender, args) =>        {            UI.Notify("You cannot afford it");        };

my question is, can I do something similar with the NativeUI, so that i don't have to make every button's function in the "OnItemSelect"?

Yeah sure, you can perfectly do that with

item.Activated += (menu, item) =>                 {                       UI.Notify("Button activated");                 }

but I cannot find myItem.Activated, it says: NativeUI.UIMenuItem does not contain a definition for "Activated", am i doing something wrong? can you show me a simple example please?

 

 

That's because it was added in 1.0, which was just released. You can get the full changelog and download the release here:

https://github.com/Guad/NativeUI/releases/tag/1.0

Share this post


Link to post
Share on other sites
GeorgeZhang

 

 

 

I have another question:when using ScriptHookVDotNet UI, we have this to trigger a function:

button.Activated += (sender, args) =>        {            UI.Notify("You cannot afford it");        };

my question is, can I do something similar with the NativeUI, so that i don't have to make every button's function in the "OnItemSelect"?

Yeah sure, you can perfectly do that with

item.Activated += (menu, item) =>                 {                       UI.Notify("Button activated");                 }

but I cannot find myItem.Activated, it says: NativeUI.UIMenuItem does not contain a definition for "Activated", am i doing something wrong? can you show me a simple example please?

 

 

That's because it was added in 1.0, which was just released. You can get the full changelog and download the release here:

https://github.com/Guad/NativeUI/releases/tag/1.0

 

nice, got it working! great update thanks:) so, every button needs to have a name? Though I can't understand, ScriptHookVDotNet's example shows that it add a button and change it and add it as another, that seems weird but it works:

        var button = new MenuButton( "Player", "Opens the menu with \nplayer commands" );        button.Activated += ( sender, args ) => this.OpenPlayerMenu();        menuItems.Add( button );        button = new MenuButton( "Weapons", "Opens the menu with \nweapon commands" );        button.Activated += ( sender, args ) => this.OpenWeaponMenu();        menuItems.Add( button );
Edited by GeorgeZhang

Share this post


Link to post
Share on other sites
Guad

 

 

 

 

I have another question:when using ScriptHookVDotNet UI, we have this to trigger a function:

button.Activated += (sender, args) =>        {            UI.Notify("You cannot afford it");        };

my question is, can I do something similar with the NativeUI, so that i don't have to make every button's function in the "OnItemSelect"?

Yeah sure, you can perfectly do that with

item.Activated += (menu, item) =>                 {                       UI.Notify("Button activated");                 }

but I cannot find myItem.Activated, it says: NativeUI.UIMenuItem does not contain a definition for "Activated", am i doing something wrong? can you show me a simple example please?

 

 

That's because it was added in 1.0, which was just released. You can get the full changelog and download the release here:

https://github.com/Guad/NativeUI/releases/tag/1.0

 

nice, got it working! great update thanks:) so, every button needs to have a name? Though I can't understand, ScriptHookVDotNet's example shows that it add a button and change it and add it as another, that seems weird but it works:

        var button = new MenuButton( "Player", "Opens the menu with \nplayer commands" );        button.Activated += ( sender, args ) => this.OpenPlayerMenu();        menuItems.Add( button );        button = new MenuButton( "Weapons", "Opens the menu with \nweapon commands" );        button.Activated += ( sender, args ) => this.OpenWeaponMenu();        menuItems.Add( button );

 

The example you provided would work with NativeUI.

Not all buttons have to be initialised into a variable, but it helps.

Share this post


Link to post
Share on other sites
alex8b

Great mod!

 

I have few feature requests.

 

1. Slider control

2. Find element by value, not by index in the constructor.

Share this post


Link to post
Share on other sites
frodzet

Thanks man! This is sweet! We can finally get some good looking UI's without having to spend hours developing our own :-)

 

I haven't tested it thoroughly out yet, but i was wondering if we can add complete arrays/lists as new menu items? Like we can in scripthookvdotnet:

List<IMenuItem> menuItems = new List<IMenuItem>();var buttonX = new MenuButton("X");menuItems.Add(buttonX);var mainMenu = new Menu("X Menu", menuItems.ToArray());

(I personally really like this format)

 

Or would we have to do something like:

List<UIMenuItem> menuItems = new List<UIMenuItem>();var buttonX = new UIMenuItem("X");menuItems.Add(buttonX);var mainMenu = new UIMenu("Main Menu", "WHATEVER");foreach (UIMenuItem item in menuItems){    mainMenu.AddItem(item);}

Share this post


Link to post
Share on other sites
Guad

 

Thanks man! This is sweet! We can finally get some good looking UI's without having to spend hours developing our own :-)

 

I haven't tested it thoroughly out yet, but i was wondering if we can add complete arrays/lists as new menu items? Like we can in scripthookvdotnet:

List<IMenuItem> menuItems = new List<IMenuItem>();var buttonX = new MenuButton("X");menuItems.Add(buttonX);var mainMenu = new Menu("X Menu", menuItems.ToArray());

(I personally really like this format)

 

Or would we have to do something like:

List<UIMenuItem> menuItems = new List<UIMenuItem>();var buttonX = new UIMenuItem("X");menuItems.Add(buttonX);var mainMenu = new UIMenu("Main Menu", "WHATEVER");foreach (UIMenuItem item in menuItems){    mainMenu.AddItem(item);}

 

Yeah, you'd have to do the second option.

Share this post


Link to post
Share on other sites
ayylmao420

The menu is called automatically, but i want to have the menu spawned via a event and rather not a key. It doesn't matter if you instantiate the menu like ExampleMenu test = new ExampleMenu(); it still gets called automatically. The problem is i can't call the menu in a static void, because .visible doesn't seem to work outside of the examplemenu.

Share this post


Link to post
Share on other sites
frodzet

 

 

Thanks man! This is sweet! We can finally get some good looking UI's without having to spend hours developing our own :-)

 

I haven't tested it thoroughly out yet, but i was wondering if we can add complete arrays/lists as new menu items? Like we can in scripthookvdotnet:

List<IMenuItem> menuItems = new List<IMenuItem>();var buttonX = new MenuButton("X");menuItems.Add(buttonX);var mainMenu = new Menu("X Menu", menuItems.ToArray());

(I personally really like this format)

 

Or would we have to do something like:

List<UIMenuItem> menuItems = new List<UIMenuItem>();var buttonX = new UIMenuItem("X");menuItems.Add(buttonX);var mainMenu = new UIMenu("Main Menu", "WHATEVER");foreach (UIMenuItem item in menuItems){    mainMenu.AddItem(item);}

 

Yeah, you'd have to do the second option.

 

 

It's not a deal breaker anyways :-) By the way, you should just fix the example code slighty, as you can see, hitting F5 while on another menu than the mainMenu will cause the mainMenu to interfere with the current menu, it should instead either handleback one step like the backspace does or it should completely close all menus :-)

Share this post


Link to post
Share on other sites
GeorgeZhang

ok, there's another thing happening: evey UIMenuListItems in my menu appear like this < option > rather than < option > if you know what i mean. there's a unwanted blank at the left side, how can I fix it??

Share this post


Link to post
Share on other sites
Guad

The menu is called automatically, but i want to have the menu spawned via a event and rather not a key. It doesn't matter if you instantiate the menu like ExampleMenu test = new ExampleMenu(); it still gets called automatically. The problem is i can't call the menu in a static void, because .visible doesn't seem to work outside of the examplemenu.

Just set your menu as a global variable.

 

 

 

 

 

Thanks man! This is sweet! We can finally get some good looking UI's without having to spend hours developing our own :-)

 

I haven't tested it thoroughly out yet, but i was wondering if we can add complete arrays/lists as new menu items? Like we can in scripthookvdotnet:

List<IMenuItem> menuItems = new List<IMenuItem>();var buttonX = new MenuButton("X");menuItems.Add(buttonX);var mainMenu = new Menu("X Menu", menuItems.ToArray());

(I personally really like this format)

 

Or would we have to do something like:

List<UIMenuItem> menuItems = new List<UIMenuItem>();var buttonX = new UIMenuItem("X");menuItems.Add(buttonX);var mainMenu = new UIMenu("Main Menu", "WHATEVER");foreach (UIMenuItem item in menuItems){    mainMenu.AddItem(item);}

 

Yeah, you'd have to do the second option.

 

 

 

It's not a deal breaker anyways :-) By the way, you should just fix the example code slighty, as you can see, hitting F5 while on another menu than the mainMenu will cause the mainMenu to interfere with the current menu, it should instead either handleback one step like the backspace does or it should completely close all menus :-)

 

 

Ah yes, you can use myMenuPool.IsAnyMenuOpen() or myMenuPool.CloseAllMenus(). I'll fix it.

ok, there's another thing happening: evey UIMenuListItems in my menu appear like this < option > rather than < option > if you know what i mean. there's a unwanted blank at the left side, how can I fix it??

 

Well that's just how string measurement works at the moment, i'll fix try to fix it later, but for now you can insert spaces to "balance" it out.

Share this post


Link to post
Share on other sites
ISOFX

Hi Guad, i have a question , can you turn a option on and off or is that the check box item.

Thanks :)

 

EDIT: ANOTHER QUESTION

 

can someone help me?

why doesnt my options link with the function? the functions dont work. why? The menu works but not the options.

http://pastebin.com/1k31HSGG

 

NOTE: im just playing around with this. :D

Edited by ISOFX

Share this post


Link to post
Share on other sites
Guad

Hi Guad, i have a question , can you turn a option on and off or is that the check box item.

Thanks :)

 

EDIT: ANOTHER QUESTION

 

can someone help me?

why doesnt my options link with the function? the functions dont work. why? The menu works but not the options.

http://pastebin.com/1k31HSGG

 

NOTE: im just playing around with this. :D

 

You can use a checkbox to turn something on/off.

Your OnItemSelect handler is wrong, you should check whether an item is the item you want, not viceversa.

Share this post


Link to post
Share on other sites
Guad

Version 1.1 is out, you can now mouse over a screen side and the camera will rotate. Also some minor fixed, changelog here.

Share this post


Link to post
Share on other sites
frodzet

Version 1.1 is out, you can now mouse over a screen side and the camera will rotate. Also some minor fixed, changelog here.

 

Great, thanks man :-) Really a sweet thing you got going here :-)

 

Oh remember to update the example in the Getting Started as well :-)

Edited by frodzet

Share this post


Link to post
Share on other sites
ISOFX

Hey Guad , do you know why i get 14 errors? i got the latest scripthookvdotnet and NativeUI in the reference but i get these errors -

 

Error 1 - The type or namespace name 'UIMenuItem' could not be found (are you missing a using directive or an assembly reference?)
Error 2 - The type or namespace name 'UIMenu' could not be found (are you missing a using directive or an assembly reference?)
Error 3 - The type or namespace name 'MenuPool' could not be found (are you missing a using directive or an assembly reference?)
Can you help me resolve these errors? Thanks :D

Share this post


Link to post
Share on other sites
Guad

 

Hey Guad , do you know why i get 14 errors? i got the latest scripthookvdotnet and NativeUI in the reference but i get these errors -

 

Error 1 - The type or namespace name 'UIMenuItem' could not be found (are you missing a using directive or an assembly reference?)
Error 2 - The type or namespace name 'UIMenu' could not be found (are you missing a using directive or an assembly reference?)
Error 3 - The type or namespace name 'MenuPool' could not be found (are you missing a using directive or an assembly reference?)
Can you help me resolve these errors? Thanks :D

 

 

Make sure you didn't move the NativeUI.dll after you've added it to References and placed a using NativeUI; at the top of your script.

Share this post


Link to post
Share on other sites
ayylmao420

 

The menu is called automatically, but i want to have the menu spawned via a event and rather not a key. It doesn't matter if you instantiate the menu like ExampleMenu test = new ExampleMenu(); it still gets called automatically. The problem is i can't call the menu in a static void, because .visible doesn't seem to work outside of the examplemenu.

Just set your menu as a global variable.

 

 

 

i tried that, it doesn't register it because im calling it from a static void

 

public UIMenu mainMenu;

Edited by ayylmao420

Share this post


Link to post
Share on other sites
frodzet

 

 

The menu is called automatically, but i want to have the menu spawned via a event and rather not a key. It doesn't matter if you instantiate the menu like ExampleMenu test = new ExampleMenu(); it still gets called automatically. The problem is i can't call the menu in a static void, because .visible doesn't seem to work outside of the examplemenu.

Just set your menu as a global variable.

 

 

 

i tried that, it doesn't register it because im calling it from a static void

 

public UIMenu mainMenu;

 

 

The question is then, why are you calling it from a static void? For what particular reason are you using static? :-) You could just set the UIMenu mainMenu to be static aswell.

 

Else you would just have to reference the class by instantiating a new instance of it.

 

MenuExample myExample = new MenuExample();

 

and then to work with stuff that says that an object reference is required you just say myExample.WhatEverFunction

 

IMO static is bad practice, it doesn't really involve true OOP, which is the beauty of C# :-)

Edited by frodzet

Share this post


Link to post
Share on other sites
ISOFX

Just figured it out before you replied lol anyway if you could help me one more time i will be very greatful, Thanks :D

Ok, i have some code but it doesnt work. Do you know why this doesnt work?

http://pastebin.com/fTLFFqAa

Share this post


Link to post
Share on other sites
frodzet

Meh..

Edited by frodzet

Share this post


Link to post
Share on other sites
ISOFX

Hello Again, sorry for asking so many questions but can someone help me with this code, it doesnt seem to work.

Thanks :D

http://pastebin.com/D7D52tmb

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.