Cocodrilo Posted May 1, 2013 Posted May 1, 2013 how i add setTimer at show a GUI when aPlayerWasted? would be ... setTimer ( souce, 5000, 1 ) what arguments should i to add and where?? for example : function ondead() if (source == getLocalPlayer()) then if (not isCursorShowing()) then showCursor(true) end GUIEditor = { button = {}, window = {} } PANEL2 = guiCreateWindow(201, 186, 394, 172, "", false) guiWindowSetSizable(GUIEditor.window[1], false) JUGAR = guiCreateButton(32, 45, 150, 90, "Jugar con el mismo personaje", false, PANEL2) guiSetFont(GUIEditor.button[1], "default-bold-small") REGRESAR = guiCreateButton(211, 45, 150, 90, "Regresar al Menú", false, PANEL2) guiSetFont(GUIEditor.button[2], "default-bold-small") addEventHandler("onClientGUIClick", JUGAR, jugarrr) addEventHandler("onClientGUIClick", REGRESAR, regresarrr) end end addEventHandler("onClientPlayerWasted", getRootElement(), ondead) addEvent("onClientPlayerWasted", getRootElement(), ondead)
Sasu Posted May 1, 2013 Posted May 1, 2013 function start() PANEL2 = guiCreateWindow(201, 186, 394, 172, "", false) guiWindowSetSizable(GUIEditor.window[1], false) JUGAR = guiCreateButton(32, 45, 150, 90, "Jugar con el mismo personaje", false, PANEL2) guiSetFont(GUIEditor.button[1], "default-bold-small") REGRESAR = guiCreateButton(211, 45, 150, 90, "Regresar al Menú", false, PANEL2) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetVisible(PANEL2, false) showCursor(false) addEventHandler("onClientGUIClick", JUGAR, jugarrr) addEventHandler("onClientGUIClick", REGRESAR, regresarrr) end addEventHandler("onClientResourceStart", root, start) function ondead() if source == localPlayer then setTimer(guiSetVisible, 5000, 1, PANEL2, true) setTimer(showCursor, 5000, 1, true) end end addEventHandler("onClientPlayerWasted", getRootElement(), ondead)
Cocodrilo Posted May 1, 2013 Author Posted May 1, 2013 do not work i start the script and show PANEL2 keeping always but without buttons and when i kill myself only show the cursor.. ( buttons never appeared ) u.u
DNL291 Posted May 1, 2013 Posted May 1, 2013 Try this: function start() PANEL2 = guiCreateWindow(201, 186, 394, 172, "", false) guiWindowSetSizable(PANEL2, false) guiSetVisible(PANEL2, false) JUGAR = guiCreateButton(32, 45, 150, 90, "Jugar con el mismo personaje", false, PANEL2) guiSetFont(JUGAR, "default-bold-small") REGRESAR = guiCreateButton(211, 45, 150, 90, "Regresar al Menú", false, PANEL2) guiSetFont(REGRESAR, "default-bold-small") addEventHandler("onClientGUIClick", JUGAR, jugarrr) addEventHandler("onClientGUIClick", REGRESAR, regresarrr) end addEventHandler("onClientResourceStart", resourceRoot, start) function ondead() if source == localPlayer then setTimer(guiSetVisible, 5000, 1, PANEL2, true) setTimer(showCursor, 5000, 1, true) end end addEventHandler("onClientPlayerWasted", localPlayer, ondead)
Cocodrilo Posted May 1, 2013 Author Posted May 1, 2013 Try this: function start() PANEL2 = guiCreateWindow(201, 186, 394, 172, "", false) guiWindowSetSizable(PANEL2, false) guiSetVisible(PANEL2, false) JUGAR = guiCreateButton(32, 45, 150, 90, "Jugar con el mismo personaje", false, PANEL2) guiSetFont(JUGAR, "default-bold-small") REGRESAR = guiCreateButton(211, 45, 150, 90, "Regresar al Menú", false, PANEL2) guiSetFont(REGRESAR, "default-bold-small") addEventHandler("onClientGUIClick", JUGAR, jugarrr) addEventHandler("onClientGUIClick", REGRESAR, regresarrr) end addEventHandler("onClientResourceStart", resourceRoot, start) function ondead() if source == localPlayer then setTimer(guiSetVisible, 5000, 1, PANEL2, true) setTimer(showCursor, 5000, 1, true) end end addEventHandler("onClientPlayerWasted", localPlayer, ondead) wow!! works thank you so much!! :')
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