ThymonA / menuv

FiveM menu library for creating menu's with NUI
https://menuv.fivem.io/api/
GNU General Public License v3.0
111 stars 130 forks source link

How to check the value of a btn ? #48

Closed ahcenezdh closed 2 years ago

ahcenezdh commented 2 years ago

Hey i want to know when a player select a specific button

I try this

    local btn_cars = menuCateg:AddButton({icon = '', label = label, select = function(btn)
                        print(btn) -- print the UUID
                    end})

But the callback return the UUID, not the value of the btn.

ahcenezdh commented 2 years ago

I tried this too but doesn't work

              btn_cars:On('select', function(btn)
                        print(btn) -- return the UUID too
                    end)
                end
ahcenezdh commented 2 years ago

Edit : i found the problem, is because i didn't defined a value when i created my btn.