local screenWidth, screenHeight = guiGetScreenSize()local page = \"/index.html\"local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false)local theBrowser = guiGetBrowser(initBrowser)addEventHandler(\"onClientBrowserCreated\", theBrowser, function() loadBrowserURL(source, page)end)
Mert, ez nem akkor fut le?
function PlayerJoin()local screenWidth, screenHeight = guiGetScreenSize()local page = \"/index.html\" local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false)local theBrowser = guiGetBrowser(initBrowser)loadBrowserURL(source, page)endaddEventHandler ( \"onPlayerJoin\", root, PlayerJoin )
function successfullLogin() destroyElement(initBrowser) showCursor(false) end addEvent(\"login.success\", true) addEventHandler(\"login.success\", localPlayer, successfullLogin)
if getElementPlayer(localPlayer,\"logined\") == false then
if getElementPlayer(localPlayer,\"logined\") == false then local screenWidth, screenHeight = guiGetScreenSize() local page = \"/index.html\" local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false) local theBrowser = guiGetBrowser(initBrowser) loadBrowserURL(source, page)endfunction successfullLogin() destroyElement(initBrowser) showCursor(false) setElementPlayer(localPlayer,\"logined\") end addEvent(\"login.success\", true) addEventHandler(\"login.success\", localPlayer, successfullLogin)
Óhh francba, nem getElementPlayer, hanem getElementData
if getElementData(localPlayer,\"logined\") == false thenlocal screenWidth, screenHeight = guiGetScreenSize()local page = \"/index.html\"local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false)local theBrowser = guiGetBrowser(initBrowser)loadBrowserURL(source, page)endfunction successfullLogin()destroyElement(initBrowser)showCursor(false)setElementData(localPlayer,\"logined\") end addEvent(\"login.success\", true) addEventHandler(\"login.success\", localPlayer, successfullLogin)
A browserCreated event megvan?
local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false)
addEventHandler(\"onClientBrowserCreated\", theBrowser, function()