Jump to content

[HELP]Gui


Ekko

Recommended Posts

Posted
--[[
	

	
Usefull functions:
executeBrowserJavascript(theBrowser, 'document.getElementById("demo").innerHTML = "' .. msg ..'"')
]]

local screenWidth, screenHeight = guiGetScreenSize()

-- local page = "http://mta/html-login-panel/html/login.html"
local page = "http://mta/html-login-panel/index.html"
local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false)
local theBrowser = guiGetBrowser(initBrowser)

addEventHandler("onClientBrowserCreated", theBrowser ,
	function()
		loadBrowserURL(source, page)
		showCursor(true)
			
	end
)	

addEvent("onClientPlayerLogin", true)
addEventHandler("onClientPlayerLogin", root,
	function()
		destroyElement(initBrowser)
		showCursor(false)
	end
)

function cmsg(login, password, command)
	if (command == "login") then
		triggerServerEvent("login", resourceRoot, login, password)
	elseif (command == "register") then
		triggerServerEvent("register", resourceRoot, login, password)
	end
	
end
addEvent("cmsg", true)
addEventHandler("cmsg", root, cmsg)



-- addEventHandler("onClientRender", root, 
	-- function()	
		-- dxDrawImage(screenWidth*0.205,screenHeight*0.15,1890/2.5,1417/2.5,"Test.png", 0,0,0,tocolor(255,255,255,255),true)
	-- end
-- )

end 
end 

Hello i'm trying to make Gui button that stop this script after he start this is the button gui 

GUIEditor = {
    button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.button[1] = guiCreateButton(559, 700, 268, 58, "Click Her to Select Your Character", false)
        guiSetAlpha(GUIEditor.button[1], 0.88)
        guiSetFont(GUIEditor.button[1], "clear-normal")
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFEFF806")    
    end
)

pls help i tried like 4h testing codes 

Posted
7 hours ago, #\_oskar_/# said:

explain a want to do !?

i want a guiClick to stop the first script , the fist script is a video starts when player join the server i want when the player click the gui button he skip it (stop it) so he can select his character and spawning pls help me

 

Posted
59 minutes ago, LyricalMM said:

can


cancelEvent()

use with if statements like


if (source==button) then
  cancelEvent()
  
end

 

ok bro thanks ill try it

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