Jump to content

How to get active tab or gridlist ?


Miika

Recommended Posts

Hi!

Again.. I have problem with my script. I don't know, how to get active tab or gridlist.

this code doesn't work:

if (guiGetVisible(gridlist[1]) == true) then 
        id = guiGridListGetSelectedItemText(gridlist[1], 2) 
        price = guiGridListGetSelectedItemText(gridlist[1], 3) 
    elseif (guiGetVisible(gridlist[2]) == true) then 
        id = guiGridListGetSelectedItemText(gridlist[2], 2) 
        price = guiGridListGetSelectedItemText(gridlist[2], 3) 
    elseif (guiGetVisible(gridlist[3]) == true) then 
        id = guiGridListGetSelectedItemText(gridlist[3], 2) 
        price = guiGridListGetSelectedItemText(gridlist[3], 3) 
    elseif (guiGetVisible(gridlist[4]) == true) then 
        id = guiGridListGetSelectedItemText(gridlist[4], 2) 
        price = guiGridListGetSelectedItemText(gridlist[4], 3) 
    end 

addEventHandler("onClientGUIClick", button[2], weaponFunc, false) 

function weaponFunc() 
    triggerServerEvent ( "giveWp", resourceRoot, id, price ) 
end 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...