Big Smoker Posted August 1, 2021 Share Posted August 1, 2021 (edited) Boa noite, Por favor estou o dia todo tentando achar uma solução e nao consigo. Eu quero que quando eu clique em salvar ele puxa o que esta escrito na grilist sem que eu selecione na lista. Tentei usar guiGridListSetItemData e mesmo assim nao puxa pois quando eu coloco o guiGridListGetItemData tem que seleciona o item na grislist, vou mandar a função abaixo para que possa me ajudar. Ficarei muito grato, OBRIGADO -------------------------------------------------------------- --- PUXAR FUNÇÃO SELECIONADA if source == saveB then -- Save local memberr = guiGridListAddRow(BasePanelGridlisteRanks) local playerData = guiGridListGetItemData(BasePanelGridlisteRanks, guiGridListGetItemText(BasePanelGridlisteRanks), 2) outputChatBox(tostring(playerData)) end ------------------------------------------------------------------ --- FUNÇÃO QUE SETA O guiGridListSetItemData addEventHandler("onClientGUIDoubleClick",getRootElement(), function () if source == BasePanelGridlisteRanks then local NamesRanks = guiGridListGetItemText(BasePanelGridlisteRanks,guiGridListGetSelectedItem(BasePanelGridlisteRanks),1) local playerRanks = guiGridListGetItemText(BasePanelGridlisteRanks,guiGridListGetSelectedItem(BasePanelGridlisteRanks),2) local playerRanks2 = guiGridListGetSelectedItem(BasePanelGridlisteRanks) -- local playerData = guiGridListGetItemData(BasePanelGridlisteRanks, guiGridListGetSelectedItem(BasePanelGridlisteRanks), 2) -- outputChatBox(tostring(playerData)) if NamesRanks ~= "" then if tostring(playerRanks) == "ON" then state = "OFF" else state = "ON" end guiGridListSetItemText(BasePanelGridlisteRanks,tostring(playerRanks2),BasePanelColumnRanks30,tostring(state),false,false) guiGridListSetItemData(BasePanelGridlisteRanks,tostring(playerRanks2),BasePanelColumnRanks30,tostring(state)) -- AQUI USEI A DATA if state == "ON" then guiGridListSetItemColor(BasePanelGridlisteRanks,tostring(playerRanks2),BasePanelColumnRanks30,0,255,0) else guiGridListSetItemColor(BasePanelGridlisteRanks,tostring(playerRanks2),BasePanelColumnRanks30,255,0,0) end end end end) Edited August 1, 2021 by BruXo enviando mais dados. Link to comment
Big Smoker Posted August 4, 2021 Author Share Posted August 4, 2021 alguem para me ajudar? Link to comment
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