Jump to content

Search the Community

Showing results for tags 'gridlist '.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. I am creating a system where the player can send a message that will be displayed in a gridlist in a panel, but the messages that have been sent are not displayed, only when it's me that I send. SCRIPT: [CLIENT-SIDE] GUIEditor = { label = {} } janela_oc = guiCreateWindow((screenW - 315) / 2, (screenH - 352) / 2, 315, 352, "Chamar Policia", false) guiWindowSetSizable(janela_oc, false) guiSetProperty(janela_oc, "CaptionColour", "FF0718F8") edit_oc = guiCreateEdit(101, 38, 149, 27, "", false, janela_oc) GUIEditor.label[3] = guiCreateLabel(29, 42, 76, 29, "Ocorrência:", false, janela_oc) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(29, 87, 144, 15, "Conte o que aconteceu:", false, janela_oc) guiSetFont(GUIEditor.label[4], "default-bold-small") memo_oc = guiCreateMemo(29, 111, 252, 191, "", false, janela_oc) enviar_oc = guiCreateButton(35, 312, 105, 25, "Enviar", false, janela_oc) guiSetProperty(enviar_oc, "NormalTextColour", "FF43D00B") fechar_ocs = guiCreateButton(157, 312, 105, 25, "Fechar", false, janela_oc) guiSetProperty(fechar_ocs, "NormalTextColour", "FFEF0000") guiSetVisible(janela_oc, false) janela_ocs = guiCreateWindow((screenW - 411) / 2, (screenH - 439) / 2, 411, 439, "Ocorrências", false) guiWindowSetSizable(janela_ocs, false) guiSetProperty(janela_ocs, "CaptionColour", "FF2C1EE0") grid_ocs = guiCreateGridList(23, 32, 367, 284, false, janela_ocs) guiGridListAddColumn(grid_ocs, "Jogador", 0.5) guiGridListAddColumn(grid_ocs, "Ocorrência", 0.5) guiGridListAddColumn(grid_ocs, "Descrição", 0.5) ver_oc = guiCreateButton(51, 343, 114, 35, "Ver Ocorrência", false, janela_ocs) guiSetProperty(ver_oc, "NormalTextColour", "FF3BEB12") del_oc = guiCreateButton(234, 343, 132, 35, "Remover Ocorrência", false, janela_ocs) guiSetProperty(del_oc, "NormalTextColour", "FFDC0000") limpar_oc = guiCreateButton(142, 388, 124, 37, "Limpar Ocorrências", false, janela_ocs) guiSetProperty(limpar_oc, "NormalTextColour", "FFD75406") guiSetVisible(janela_ocs, false) veroc = guiCreateWindow((screenW - 377) / 2, (screenH - 362) / 2, 377, 362, "Ver Ocorrência", false) guiWindowSetSizable(veroc, false) guiSetProperty(veroc, "CaptionColour", "FF0A2FD0") ocd = guiCreateEdit(99, 74, 176, 33, "", false, veroc) guiEditSetReadOnly(ocd, true) GUIEditor.label[1] = guiCreateLabel(22, 84, 67, 18, "Ocorrência:", false, veroc) guiSetFont(GUIEditor.label[1], "default-bold-small") memo = guiCreateMemo(93, 133, 240, 148, "", false, veroc) guiMemoSetReadOnly(memo, true) GUIEditor.label[2] = guiCreateLabel(22, 139, 67, 18, "Descrição:", false, veroc) guiSetFont(GUIEditor.label[2], "default-bold-small") voltar_btn = guiCreateButton(131, 305, 124, 37, "Voltar", false, veroc) guiSetProperty(voltar_btn, "NormalTextColour", "FFD86B01") joglabel = guiCreateLabel(28, 32, 184, 32, "Jogador:", false, veroc) guiSetFont(joglabel, "default-bold-small") guiSetVisible(veroc, false) addCommandHandler("190", function() guiSetVisible(janela_oc, true) showCursor(true) end ) function fecharOc() guiSetVisible(janela_oc, false) showCursor(false) end addEventHandler("onClientGUIClick", fechar_ocs, fecharOc) function criarOcorrencia() -- SEND REPORT FOR 'janela_ocs' if getElementData (getLocalPlayer(), "chamou", true) then outputChatBox ('#c1c1c1Aguarde #ff00005 #c1c1c1minutos para chamar policia novamente.',255,255,255,true) return end if guiGetVisible(janela_oc) == true then if guiGetText(edit_oc) and guiGetText(memo_oc) then local playerName = getPlayerName(getLocalPlayerlayer()) local oc = guiGetText(edit_oc) local desc = guiGetText(memo_oc) local row_oc = guiGridListAddRow(grid_ocs, playerName:gsub('#%x%x%x%x%x%x', ''), oc, desc) guiSetVisible(janela_oc, false) showCursor(false) convertTextToSpeech("Você enviou uma ocorrência", "pt") setElementData(getLocalPlayer(), "chamou", true) setTimer (setElementData, 300000, 1, getLocalPlayer(), "chamou", false) end end end addEventHandler("onClientGUIClick", enviar_oc, criarOcorrencia) function verOcorrencia() if guiGetVisible(janela_ocs) == true then local playerName = guiGridListGetItemText ( grid_ocs, guiGridListGetSelectedItem (grid_ocs), 1 ) local oc = guiGridListGetItemText ( grid_ocs, guiGridListGetSelectedItem (grid_ocs), 2 ) local desc = guiGridListGetItemText ( grid_ocs, guiGridListGetSelectedItem (grid_ocs), 3 ) guiSetVisible(janela_ocs, false) guiSetVisible(veroc, true) guiSetText(joglabel, "Jogador: ".. playerName) guiSetText(ocd, oc) guiSetText(memo, desc) end end addEventHandler("onClientGUIClick", ver_oc, verOcorrencia)
×
×
  • Create New...