Closed GLiTcH2 closed 7 months ago
try to shift playerMenu:AddItem(healitem)
under the Activated event, like this:
local healitem = UIMenuItem.New("Heal Player", "Click this to heal yourself!")
healitem:LeftBadge(BadgeStyle.STAR)
playerMenu.OnItemSelect = function(menu, item, index)
if (item == healitem) then
ScaleformUI.Notifications:ShowNotification("Function not yet active!")
end
end
playerMenu:AddItem(healitem)
since you don't have a lot of items in your menu.. try using the item.Activated event itself..
healitem.Activated = function(menu, item)
ScaleformUI.Notifications:ShowNotification("Function not yet active!")
end
try to shift
playerMenu:AddItem(healitem)
under the Activated event, like this:local healitem = UIMenuItem.New("Heal Player", "Click this to heal yourself!") healitem:LeftBadge(BadgeStyle.STAR) playerMenu.OnItemSelect = function(menu, item, index) if (item == healitem) then ScaleformUI.Notifications:ShowNotification("Function not yet active!") end end playerMenu:AddItem(healitem)
Is this the proper way to go about my code, Should I be doing this for all the other items in my menu?
since you don't have a lot of items in your menu.. try using the item.Activated event itself..
healitem.Activated = function(menu, item) ScaleformUI.Notifications:ShowNotification("Function not yet active!") end
Thank you this method got it working again.
playerMenu.OnItemSelect should be working buti suggest to use it when you have 10 items or more.. where you need everything in one place
Ah ok, Thank you for the help!
So I have been working on my menu and slowly getting more familiar with all of this and love it, however when I recently was testing it in the game I noticed the healitem does not show the notification popup anymore, It was working fine and then suddenly just does not display the notification when clicked anymore. I tried to trace my steps back but really haven't changed anything in that part of the code in awhile so I don't know if I messed something up further down... Everything else seems to work just fine. Here is my code if it helps: