Big Smoker Posted October 1, 2020 Share Posted October 1, 2020 Bom dia, estou com dificuldade na minha grilist eu coloco pra escrever o nome do jogador no guiGetText so que ele nao aparece na grilist mais quando eu apago ela funciona a função de quando apaga o texto funciona, mais a que procura o nome do jogador nao. function editAddPlayer() guiGridListClear(BGUIGridlist3) local text = guiGetText ( source ) if ( text == "" ) then guiGridListClear ( BGUIGridlist3 ) for id,player in ipairs(getElementsByType("player")) do local NamePlayer = getPlayerName(player):gsub('#%x%x%x%x%x%x',''):gsub('#%x%x%x%x%x%x','') local row = guiGridListAddRow ( BGUIGridlist3 ) guiGridListSetItemText ( BGUIGridlist3, row, BavailablePlayesColumn,NamePlayer, false, false ) guiGridListSetItemText ( BGUIGridlist3, row, BavailablePlayesColumn2,getElementData(player,"BaseAccountName"), false, false ) outputChatBox("1") end else guiGridListClear ( BGUIGridlist3 ) for id,player in ipairs(getElementsByType("player")) do local NamePlayer = getPlayerName(player):gsub('#%x%x%x%x%x%x',''):gsub('#%x%x%x%x%x%x','') if ( string.find ( string.upper ( tostring(NamePlayer) ), string.upper ( text ), 1, true ) ) then local row = guiGridListAddRow ( BGUIGridlist3 ) guiGridListSetItemText ( BGUIGridlist3, row, BavailablePlayesColumn,NamePlayer, false, false ) guiGridListSetItemText ( BGUIGridlist3, row, BavailablePlayesColumn2,getElementData(player,"BaseAccountName"), false, false ) end end guiGridListClear(BGUIGridlist3) end end 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