Jump to content

ٍError Client Side


Recommended Posts

Posted

I don't know why the gui don't close when i click on the button here! everything's okay and the event is on the function which have the event resource start. and i've started with everything but still not works. and no debugscript 3 errror too :/:(

on "Close BUTTOn"

GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {}, 
    edit = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        Mission1_Window = guiCreateWindow(420, 252, 582, 526, "Mission 1", false) 
        guiWindowSetSizable(Mission1_Window, false) 
        guiSetVisible (Mission1_Window, false) 
        GUIEditor.edit[1] = guiCreateEdit(43, 126, 498, 353, "Go meet Cesar at his place. Use my car holmes'.", false, Mission1_Window) 
        guiEditSetReadOnly(GUIEditor.edit[1], true) 
        GUIEditor.label[1] = guiCreateLabel(93, 32, 385, 79, "Meet Cesar", false, Mission1_Window) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
        guiLabelSetColor(GUIEditor.label[1], 31, 253, 1) 
        LetsGoNow = guiCreateButton(48, 487, 205, 30, "Lets Go!", false, Mission1_Window) 
        GUIEditor.button[1] = guiCreateButton(337, 487, 205, 30, "Fuck that shit!", false, Mission1_Window) 
---Handlers[sTART]--- 
        addEventHandler ("onClientGUIClick", LetsGoNow, missionSTART, false) 
        addEventHandler ("onClientGUIClick", GUIEditor.button[1], closeGUI, false) 
---Handlers[END]---      
    end 
) 
---guiShown[sTART]--- 
function showGUI () 
guiSetVisible (Mission1_Window, true) 
showCursor (true) 
end 
addEvent ("showMission1", true) 
addEventHandler ("showMission1", getRootElement(), showGUI) 
---guiShown[END]--- 
  
---Mission[1]START[sTART]--- 
function missionSTART (button, state) 
        if (button == "left" and state == "up") then 
            if guiGetVisible (Mission1_Window) then 
            guiSetVisible (Mission1_Window, false) 
            triggerServerEvent ("STARTmission1", localPlayer) 
            showCursor ( false ) 
        end 
    end 
end 
---Mission[1]START[END]--- 
  
---CloseGUI[sTART]--- 
function closeGUI (button, state) 
        if (button == "left" and state == "up") then 
            if guiGetVisible (Mission1_Window) then 
            guiSetVisible (Mission1_Window, false) 
            showCursor ( false ) 
        end 
    end 
end 
---CloseGUI[END]--- 

Posted

Make sure this is client-side in your meta.xml file.

You can try removing the GUIEditor things, along with the table and renaming your GUI elements.

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