<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jose76Tron</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jose76Tron"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Jose76Tron"/>
	<updated>2026-05-16T19:36:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetBrowserURL&amp;diff=52280</id>
		<title>GetBrowserURL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetBrowserURL&amp;diff=52280"/>
		<updated>2017-09-13T04:30:12Z</updated>

		<summary type="html">&lt;p&gt;Jose76Tron: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0150|1.5||&lt;br /&gt;
This function returns the URL of the specified [[Element/Browser|browser]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getBrowserURL ( browser webBrowser )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Browser|browser]]:getURL|url|loadBrowserURL}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''webBrowser:''' The browser&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the web browser URL.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a command (/isyoutubeloaded) to check if the browser created have youtube loaded, if it isnt it loads youtube.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- In order to render the browser on a corner, we need to get the dimensions of the screen&lt;br /&gt;
local screenWidth, screenHeight = guiGetScreenSize( )&lt;br /&gt;
&lt;br /&gt;
-- Let's create a new browser in remote mode&lt;br /&gt;
local window = guiCreateWindow( screenWidth/2, 0, screenWidth/2, screenHeight/2, &amp;quot;Web Browser&amp;quot;, false )&lt;br /&gt;
local browser = guiCreateBrowser( 0, 28, screenWidth/2, screenHeight/2, false, false, false, window )&lt;br /&gt;
local theBrowser = guiGetBrowser( browser ) -- Get the browser element from gui-browser&lt;br /&gt;
&lt;br /&gt;
-- Let's create a new command to check if youtube is loaded and load it if isnt&lt;br /&gt;
addCommandHandler ( &amp;quot;isyoutubeloaded&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
		if getBrowserURL(theBrowser) == &amp;quot;&amp;quot; then  -- If the browser didnt load anything yet, load youtube&lt;br /&gt;
			outputChatBox(&amp;quot;Youtube isn't loaded yet, loading it now....&amp;quot;)&lt;br /&gt;
			loadBrowserURL( theBrowser, &amp;quot;https://www.youtube.com/&amp;quot; )&lt;br /&gt;
		else -- If the browser loaded something&lt;br /&gt;
			outputChatBox(&amp;quot;Youtube is loaded.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{CEF_functions}}&lt;/div&gt;</summary>
		<author><name>Jose76Tron</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetBrowserURL&amp;diff=52279</id>
		<title>GetBrowserURL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetBrowserURL&amp;diff=52279"/>
		<updated>2017-09-13T04:25:32Z</updated>

		<summary type="html">&lt;p&gt;Jose76Tron: Edited example and deleted needs example warning.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0150|1.5||&lt;br /&gt;
This function returns the URL of the specified [[Element/Browser|browser]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getBrowserURL ( browser webBrowser )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Browser|browser]]:getURL|url|loadBrowserURL}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''webBrowser:''' The browser&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the web browser URL.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a command (/isyoutubeloaded) to check if the browser created have something loaded, if it isnt it loads youtube.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- In order to render the browser on a corner, we need to get the dimensions of the screen&lt;br /&gt;
local screenWidth, screenHeight = guiGetScreenSize( )&lt;br /&gt;
&lt;br /&gt;
-- Let's create a new browser in remote mode&lt;br /&gt;
local window = guiCreateWindow( screenWidth/2, 0, screenWidth/2, screenHeight/2, &amp;quot;Web Browser&amp;quot;, false )&lt;br /&gt;
local browser = guiCreateBrowser( 0, 28, screenWidth/2, screenHeight/2, false, false, false, window )&lt;br /&gt;
local theBrowser = guiGetBrowser( browser ) -- Get the browser element from gui-browser&lt;br /&gt;
&lt;br /&gt;
-- Let's create a new command to check if youtube is loaded&lt;br /&gt;
addCommandHandler ( &amp;quot;isyoutubeloaded&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
		if getBrowserURL(theBrowser) == &amp;quot;&amp;quot; then  -- If the browser didnt load anything yet, load youtube&lt;br /&gt;
			outputChatBox(&amp;quot;Youtube isn't loaded yet, loading it now....&amp;quot;)&lt;br /&gt;
			loadBrowserURL( theBrowser, &amp;quot;https://www.youtube.com/&amp;quot; )&lt;br /&gt;
		else -- If the browser loaded something&lt;br /&gt;
			outputChatBox(&amp;quot;Youtube is loaded.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{CEF_functions}}&lt;/div&gt;</summary>
		<author><name>Jose76Tron</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedVoice&amp;diff=52278</id>
		<title>GetPedVoice</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedVoice&amp;diff=52278"/>
		<updated>2017-09-13T03:57:41Z</updated>

		<summary type="html">&lt;p&gt;Jose76Tron: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
Gets the current voice of a ped.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string string getPedVoice ( ped thePed )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the ped to get the voice of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successul, returns the current voice type name and the voice name of the ped (see [[ped voices]] for possible names). Returns ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a command (/getvoice) that prints to chatbox your ped voice type and name.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;getvoice&amp;quot;,&lt;br /&gt;
	function ()&lt;br /&gt;
		local voicetype, voicename = getPedVoice(localPlayer)&lt;br /&gt;
		outputChatBox ( &amp;quot;Your ped voice type is &amp;quot; .. tostring(voicetype) .. &amp;quot; and voice name is &amp;quot;.. tostring(voicename)..&amp;quot;.&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client ped functions}}&lt;/div&gt;</summary>
		<author><name>Jose76Tron</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedVoice&amp;diff=52277</id>
		<title>GetPedVoice</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedVoice&amp;diff=52277"/>
		<updated>2017-09-13T03:57:14Z</updated>

		<summary type="html">&lt;p&gt;Jose76Tron: Added an example and deleted needs example warning.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
Gets the current voice of a ped.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string string getPedVoice ( ped thePed )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the ped to get the voice of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If successul, returns the current voice type name and the voice name of the ped (see [[ped voices]] for possible names). Returns ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a command (/getvoice) that prints to chatbox your ped voice.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;getvoice&amp;quot;,&lt;br /&gt;
	function ()&lt;br /&gt;
		local voicetype, voicename = getPedVoice(localPlayer)&lt;br /&gt;
		outputChatBox ( &amp;quot;Your ped voice type is &amp;quot; .. tostring(voicetype) .. &amp;quot; and voice name is &amp;quot;.. tostring(voicename)..&amp;quot;.&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client ped functions}}&lt;/div&gt;</summary>
		<author><name>Jose76Tron</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsBrowserFocused&amp;diff=52276</id>
		<title>IsBrowserFocused</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsBrowserFocused&amp;diff=52276"/>
		<updated>2017-09-13T03:29:40Z</updated>

		<summary type="html">&lt;p&gt;Jose76Tron: Deleted needs example and changed format of example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function checks if a browser is focused.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isBrowserFocused ( browser webBrowser )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Browser|browser]]:isFocused}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''webBrowser:''' The browser&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the browser is focused, ''false'' otherwise and ''nil'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a browser. If you press left control it will output to chatbox if the browser is focused or not.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local theBrowser = guiCreateBrowser ( 150, 150, 1280, 720, true, false, false)&lt;br /&gt;
addEventHandler(&amp;quot;onClientKey&amp;quot;, localPlayer,&lt;br /&gt;
	function(button, state)  -- adds the event handler.&lt;br /&gt;
		if button == &amp;quot;lctrl&amp;quot; and state = &amp;quot;down&amp;quot; then -- if the pressed key is lctrl and the state is down then we will check is the browser focused or not. &lt;br /&gt;
			if isBrowserFocused(theBrowser) then&lt;br /&gt;
				outputChatbox(&amp;quot;the browser is focused.&amp;quot;) -- if the browser is focused then we will write this to chatbox.&lt;br /&gt;
			else&lt;br /&gt;
				outputChatbox(&amp;quot;the browser is not focused.&amp;quot;)-- if the browser is not focused then we will write this to chatbox.&lt;br /&gt;
			end&lt;br /&gt;
 		end&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{CEF_functions}}&lt;/div&gt;</summary>
		<author><name>Jose76Tron</name></author>
	</entry>
</feed>