Jump to content

Help


yMassai

Recommended Posts

    wantedJanela = guiCreateWindow(76,58,171,21,"",false) 
    editWanted = guiCreateEdit(76,58,171,21,"",false,wantedJanela) 
  
function Visible () 
        guiSetVisible ( wantedJanela, true ) 
        showCursor(true) 
    end 
end 
addCommandHandler ( "wantedstats", Visible ) 

Hello I had a new idea and I'm already in the production of another script that will be available for download within a few days.

I have never used the function "addCommandHandler".

Link to comment
   wantedJanela = guiCreateWindow(76,58,171,21,"",false) 
    editWanted = guiCreateEdit(76,58,171,21,"",false,wantedJanela) 
guiSetVisible ( wantedJanela, false) 
  
function Visible () 
     guiSetVisible ( wantedJanela, true ) 
     showCursor(true) 
end 
addCommandHandler ( "wantedstats", Visible ) 

Link to comment
  
  wantedJanela = guiCreateWindow(76,58,171,21,"",false) 
    editWanted = guiCreateEdit(76,58,171,21,"",false,wantedJanela) 
guiSetVisible ( wantedJanela, false) 
  
function Visible () 
     guiSetVisible ( wantedJanela, not guiGetVisible(wantedJanela) ) 
     showCursor(guiGetVisible(wantedJanela) ) 
end 
addCommandHandler ( "wantedstats", Visible ) 
  

will be better

Link to comment
function CreateWantedGUI() 
  
    wantedJanela = guiCreateWindow(76,58,171,21,"",false) 
    editWanted = guiCreateEdit(76,58,171,21,"",false,wantedJanela) 
    guiSetVisible ( wantedJanela, false) 
  
end 
addEventHandler("onClientResourceStart", getRootElement(), CreateWantedGUI) 
  
function Visible () 
     guiSetVisible ( wantedJanela, not guiGetVisible(wantedJanela) ) 
     showCursor(guiGetVisible(wantedJanela) ) 
end 
addCommandHandler ( "wantedstats", Visible ) 

Link to comment
function CriarJanela() 
  
    wantedJanela = guiCreateWindow(80,80,250,250,"",false) 
--labels 
    labelJanela = guiCreateLabel(20,20,250,60,"Janela de Alteração de Wanted Stats",false,wantedJanela) 
    labelNome = guiCreateLabel(10,55,250,60,"Nome do Jogador :",false,wantedJanela) 
    labelWanted = guiCreateLabel(30,90,250,60,"Wanted Level :",false,wantedJanela) 
  
--edit 
    editWanted1 = guiCreateEdit(120,50,120,25,"",false,wantedJanela) 
    editWanted2 = guiCreateEdit(160,85,80,25,"",false,wantedJanela) 
    buttonAlterar = guiCreateButton(0,210,120,30,"Alterar o Stats",false,wantedJanela) 
  
--Radio 
    buttonRadio1 = guiCreateRadioButton(170,110,50,50,"Adicionar",false,wantedJanela) 
    buttonRadio2 = guiCreateRadioButton(170,140,50,50,"Remover",false,wantedJanela) 
  
  
    buttonFechar = guiCreateButton(130,210,120,30,"Fechar",false,wantedJanela) 
end 
  addEventHandler("onClientGUIClick", buttonFechar, Fechar) 
  
addEventHandler("onClientResourceStart", getRootElement, CriaJanela) 
  
    guiSetVisible ( wantedJanela, false) 
    guiWindowSetSizable(wantedJanela,false) 
  
function Fechar() 
        guiSetVisible ( wantedJanela, true ) 
        showCursor ( true ) 
    end 
end 
  
function Visible () 
     guiSetVisible ( wantedJanela, true ) 
     showCursor(true) 
    end 
end 
addCommandHandler ( "wantedstats", Visible ) 

WARNING: Loading script failed: WantedTest\client.lua:32 '' expected near 'end'

Link to comment
function CriarJanela() 
  
    wantedJanela = guiCreateWindow(80,80,250,250,"",false) 
--labels 
    labelJanela = guiCreateLabel(20,20,250,60,"Janela de Alteração de Wanted Stats",false,wantedJanela) 
    labelNome = guiCreateLabel(10,55,250,60,"Nome do Jogador :",false,wantedJanela) 
    labelWanted = guiCreateLabel(30,90,250,60,"Wanted Level :",false,wantedJanela) 
  
--edit 
    editWanted1 = guiCreateEdit(120,50,120,25,"",false,wantedJanela) 
    editWanted2 = guiCreateEdit(160,85,80,25,"",false,wantedJanela) 
    buttonAlterar = guiCreateButton(0,210,120,30,"Alterar o Stats",false,wantedJanela) 
  
--Radio 
    buttonRadio1 = guiCreateRadioButton(170,110,50,50,"Adicionar",false,wantedJanela) 
    buttonRadio2 = guiCreateRadioButton(170,140,50,50,"Remover",false,wantedJanela) 
  
  
    buttonFechar = guiCreateButton(130,210,120,30,"Fechar",false,wantedJanela) 
