Jump to content

Help help


helpme

Recommended Posts

my first script not work

What is the reason?

client

  
GUIEditor_Window = {} 
  
GUIEditor_Button = {} 
  
  
GUIEditor_Image = {} 
  
  
  
  
GUIEditor_Window[1] = guiCreateWindow(158,126,468,387,"eee",false) 
  
bethanfger = guiCreateButton(266,58,169,38,"1",false,GUIEditor_Window[1]) 
  
bethanthher = guiCreateButton(267,119,169,38,"2",false,GUIEditor_Window[1]) 
  
bethanaser = guiCreateButton(269,176,169,38," 3",false,GUIEditor_Window[1]) 
  
bethanmqrab = guiCreateButton(271,233,169,38,"4",false,GUIEditor_Window[1]) 
  
bethanesha = guiCreateButton(269,292,169,38,"5",false,GUIEditor_Window[1]) 
  
  
  
GUIEditor_Image[1] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/1.png",false) 
  
GUIEditor_Image[2] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/2.png",false) 
  
GUIEditor_Image[3] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/3.png",false) 
  
GUIEditor_Image[4] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/4.png",false) 
  
GUIEditor_Image[5] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/5.png",false) 
  
  
  
function ethanfger( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/1.png",true) 
  
               setTimer ( close1, 1200000, 1 ) 
end 
  
function close1( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/1.png",false) 
  
end 
  
  
function ethanthher( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/2.png",true) 
  
                   setTimer ( close2, 1200000, 1 ) 
  
end 
  
  
function close2( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/2.png",false) 
  
end 
  
  
  
function ethanaser( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/3.png",true) 
  
               setTimer ( close3, 1200000, 1 ) 
end 
  
  
function close3( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/3.png",false) 
  
end 
  
  
  
  
function ethanmqrab( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/4.png",true) 
  
               setTimer ( close4, 1200000, 1 ) 
  
end 
  
  
  
function close4( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/4.png",false) 
  
end 
  
  
  
  
function ethanesha( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/5.png",true) 
  
               setTimer ( close5, 1200000, 1 ) 
  
end 
  
  
function close5( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/5.png",false) 
  
end 
  
  
  
  
function ethan () 
getVisible = guiGetVisible (GUIEditor_Window[1]) 
  
if (getVisible == true) then 
    guiSetVisible (GUIEditor_Window[1], false) 
    showCursor (false) 
end 
  
addEventHandler ( "onClientGUIClick", bethanfger, ethanfger, false ) 
addEventHandler ( "onClientGUIClick", bethanthher, ethanthher, false ) 
addEventHandler ( "onClientGUIClick", bethanaser, ethanaser, false ) 
addEventHandler ( "onClientGUIClick", bethanmqrab, ethanmqrab, false ) 
addEventHandler ( "onClientGUIClick", bethanesha, ethanesha, false ) 
  
  
  
if (getVisible == false) then 
    guiSetVisible (GUIEditor_Window[1], true) 
    showCursor (true) 
end 
end 
  

server

  
function adminlogin ( player ) 
  
    if hasObjectPermissionTo ( player, "function.banPlayer" ) then 
  
        bindKey ( source, "F8", "down", ethan ) 
    else 
        unbindKey ( source, "F8", "down", ethan ) 
    end 
  
end 
addEventHandler ( "onPlayerLogin", getRootElement(), adminlogin ) 

Link to comment
my first script not work

What is the reason?

client

  
GUIEditor_Window = {} 
  
GUIEditor_Button = {} 
  
  
GUIEditor_Image = {} 
  
  
  
  
GUIEditor_Window[1] = guiCreateWindow(158,126,468,387,"eee",false) 
  
bethanfger = guiCreateButton(266,58,169,38,"1",false,GUIEditor_Window[1]) 
  
bethanthher = guiCreateButton(267,119,169,38,"2",false,GUIEditor_Window[1]) 
  
bethanaser = guiCreateButton(269,176,169,38," 3",false,GUIEditor_Window[1]) 
  
bethanmqrab = guiCreateButton(271,233,169,38,"4",false,GUIEditor_Window[1]) 
  
bethanesha = guiCreateButton(269,292,169,38,"5",false,GUIEditor_Window[1]) 
  
  
  
GUIEditor_Image[1] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/1.png",false) 
  
GUIEditor_Image[2] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/2.png",false) 
  
GUIEditor_Image[3] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/3.png",false) 
  
GUIEditor_Image[4] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/4.png",false) 
  
GUIEditor_Image[5] = guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/5.png",false) 
  
  
  
function ethanfger( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/1.png",true) 
  
               setTimer ( close1, 1200000, 1 ) 
end 
  
function close1( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/1.png",false) 
  
end 
  
  
function ethanthher( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/2.png",true) 
  
                   setTimer ( close2, 1200000, 1 ) 
  
end 
  
  
function close2( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/2.png",false) 
  
end 
  
  
  
function ethanaser( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/3.png",true) 
  
               setTimer ( close3, 1200000, 1 ) 
end 
  
  
function close3( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/3.png",false) 
  
end 
  
  
  
  
function ethanmqrab( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/4.png",true) 
  
               setTimer ( close4, 1200000, 1 ) 
  
end 
  
  
  
function close4( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/4.png",false) 
  
end 
  
  
  
  
function ethanesha( ) 
    playClientAudio("ethan.mp3") 
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/5.png",true) 
  
               setTimer ( close5, 1200000, 1 ) 
  
end 
  
  
function close5( ) 
  
     guiCreateStaticImage(0.005,0,0.9937,0.9983,"images/5.png",false) 
  
end 
  
  
  
  
function ethan () 
getVisible = guiGetVisible (GUIEditor_Window[1]) 
  
if (getVisible == true) then 
    guiSetVisible (GUIEditor_Window[1], false) 
    showCursor (false) 
end 
  
addEventHandler ( "onClientGUIClick", bethanfger, ethanfger, false ) 
addEventHandler ( "onClientGUIClick", bethanthher, ethanthher, false ) 
addEventHandler ( "onClientGUIClick", bethanaser, ethanaser, false ) 
addEventHandler ( "onClientGUIClick", bethanmqrab, ethanmqrab, false ) 
addEventHandler ( "onClientGUIClick", bethanesha, ethanesha, false ) 
  
  
  
if (getVisible == false) then 
    guiSetVisible (GUIEditor_Window[1], true) 
    showCursor (true) 
end 
end 
  

server

  
function adminlogin ( player ) 
  
    if hasObjectPermissionTo ( player, "function.banPlayer" ) then 
  
        bindKey ( source, "F8", "down", ethan ) 
    else 
        unbindKey ( source, "F8", "down", ethan ) 
    end 
  
end 
addEventHandler ( "onPlayerLogin", getRootElement(), adminlogin ) 

You can write what is not work?

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...