Jump to content

button no work :(


Electrosumm

Recommended Posts

Hi,

i work on test report system_just work or not :D but the buttons don work why ?

and how can i do the buttons invisible cause i have img with buttons :P

local screenWidth,screenHeight = guiGetScreenSize() 
  
function reportmain () 
  
panel = guiCreateStaticImage ( screenWidth/2 - 50, 300, 500, 600, 'hatter.png', false) 
showCursor(true) 
hiba = guiCreateRadioButton (100,115,40,40,"",false,panel) 
otlet = guiCreateRadioButton (100,215,40,40,"",false,panel) 
kuld = guiCreateButton (30,500,155,85,"AAAAAAAAAAAAAAAAA",false,panel) 
bezar = guiCreateButton(260,500,220,85,"AAAAAAAAAAAAAAAA",false,panel) 
addEventHandler("onClientGuiClick", kuld, kuldes, false) 
addEventHandler("onClientGuiClick", bezar, bezarom, false) 
end 
addCommandHandler("tutoka2",reportmain) 
  
function kuldes () 
  
outputChatBox("megy") 
  
end 
  
function bezarom () 
  
showCursor(false) 
  
guiSetVisible(panel, false) 
  
end 
addCommandHandler("tutoka2",reportmain) 

Link to comment
local screenWidth,screenHeight = guiGetScreenSize() 
  
  
panel = guiCreateStaticImage ( screenWidth/2 - 50, 300, 500, 600, 'hatter.png', false) 
showCursor(true) 
hiba = guiCreateRadioButton (100,115,40,40,"",false,panel) 
otlet = guiCreateRadioButton (100,215,40,40,"",false,panel) 
kuld = guiCreateButton (30,500,155,85,"AAAAAAAAAAAAAAAAA",false,panel) 
bezar = guiCreateButton(260,500,220,85,"AAAAAAAAAAAAAAAA",false,panel) 
addCommandHandler("tutoka2", 
function () 
guiSetVisible(panel,true) 
end) 
  
function kuldes () 
  
outputChatBox("megy") 
  
end 
  
function bezarom () 
  
showCursor(false) 
  
guiSetVisible(panel, false) 
  
end 
  
addEventHandler("onClientGUIClick", kuld, kuldes) 
addEventHandler("onClientGUIClick", bezar, bezarom) 
  

Link to comment

try this

local screenWidth,screenHeight = guiGetScreenSize() 
  
  
panel = guiCreateStaticImage ( screenWidth/2 - 50, 300, 500, 600, 'hatter.png', false) 
showCursor(true) 
hiba = guiCreateRadioButton (100,115,40,40,"",false,panel) 
otlet = guiCreateRadioButton (100,215,40,40,"",false,panel) 
kuld = guiCreateButton (30,500,155,85,"AAAAAAAAAAAAAAAAA",false,panel) 
bezar = guiCreateButton(260,500,220,85,"AAAAAAAAAAAAAAAA",false,panel) 
addCommandHandler("tutoka2",--ur command 
function () 
guiSetVisible(panel,true) 
end) 
  
function kuldes () 
  
outputChatBox("megy") 
  
end 
  
function bezarom () 
  
showCursor(false) 
  
guiSetVisible(panel, false) 
  
end 
  
addEventHandler("onClientGUIClick", kuld, kuldes)--event  handler 
addEventHandler("onClientGUIClick", bezar, bezarom)--event handler 
  

Link to comment

try this

local screenWidth,screenHeight = guiGetScreenSize() 
  
  
panel = guiCreateStaticImage ( screenWidth/2 - 50, 300, 500, 600, 'hatter.png', false) 
showCursor(true) 
hiba = guiCreateRadioButton (100,115,40,40,"",false,panel) 
otlet = guiCreateRadioButton (100,215,40,40,"",false,panel) 
kuld = guiCreateButton (30,500,155,85,"AAAAAAAAAAAAAAAAA",false,panel) 
bezar = guiCreateButton(260,500,220,85,"AAAAAAAAAAAAAAAA",false,panel) 
guiSetAlpha(bezar,0.00) 
guiSetAlpha(kuld,0.00) 
addCommandHandler("tutoka2",--ur command 
function () 
guiSetVisible(panel,true) 
end) 
  
function kuldes () 
  
outputChatBox("megy") 
  
end 
  
function bezarom () 
  
showCursor(false) 
  
guiSetVisible(panel, false) 
  
end 
  
addEventHandler("onClientGUIClick", kuld, kuldes)--event  handler 
addEventHandler("onClientGUIClick", bezar, bezarom)--event handler 
  

Link to comment

now i have only one problem...when i start the script the panel will show on screen its work okey but i want to see the panel when i type the command not instant

local screenWidth,screenHeight = guiGetScreenSize() 
  
panel = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'hatter.png', false) 
keszit = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'keszit.png', false) 
valaszolo = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'Valaszolo.png', false) 
showCursor(true) 
ticketlista = guiCreateGridList(5, 90, 600, 300, false, panel) 
olvas = guiCreateButton (600,50,600,350,"",false,panel) 
valaszol = guiCreateButton(600,190,250,95,"",false,panel) 
torol = guiCreateButton (600,300,250,80,"",false,panel) 
kuld = guiCreateButton (5,400,230,85,"",false,panel) 
bezar = guiCreateButton(600,400,220,90,"",false,panel) 
bezar1 = guiCreateButton(600,400,220,90,"",false,keszit) 
guiSetAlpha(olvas,0.00) 
guiSetAlpha(valaszol,0.00) 
guiSetAlpha(torol,0.00) 
guiSetAlpha(kuld,0.00) 
guiSetAlpha(bezar,0.00) 
guiSetAlpha(bezar1,0.00) 
addCommandHandler("tutoka2", 
function () 
showCursor(true) 
guiSetVisible(panel,true) 
guiSetVisible(keszit,false) 
guiSetVisible(valaszolo,false) 
end) 
  