end 
  addEventHandler("onClientGUIClick", buttonFechar, Fechar) 
  
addEventHandler("onClientResourceStart", getRootElement, CriaJanela) 
  
    guiSetVisible ( wantedJanela, false) 
    guiWindowSetSizable(wantedJanela,false) 
  
function Fechar() 
        guiSetVisible ( wantedJanela, true ) 
        showCursor ( true ) 
  
end 
  
function Visible () 
     guiSetVisible ( wantedJanela, true ) 
     showCursor(true) 
  
end 
addCommandHandler ( "wantedstats", Visible ) 

Link to comment

Here

function CriarJanela() 
  
    wantedJanela = guiCreateWindow(80,80,250,250,"",false) 
--labels 
    labelJanela = guiCreateLabel(20,20,250,60,"Janela de Alteração de Wanted Stats",false,wantedJanela) 
    labelNome = guiCreateLabel(10,55,250,60,"Nome do Jogador :",false,wantedJanela) 
    labelWanted = guiCreateLabel(30,90,250,60,"Wanted Level :",false,wantedJanela) 
  
--edit 
    editWanted1 = guiCreateEdit(120,50,120,25,"",false,wantedJanela) 
    editWanted2 = guiCreateEdit(160,85,80,25,"",false,wantedJanela) 
    buttonAlterar = guiCreateButton(0,210,120,30,"Alterar o Stats",false,wantedJanela) 
  
--Radio 
    buttonRadio1 = guiCreateRadioButton(170,110,50,50,"Adicionar",false,wantedJanela) 
    buttonRadio2 = guiCreateRadioButton(170,140,50,50,"Remover",false,wantedJanela) 
    buttonFechar = guiCreateButton(130,210,120,30,"Fechar",false,wantedJanela) 
end 
  addEventHandler("onClientGUIClick", buttonFechar, Fechar) 
  
addEventHandler("onClientResourceStart", getRootElement, CriaJanela) 
  
    guiSetVisible ( wantedJanela, false) 
    guiWindowSetSizable(wantedJanela,false) 
  
function Fechar() 
        guiSetVisible ( wantedJanela, true ) 
        showCursor ( true ) 
    end 
  
function Visible () 
     guiSetVisible ( wantedJanela, true ) 
     showCursor(true) 
 end 
addCommandHandler ( "wantedstats", Visible ) 

Link to comment

updated again.

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
function CriarJanela() 
local root = getRootElement() 
    wantedJanela = guiCreateWindow(80,80,250,250,"",false) 
    guiWindowSetSizable(wantedJanela,false) 
--labels 
    labelJanela = guiCreateLabel(20,20,250,60,"Janela de Alteraç?o de Wanted Stats",false,wantedJanela) 
    labelNome = guiCreateLabel(10,55,250,60,"Nome do Jogador :",false,wantedJanela) 
    labelWanted = guiCreateLabel(30,90,250,60,"Wanted Level :",false,wantedJanela) 
--edit 
    editWanted1 = guiCreateEdit(120,50,120,25,"",false,wantedJanela) 
    editWanted2 = guiCreateEdit(160,85,80,25,"",false,wantedJanela) 
    buttonAlterar = guiCreateButton(0,210,120,30,"Alterar o Stats",false,wantedJanela) 
--Radio 
    buttonRadio1 = guiCreateRadioButton(170,110,50,50,"Adicionar",false,wantedJanela) 
    buttonRadio2 = guiCreateRadioButton(170,140,50,50,"Remover",false,wantedJanela) 
    buttonFechar = guiCreateButton(130,210,120,30,"Fechar",false,wantedJanela) 
    guiSetVisible ( wantedJanela, false ) 
    showCursor ( false ) 
end 
addEventHandler( "onClientResourceStart", getRootElement( ), CriarJanela) 
  
addEventHandler('onClientGUIClick', root, 
function () 
if ( source == buttonFechar) then 
guiSetVisible ( wantedJanela, true ) 
showCursor ( true ) 
end 
end) 
  
function Visible () 
     guiSetVisible ( wantedJanela, true ) 
     showCursor(true) 
 end 
addCommandHandler ( "wantedstats", Visible ) 

Edited by Guest
Link to comment

