isBrowserLoading | Multi Theft Auto: Wiki Skip to content

isBrowserLoading

Client-side
Server-side
Shared

This function checks if a browser is currently loading a website.

OOP Syntax Help! I don't understand this!

  • Method: browser:isLoading(...)
  • Variable: .loading

Syntax

bool isBrowserLoading ( browser webBrowser )
Required Arguments
  • webBrowser: The browser.

Returns

  • bool: result

Returns true if the browser is loading a website, false otherwise and nil if invalid arguments were passed.

Code Examples

client

This example will add an command /checkload to check if the site is loading or not.

local webbrowser = createBrowser(1000, 1000, false, false)
loadBrowserURL(webbrowser, "https://www.youtube.com/watch?v=jofNR_WkoCE")
addCommandHandler("checkload",
function()
if isBrowserLoading(webbrowser) then
outputChatBox("Please wait, The site is loading!")
else
outputChatBox("This site was already loaded")
end
end
)