function kuldes () 
  
showCursor(true) 
  
guiSetVisible(valaszolo,false) 
guiSetVisible(panel,false) 
guiSetVisible(keszit,true) 
  
  
end 
  
function bezarom () 
  
showCursor(false) 
  
guiSetVisible(panel, false) 
guiSetVisible(keszit, false) 
  
end 
  
addEventHandler("onClientGUIClick", kuld, kuldes) 
addEventHandler("onClientGUIClick", bezar, bezarom) 
addEventHandler("onClientGUIClick", bezar1, bezarom) 

Link to comment

i recommend you to read this : Wiki Page.

i don't know What are you trying to do there is many things wrong in your code try this:

local screenWidth,screenHeight = guiGetScreenSize() 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function () 
    panel = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'hatter.png', false) 
    keszit = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'keszit.png', false) 
    valaszolo = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'Valaszolo.png', false) 
    guiWindowSetSizable(panel, false) 
    guiSetAlpha(panel, 1.00) 
    guiSetVisible(panel, false) 
    ticketlista = guiCreateGridList(5, 90, 600, 300, false, panel) 
     
    -- Buttons 
    olvas = guiCreateButton (600,50,600,350,"",false,panel) 
    valaszol = guiCreateButton(600,190,250,95,"",false,panel) 
    torol = guiCreateButton (600,300,250,80,"",false,panel) 
    kuld = guiCreateButton (5,400,230,85,"",false,panel) 
    bezar = guiCreateButton(600,400,220,90,"",false,panel) 
    bezar1 = guiCreateButton(600,400,220,90,"",false,keszit) 
     
    -- Events 
    addEventHandler("onClientGUIClick", bezar, kuldes,false) 
    addEventHandler("onClientGUIClick", bezar1, bezarom,false) 
  
end  
) 
  
addCommandHandler("tutoka2", 
function () 
    guiSetVisible(panel,true) 
    guiSetVisible(keszit,false) 
    guiSetVisible(valaszolo,false) 
    showCursor(true) 
end) 
  
function kuldes () 
    guiSetVisible(valaszolo,false) 
    guiSetVisible(panel,false) 
    guiSetVisible(keszit,true) 
    showCursor(true) 
end 
  
function bezarom () 
    guiSetVisible(panel, false) 
    guiSetVisible(keszit, false) 
    showCursor(false) 
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...