helpme Posted October 23, 2011 Share Posted October 23, 2011 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
Kenix Posted October 23, 2011 Share Posted October 23, 2011 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
mjau Posted October 23, 2011 Share Posted October 23, 2011 Well there is no function named playClientAudio and for the bindkey thing use triggerClientEvent Link to comment
Castillo Posted October 23, 2011 Share Posted October 23, 2011 "Fix it"? who do you think you are? do you think we're your slaves or something similar? Link to comment
helpme Posted October 23, 2011 Author Share Posted October 23, 2011 fix it i need help Link to comment
mjau Posted October 23, 2011 Share Posted October 23, 2011 Try yourself use wiki search for the functions i gave you then paste your code here and we will help Link to comment
helpme Posted October 23, 2011 Author Share Posted October 23, 2011 Solidsnake14 + kimmis9 = stupid Link to comment
CapY Posted October 23, 2011 Share Posted October 23, 2011 Solidsnake14 + kimmis9 = stupid = ban Link to comment
Castillo Posted October 23, 2011 Share Posted October 23, 2011 Solidsnake14 + kimmis9 = stupid At least I know how to do it. P.S: That's not the right way to ask for help, that's the most stupid way. Link to comment
Aibo Posted October 23, 2011 Share Posted October 23, 2011 Solidsnake14 + kimmis9 = stupid nobody is going to help you if you keep that attitude. please behave yourself, or i'll be forced to close your topic. Link to comment
mjau Posted October 23, 2011 Share Posted October 23, 2011 Well dont call us stupid since we see whats wrong but we told you what to do and you just say "Fix it" There is no such function as playclientaudio .... for triggering use triggerServerEvent and triggerClientEvent and just because u said im stupid u can search for the playaudio function there yourself... https://wiki.multitheftauto.com/wiki/Main_Page 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