Hmm... try it:

    function CriarJanela() 
        local root = getRootElement() 
        wantedJanela = guiCreateWindow(80,80,250,250,"",false) 
        guiWindowSetSizable(wantedJanela,false) 
    --labels 
        labelJanela = guiCreateLabel(20,20,250,60,"Janela de Alteraç?o de Wanted Stats",false,wantedJanela) 
        labelNome = guiCreateLabel(10,55,250,60,"Nome do Jogador :",false,wantedJanela) 
        labelWanted = guiCreateLabel(30,90,250,60,"Wanted Level :",false,wantedJanela) 
    --edit 
        editWanted1 = guiCreateEdit(120,50,120,25,"",false,wantedJanela) 
        editWanted2 = guiCreateEdit(160,85,80,25,"",false,wantedJanela) 
        buttonAlterar = guiCreateButton(0,210,120,30,"Alterar o Stats",false,wantedJanela) 
    --Radio 
        buttonRadio1 = guiCreateRadioButton(170,110,50,50,"Adicionar",false,wantedJanela) 
        buttonRadio2 = guiCreateRadioButton(170,140,50,50,"Remover",false,wantedJanela) 
        buttonFechar = guiCreateButton(130,210,120,30,"Fechar",false,wantedJanela) 
        guiSetInputMode("no_binds_when_editing") 
    end 
    addEventHandler( "onClientResourceStart", getRootElement( ), CriarJanela) 
      
    addEventHandler('onClientGUIClick', root, 
    function () 
        if ( source == buttonFechar) then 
            guiSetVisible ( wantedJanela, true ) 
            showCursor ( true ) 
        end 
    end) 
      
    function Visible () 
         guiSetVisible ( wantedJanela, true ) 
         showCursor(true) 
    end 
    addCommandHandler ( "wantedstats", Visible ) 

Link to comment
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
function CriarJanela() 
local root = getRootElement() 
    wantedJanela = guiCreateWindow(80,80,250,250,"",false) 
    guiWindowSetSizable(wantedJanela,false) 
--labels 
    labelJanela = guiCreateLabel(20,20,250,60,"Janela de Alteração de Wanted Stats",false,wantedJanela) 
    labelNome = guiCreateLabel(10,55,250,60,"Nome do Jogador :",false,wantedJanela) 
    labelWanted = guiCreateLabel(30,90,250,60,"Wanted Level :",false,wantedJanela) 
--edit 
    editWanted1 = guiCreateEdit(120,50,120,25,"",false,wantedJanela) 
    editWanted2 = guiCreateEdit(160,85,80,25,"",false,wantedJanela) 
  
--Memo 
    memoEdit = guiCreateMemo(10,120,230,80,"Identifique o jogador e selecione o nivel de procurado para a alteração, os niveis podem ser de 0-6 .",false,wantedJanela) 
  
--Button 
    buttonAlterar = guiCreateButton(0,210,120,30,"Alterar Nivel",false,wantedJanela) 
  
    buttonFechar = guiCreateButton(130,210,120,30,"Fechar",false,wantedJanela) 
    guiSetVisible ( wantedJanela, false ) 
    showCursor ( false ) 
end 
addEventHandler( "onClientResourceStart", getRootElement( ), CriarJanela) 
  
addEventHandler('onClientGUIClick', root, 
function () 
if ( source == buttonFechar) then 
guiSetVisible ( wantedJanela, false ) 
showCursor ( false ) 
end 
end) 
  
function Visible () 
     guiSetVisible ( wantedJanela, true ) 
     showCursor(true) 
 end 
addCommandHandler ( "wantedstats", Visible ) 

I made some adjustments.

Someone could help me?

I tried to change the level of the player.

the variable editWanted1 is to put the player's name.

and the variable editWanted2 is for identify the level is to obtain the player, either larger or smaller.

the variable buttonAlterar is for change the informations.

Link to comment

This is Just An Example /

local Toyota = getElementData(source,'Level')--- getElementData (Leve) 
--- Just An Example ! 
addEventHandler('onClientGUIClick', root,--- make the event 
function() 
if (source == buttonAlterar) then -- if source press the button then 
guiSetText(editWanted2, Toyota) -- set the gui edit to the level of player 
end 
end) 
--- Just An Example ! 

Link to comment
function createWindow() 
    wantedJanela = guiCreateWindow(80, 80, 250, 250, "", false) 
    guiWindowSetSizable(wantedJanela, false) 
     
    labelJanela = guiCreateLabel(20, 20, 250, 60, "Janela de Alteração de Wanted Stats", false, wantedJanela) 
    labelNome = guiCreateLabel(10, 55, 250, 60, "Nome do Jogador :", false, wantedJanela) 
    labelWanted = guiCreateLabel(30, 90, 250, 60, "Wanted Level :", false, wantedJanela) 
     
    editWanted1 = guiCreateEdit(120, 50, 120, 25, "", false, wantedJanela) 
    editWanted2 = guiCreateEdit(160, 85, 80, 25, "", false, wantedJanela) 
     
    memoEdit = guiCreateMemo(10, 120, 230, 80, "Identifique o jogador e selecione o nivel de procurado para a alteração, os niveis podem ser de 0-6 .", false, wantedJanela) 
     
    buttonAlterar = guiCreateButton(0, 210, 120, 30, "Alterar Nivel", false, wantedJanela) 
    buttonFechar = guiCreateButton(130, 210, 120, 30, "Fechar", false, wantedJanela) 
end 
  
addEventHandler("onClientGUIClick", buttonFechar, 
    function() 
        destroyElement(wantedJanela) 
        showCursor(false) 
        guiSetInputEnabled(false) 
    end, 
    false 
) 
  
addCommandHandler("wantedstats", 
    function() 
        createWindow() 
        showCursor(true) 
        guiSetInputEnabled(true) 
    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...