<?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=Xthepr0mise</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=Xthepr0mise"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Xthepr0mise"/>
	<updated>2026-04-23T05:40:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33733</id>
		<title>Resource:Woltlab-Connector</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33733"/>
		<updated>2012-10-11T12:37:53Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
'''Current Version: 1.1.2'''&lt;br /&gt;
&lt;br /&gt;
This is a library, created by xthepr0mise, which allows you to connect to your forum software easily.&lt;br /&gt;
It uses the MySQL-Plugin to connect to the database and includes a full log which documents nearly every (woltlab_)function called by the user.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===Connection===&lt;br /&gt;
====woltlab_connect====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_connect ( dbHost, dbUsername, dbPasswort, dbName ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''dbHost''': The IP-Address of the database&lt;br /&gt;
*'''dbUsername''': The username of the database&lt;br /&gt;
*'''dbPasswort''': The password of the database&lt;br /&gt;
*'''dbName''': The name of the database&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it connected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_disconnect====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_disconnect ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''None'''&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it disconnected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===User-Functions===&lt;br /&gt;
====woltlab_checkPassword====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_checkPassword ( username, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
*'''password''': The password he entered (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the password is right else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_getUserID====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getUserID ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the user does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_addUser====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addUser ( username, email, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to add&lt;br /&gt;
*'''email''': His e-mail address&lt;br /&gt;
*'''password''': His password (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the user got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_userExists====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_userExists ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Board-Functions===&lt;br /&gt;
====woltlab_getBoardID====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getBoardID ( title )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''title''': The title of the board whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_getBoardTitle====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string woltlab_getBoardTitle ( id )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''id''': The ID of the board whose title you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''string title''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_addThread====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addThread ( username, boardID, prefix, head, description, [registered] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player which creates the thread&lt;br /&gt;
*'''boardID''': The ID of the board in which the thread should be created&lt;br /&gt;
*'''prefix''': The prefix of the thread&lt;br /&gt;
*'''head''': The title of the thread&lt;br /&gt;
*'''description''': The content of the thread&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
*'''registered''': A bool whether the user is registered in the forum or not&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the thread got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Group-Functions===&lt;br /&gt;
====woltlab_groupExists====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_groupExists ( ID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''ID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the group exists or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_isUserInGroup====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_isUserInGroup ( username, ID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
*'''ID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if he is in the group or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_getGroupID====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_getGroupID ( title )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''title''': The title of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' of the group or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_getGroupTitle====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_getGroupTitle ( ID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''ID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''string title''' of the group or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_addUserToGroup====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addUserToGroup ( username, groupID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player&lt;br /&gt;
*'''groupID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if he got added or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====woltlab_removeUserFromGroup====&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_removeUserFromGroup ( username, groupID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player&lt;br /&gt;
*'''groupID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if he got removed or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
===Option 1===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports.woltlab:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Option 2===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports:['woltlab']:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Simple password-checking===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&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;
exports.woltlab:woltlab_connect ( &amp;quot;127.0.0.1&amp;quot;, &amp;quot;root&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;wcf&amp;quot; )&lt;br /&gt;
local login = exports.woltlab:woltlab_checkPassword ( &amp;quot;xthepr0mise&amp;quot;, &amp;quot;test&amp;quot; )&lt;br /&gt;
if login == true then&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is right!&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is wrong!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
exports.woltlab:woltlab_disconnect()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known Bugs==&lt;br /&gt;
*'''none'''&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33682</id>
		<title>Resource:Woltlab-Connector</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33682"/>
		<updated>2012-10-04T19:12:04Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
'''Current Version: 1.1.2'''&lt;br /&gt;
&lt;br /&gt;
This is a library, created by xthepr0mise, which allows you to connect to your forum software easily.&lt;br /&gt;
It uses the MySQL-Plugin to connect to the database and includes a full log which documents nearly every (woltlab_)function called by the user.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===woltlab_connect===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_connect ( dbHost, dbUsername, dbPasswort, dbName ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''dbHost''': The IP-Address of the database&lt;br /&gt;
*'''dbUsername''': The username of the database&lt;br /&gt;
*'''dbPasswort''': The password of the database&lt;br /&gt;
*'''dbName''': The name of the database&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it connected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_disconnect===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_disconnect ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''None'''&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it disconnected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_checkPassword===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_checkPassword ( username, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
*'''password''': The password he entered (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the password is right else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getUserID===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getUserID ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the user does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getBoardID===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getBoardID ( title )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''title''': The title of the board whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getBoardTitle===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string woltlab_getBoardTitle ( id )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''id''': The ID of the board whose title you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''string title''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_addThread===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addThread ( username, boardID, prefix, head, description, [registered] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player which creates the thread&lt;br /&gt;
*'''boardID''': The ID of the board in which the thread should be created&lt;br /&gt;
*'''prefix''': The prefix of the thread&lt;br /&gt;
*'''head''': The title of the thread&lt;br /&gt;
*'''description''': The content of the thread&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
*'''registered''': A bool whether the user is registered in the forum or not&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the thread got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_userExists===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_userExists ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_addUser===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addUser ( username, email, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to add&lt;br /&gt;
*'''email''': His e-mail address&lt;br /&gt;
*'''password''': His password (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the user got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_groupExists===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_groupExists ( ID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''ID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the group exists or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_isUserInGroup===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_isUserInGroup ( username, ID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
*'''ID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if he is in the group or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getGroupID===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_getGroupID ( title )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''title''': The title of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' of the group or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getGroupTitle===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_getGroupTitle ( ID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''ID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''string title''' of the group or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_addUserToGroup===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addUserToGroup ( username, groupID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player&lt;br /&gt;
*'''groupID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if he got added or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_removeUserFromGroup===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_removeUserFromGroup ( username, groupID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player&lt;br /&gt;
*'''groupID''': The ID of the group&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if he got removed or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
===Option 1===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports.woltlab:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Option 2===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports:['woltlab']:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Simple password-checking===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&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;
exports.woltlab:woltlab_connect ( &amp;quot;127.0.0.1&amp;quot;, &amp;quot;root&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;wcf&amp;quot; )&lt;br /&gt;
local login = exports.woltlab:woltlab_checkPassword ( &amp;quot;xthepr0mise&amp;quot;, &amp;quot;test&amp;quot; )&lt;br /&gt;
if login == true then&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is right!&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is wrong!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
exports.woltlab:woltlab_disconnect()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known Bugs==&lt;br /&gt;
*'''none'''&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Woltlab-Connector&amp;diff=33679</id>
		<title>Woltlab-Connector</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Woltlab-Connector&amp;diff=33679"/>
		<updated>2012-10-04T15:34:36Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: moved Woltlab-Connector to Resource:Woltlab-Connector&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Resource:Woltlab-Connector]]&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33678</id>
		<title>Resource:Woltlab-Connector</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33678"/>
		<updated>2012-10-04T15:34:36Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: moved Woltlab-Connector to Resource:Woltlab-Connector&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
'''Current Version: 1.1.0'''&lt;br /&gt;
&lt;br /&gt;
This is a library, created by xthepr0mise, which allows you to connect to your forum software easily.&lt;br /&gt;
It uses the MySQL-Plugin to connect to the database and includes a full log which documents nearly every (woltlab_)function called by the user.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===woltlab_connect===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_connect ( dbHost, dbUsername, dbPasswort, dbName ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''dbHost''': The IP-Address of the database&lt;br /&gt;
*'''dbUsername''': The username of the database&lt;br /&gt;
*'''dbPasswort''': The password of the database&lt;br /&gt;
*'''dbName''': The name of the database&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it connected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_disconnect===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_disconnect ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''None'''&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it disconnected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_checkPassword===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_checkPassword ( username, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
*'''password''': The password he entered (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the password is right else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getUserID===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getUserID ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the user does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getBoardID===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getBoardID ( title )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''title''': The title of the board whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getBoardTitle===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string woltlab_getBoardTitle ( id )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''id''': The ID of the board whose title you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''string title''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_addThread===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addThread ( username, boardID, prefix, head, description, [registered] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player which creates the thread&lt;br /&gt;
*'''boardID''': The ID of the board in which the thread should be created&lt;br /&gt;
*'''prefix''': The prefix of the thread&lt;br /&gt;
*'''head''': The title of the thread&lt;br /&gt;
*'''description''': The content of the thread&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
*'''registered''': A bool whether the user is registered in the forum or not&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the thread got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_userExists===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_userExists ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_addUser===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addUser ( username, email, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to add&lt;br /&gt;
*'''email''': His e-mail address&lt;br /&gt;
*'''password''': His password (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the user got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
===Option 1===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports.woltlab:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Option 2===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports:['woltlab']:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Simple password-checking===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&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;
exports.woltlab:woltlab_connect ( &amp;quot;127.0.0.1&amp;quot;, &amp;quot;root&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;wcf&amp;quot; )&lt;br /&gt;
local login = exports.woltlab:woltlab_checkPassword ( &amp;quot;xthepr0mise&amp;quot;, &amp;quot;test&amp;quot; )&lt;br /&gt;
if login == true then&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is right!&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is wrong!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
exports.woltlab:woltlab_disconnect()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known Bugs==&lt;br /&gt;
*'''none'''&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33677</id>
		<title>Resource:Woltlab-Connector</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Woltlab-Connector&amp;diff=33677"/>
		<updated>2012-10-04T15:33:10Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: Created page with &amp;quot;{{Resource page}} '''Current Version: 1.1.0'''  This is a library, created by xthepr0mise, which allows you to connect to your forum software easily. It uses the MySQL-Plugin to ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
'''Current Version: 1.1.0'''&lt;br /&gt;
&lt;br /&gt;
This is a library, created by xthepr0mise, which allows you to connect to your forum software easily.&lt;br /&gt;
It uses the MySQL-Plugin to connect to the database and includes a full log which documents nearly every (woltlab_)function called by the user.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===woltlab_connect===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_connect ( dbHost, dbUsername, dbPasswort, dbName ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''dbHost''': The IP-Address of the database&lt;br /&gt;
*'''dbUsername''': The username of the database&lt;br /&gt;
*'''dbPasswort''': The password of the database&lt;br /&gt;
*'''dbName''': The name of the database&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it connected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_disconnect===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_disconnect ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''None'''&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if it disconnected successfully else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_checkPassword===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_checkPassword ( username, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
*'''password''': The password he entered (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the password is right else '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getUserID===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getUserID ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the user does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getBoardID===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int woltlab_getBoardID ( title )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''title''': The title of the board whose ID you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''int ID''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_getBoardTitle===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string woltlab_getBoardTitle ( id )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''id''': The ID of the board whose title you want to get&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''string title''' or '''false''' if the board does not exist&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_addThread===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addThread ( username, boardID, prefix, head, description, [registered] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player which creates the thread&lt;br /&gt;
*'''boardID''': The ID of the board in which the thread should be created&lt;br /&gt;
*'''prefix''': The prefix of the thread&lt;br /&gt;
*'''head''': The title of the thread&lt;br /&gt;
*'''description''': The content of the thread&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
*'''registered''': A bool whether the user is registered in the forum or not&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the thread got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_userExists===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_userExists ( username )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to check&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===woltlab_addUser===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool woltlab_addUser ( username, email, password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''username''': The username of the player you want to add&lt;br /&gt;
*'''email''': His e-mail address&lt;br /&gt;
*'''password''': His password (encrypted)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if the user got created or '''false'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
===Option 1===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports.woltlab:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Option 2===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
exports:['woltlab']:FUNCTION ( PARAMETERS )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Simple password-checking===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&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;
exports.woltlab:woltlab_connect ( &amp;quot;127.0.0.1&amp;quot;, &amp;quot;root&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;wcf&amp;quot; )&lt;br /&gt;
local login = exports.woltlab:woltlab_checkPassword ( &amp;quot;xthepr0mise&amp;quot;, &amp;quot;test&amp;quot; )&lt;br /&gt;
if login == true then&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is right!&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
    outputChatBox(&amp;quot;Your password is wrong!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
exports.woltlab:woltlab_disconnect()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known Bugs==&lt;br /&gt;
*'''none'''&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Undocumented_Items&amp;diff=33186</id>
		<title>Undocumented Items</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Undocumented_Items&amp;diff=33186"/>
		<updated>2012-09-08T21:37:04Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all MTA SA functions and events which don't have the necessary documentation for scripters to allow them to use the functions or events. Documenting these will require looking through [http://code.google.com/p/mtasa-blue/source/browse/ mtasa-blue source] changes to get the necessary parameters.&lt;br /&gt;
__NOTOC__&lt;br /&gt;
== Client functions that need documenting ==&lt;br /&gt;
* [[setCameraRotation]]&lt;br /&gt;
* [[setSoundPanningEnabled]]&lt;br /&gt;
* [[isSoundPanningEnabled]]&lt;br /&gt;
* [[getSoundLevelData]]&lt;br /&gt;
* [[getSoundWaveData]]&lt;br /&gt;
* [[getPedAnalogControlState]]&lt;br /&gt;
* [[guiWindowSetCloseButtonEnabled]]&lt;br /&gt;
&lt;br /&gt;
== Server functions that need documenting ==&lt;br /&gt;
* [[getPerformanceStats]]&lt;br /&gt;
&lt;br /&gt;
== Client Events that need documenting ==&lt;br /&gt;
* [[onClientSoundBeat]]&lt;br /&gt;
&lt;br /&gt;
== Server Events that need documenting ==&lt;br /&gt;
(None)&lt;br /&gt;
&lt;br /&gt;
== Other undocumented pages ==&lt;br /&gt;
* [[Global variables]] (mentioned: [[getResourceRootElement]])&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetAnalogControlState&amp;diff=33185</id>
		<title>SetAnalogControlState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetAnalogControlState&amp;diff=33185"/>
		<updated>2012-09-08T21:36:49Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
This sets the analog control state of a control.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setAnalogControlState ( string controlName , float state ) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguement===&lt;br /&gt;
* '''controlName''': the control name you wish to set the analog state of. Here's a list:&lt;br /&gt;
**'''left'''&lt;br /&gt;
**'''right'''&lt;br /&gt;
**'''forwards'''&lt;br /&gt;
**'''backwards'''&lt;br /&gt;
**'''vehicle_left'''&lt;br /&gt;
**'''vehicle_right'''&lt;br /&gt;
**'''steer_forward'''&lt;br /&gt;
**'''steer_back'''&lt;br /&gt;
**'''accelerate'''&lt;br /&gt;
**'''brake_reverse'''&lt;br /&gt;
**'''special_control_left'''&lt;br /&gt;
**'''special_control_right'''&lt;br /&gt;
**'''special_control_up'''&lt;br /&gt;
**'''special_control_down'''&lt;br /&gt;
* '''state''': a float between 0 and 1 indicating the amount the control is pressed.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true, else false if invalid argument.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client input functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundFFTData&amp;diff=33184</id>
		<title>GetSoundFFTData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundFFTData&amp;diff=33184"/>
		<updated>2012-09-08T21:36:04Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
{{New feature/item|4.0140|1.3.0|4125|&lt;br /&gt;
This function gets the FFT data for an audio stream which is a table of floats representing the current audio frame.&lt;br /&gt;
This allows things like visualisations.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getSoundFFTData ( element sound, int iSamples [, int iBands = 0 ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]. Streams are also supported&lt;br /&gt;
*'''iSamples:''' Allowed samples are 128, 256, 512, 1024, 2048, 4096, 8092 and 16184&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''iBands:''' Post processing option&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table of floats representing the current audio frame.&lt;br /&gt;
Returns false if the sound is not playing yet or hasn't buffered in the&lt;br /&gt;
case of streams.&lt;br /&gt;
&lt;br /&gt;
==Example== &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;
-- not done yet&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_audio_functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Undocumented_Items&amp;diff=33183</id>
		<title>Undocumented Items</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Undocumented_Items&amp;diff=33183"/>
		<updated>2012-09-08T21:34:39Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all MTA SA functions and events which don't have the necessary documentation for scripters to allow them to use the functions or events. Documenting these will require looking through [http://code.google.com/p/mtasa-blue/source/browse/ mtasa-blue source] changes to get the necessary parameters.&lt;br /&gt;
__NOTOC__&lt;br /&gt;
== Client functions that need documenting ==&lt;br /&gt;
* [[setCameraRotation]]&lt;br /&gt;
* [[getSoundFFTData]]&lt;br /&gt;
* [[setSoundPanningEnabled]]&lt;br /&gt;
* [[isSoundPanningEnabled]]&lt;br /&gt;
* [[getSoundLevelData]]&lt;br /&gt;
* [[getSoundWaveData]]&lt;br /&gt;
* [[getPedAnalogControlState]]&lt;br /&gt;
* [[setAnalogControlState]]&lt;br /&gt;
* [[guiWindowSetCloseButtonEnabled]]&lt;br /&gt;
&lt;br /&gt;
== Server functions that need documenting ==&lt;br /&gt;
* [[getPerformanceStats]]&lt;br /&gt;
&lt;br /&gt;
== Client Events that need documenting ==&lt;br /&gt;
* [[onClientSoundBeat]]&lt;br /&gt;
&lt;br /&gt;
== Server Events that need documenting ==&lt;br /&gt;
(None)&lt;br /&gt;
&lt;br /&gt;
== Other undocumented pages ==&lt;br /&gt;
* [[Global variables]] (mentioned: [[getResourceRootElement]])&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedLookAt&amp;diff=33182</id>
		<title>SetPedLookAt</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedLookAt&amp;diff=33182"/>
		<updated>2012-09-08T21:29:00Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
Makes a ped turn his head and look at a specific world position or element.&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 setPedLookAt ( ped thePed, float x, float y, float z [, int time = 3000, int blend = 1000, element target = nil ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the ped to change the lookat of.&lt;br /&gt;
*'''x:''' the x coordinate of the world position to look at.&lt;br /&gt;
*'''y:''' the y coordinate of the world position to look at.&lt;br /&gt;
*'''z:''' the z coordinate of the world position to look at.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''time:''' the time, in milliseconds, during which the ped will look at the target. Once this time has elapsed, he will look ahead again like before the function was applied. A time of 0 will immediately stop any lookat. A negative time will make the ped look at the target indefinitely.&lt;br /&gt;
*'''blend:''' the time, in milliseconds, during which the look will blend.&lt;br /&gt;
*'''target:''' if this argument is specified, the position arguments will be ignored and the ped's gaze will follow the specified element instead. Can be a player, a vehicle, another ped etc.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example makes player to always see where the camera points at.&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;
function onClientLookAtRender()&lt;br /&gt;
    local rotcam = math.rad (360 - getPedCameraRotation (localPlayer))&lt;br /&gt;
    local xpos,ypos,zpos = getPedBonePosition (localPlayer, 8)&lt;br /&gt;
    local xlook,ylook,zlook = xpos - 300*math.sin(rotcam), ypos + 300*math.cos(rotcam), zpos&lt;br /&gt;
    setPedLookAt (localPlayer, xlook, ylook, zlook, 1500, 2000)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onClientRender&amp;quot;, root, onClientLookAtRender)&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>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TextCreateTextItem&amp;diff=29062</id>
		<title>TextCreateTextItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TextCreateTextItem&amp;diff=29062"/>
		<updated>2012-01-19T17:14:32Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Checking|You can go through optional args assigning nil, but if you wanted red text for example you need to express G &amp;amp; B values as 0. Would it be good to put some brackets around these optional args to say they work in unison or not at all?}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function creates a text item. A text item represents a single area of text, much like a label does in standard GUI programming. A text item can only be seen by players if it is added to a [[textdisplay]] using [[textDisplayAddText]]. Each text item can be added to multiple displays, if need be.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 textitem textCreateTextItem ( string text, float x, float y, [string priority, int red = 255, int green = 0, int blue = 0, int alpha = 255, float scale = 1, string alignX = &amp;quot;left&amp;quot;, string alignY = &amp;quot;top&amp;quot;, int shadowAlpha = 0] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
&lt;br /&gt;
* '''text''': A string of text you want to display&lt;br /&gt;
* '''x''': A floating point number between 0.0 and 1.0 indicating how far across the screen the text should be shown, as a percentage of the width, from the left hand side.&lt;br /&gt;
* '''y''': A floating point number between 0.0 and 1.0 indicating how far down the screen the text should be shown, as a percentage of the height, from the top.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
&lt;br /&gt;
* '''priority''': How important it is that this text should be up to date on client's screens. Valid values are: &amp;quot;low&amp;quot;, &amp;quot;medium&amp;quot;, &amp;quot;high&amp;quot; which are aliases for 0, 1 and 2 respectively.&lt;br /&gt;
* '''red''': A value between 0 and 255 indicating how red the text should be.&lt;br /&gt;
* '''green''': A value between 0 and 255 indicating how green the text should be.&lt;br /&gt;
* '''blue''': A value between 0 and 255 indicating how blue the text should be.&lt;br /&gt;
* '''alpha''': A value between 0 and 255 indicating how transparent the text should be, with 0 being fully transparent, and 255 being opaque.&lt;br /&gt;
* '''scale''': A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.&lt;br /&gt;
* '''alignX''': A string representing the X-alignment of the text. (&amp;quot;left&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;right&amp;quot;)&lt;br /&gt;
* '''alignY''': A string representing the Y-alignment of the text. (&amp;quot;top&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;bottom&amp;quot;)&lt;br /&gt;
''Extra parameter from 1.0.2 onwards:''&lt;br /&gt;
*'''shadowAlpha''': A value between 0 and 255 indicating how dark the drop shadow should be.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[textitem]] object.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
myDisplay = textCreateDisplay ()                              -- create a display&lt;br /&gt;
textDisplayAddObserver ( myDisplay, myPlayer )                -- make it visible to a player&lt;br /&gt;
myTextItem = textCreateTextItem ( &amp;quot;Hello world!&amp;quot;, 0.5, 0.5 )  -- create text item for the display&lt;br /&gt;
textDisplayAddText ( myDisplay, myTextItem )                  -- add created item to text display so it is displayed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Text functions}}&lt;br /&gt;
[[ru:textCreateTextItem]]&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TextCreateTextItem&amp;diff=29061</id>
		<title>TextCreateTextItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TextCreateTextItem&amp;diff=29061"/>
		<updated>2012-01-19T17:13:57Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Checking|You can go through optional args assigning nil, but if you wanted red text for example you need to express G &amp;amp; B values as 0. Would it be good to put some brackets around these optional args to say they work in unison or not at all?}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function creates a text item. A text item represents a single area of text, much like a label does in standard GUI programming. A text item can only be seen by players if it is added to a [[textdisplay]] using [[textDisplayAddText]]. Each text item can be added to multiple displays, if need be.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 textitem textCreateTextItem ( string text, float x, float y, [string priority, int red = 255, int green = 0, int blue = 0, int alpha = 255, float scale = 1, string alignX = &amp;quot;left&amp;quot;, string alignY = &amp;quot;top&amp;quot;, int shadowAlpha = 0] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
&lt;br /&gt;
''None.''&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''text''': A string of text you want to display&lt;br /&gt;
* '''x''': A floating point number between 0.0 and 1.0 indicating how far across the screen the text should be shown, as a percentage of the width, from the left hand side.&lt;br /&gt;
* '''y''': A floating point number between 0.0 and 1.0 indicating how far down the screen the text should be shown, as a percentage of the height, from the top.&lt;br /&gt;
* '''priority''': How important it is that this text should be up to date on client's screens. Valid values are: &amp;quot;low&amp;quot;, &amp;quot;medium&amp;quot;, &amp;quot;high&amp;quot; which are aliases for 0, 1 and 2 respectively.&lt;br /&gt;
* '''red''': A value between 0 and 255 indicating how red the text should be.&lt;br /&gt;
* '''green''': A value between 0 and 255 indicating how green the text should be.&lt;br /&gt;
* '''blue''': A value between 0 and 255 indicating how blue the text should be.&lt;br /&gt;
* '''alpha''': A value between 0 and 255 indicating how transparent the text should be, with 0 being fully transparent, and 255 being opaque.&lt;br /&gt;
* '''scale''': A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.&lt;br /&gt;
* '''alignX''': A string representing the X-alignment of the text. (&amp;quot;left&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;right&amp;quot;)&lt;br /&gt;
* '''alignY''': A string representing the Y-alignment of the text. (&amp;quot;top&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;bottom&amp;quot;)&lt;br /&gt;
''Extra parameter from 1.0.2 onwards:''&lt;br /&gt;
*'''shadowAlpha''': A value between 0 and 255 indicating how dark the drop shadow should be.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[textitem]] object.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
myDisplay = textCreateDisplay ()                              -- create a display&lt;br /&gt;
textDisplayAddObserver ( myDisplay, myPlayer )                -- make it visible to a player&lt;br /&gt;
myTextItem = textCreateTextItem ( &amp;quot;Hello world!&amp;quot;, 0.5, 0.5 )  -- create text item for the display&lt;br /&gt;
textDisplayAddText ( myDisplay, myTextItem )                  -- add created item to text display so it is displayed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Text functions}}&lt;br /&gt;
[[ru:textCreateTextItem]]&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsVehicleTaxiLightOn&amp;diff=29037</id>
		<title>IsVehicleTaxiLightOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsVehicleTaxiLightOn&amp;diff=29037"/>
		<updated>2012-01-17T10:39:45Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function will get the taxi light state of a taxi (vehicle IDs 420 and 438)&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 isVehicleTaxiLightOn ( vehicle taxi )              &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''taxi:''' The vehicle element of the taxi that you wish to get the light state of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the light is on, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&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;
This example binds the 'o' key to a function that toggles the taxi's light on and off, if you're in a taxi.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleTaxiLight()&lt;br /&gt;
	local thePlayer = getLocalPlayer()&lt;br /&gt;
	local theVehicle = getPedOccupiedVehicle(thePlayer)&lt;br /&gt;
	if thePlayer == getVehicleOccupant(theVehicle, 0) then -- if is a driver&lt;br /&gt;
		local id = getElementModel(theVehicle) -- getting vehicle model&lt;br /&gt;
		if ((id == 420) or (id== 438)) then -- if is a taxi&lt;br /&gt;
			local lights = isVehicleTaxiLightOn(theVehicle) -- getting vehicle lights state&lt;br /&gt;
			setVehicleTaxiLightOn(theVehicle, not lights) -- switch lights&lt;br /&gt;
		end&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
bindKey(&amp;quot;o&amp;quot;, &amp;quot;down&amp;quot;, toggleTaxiLight) -- binding the function&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;
{{vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29036</id>
		<title>OnClientPlayerVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29036"/>
		<updated>2012-01-17T10:38:26Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is fired when a player enters a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''vehicle:''' the vehicle that the player entered&lt;br /&gt;
*'''seat:''' the seat that the player now is on. Driver's seat = 0, higher numbers are passenger seats.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This will check if the car you entered is a Banshee or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkVehicles()&lt;br /&gt;
	local theVehicle = getPedOccupiedVehicle(source)&lt;br /&gt;
	if (getVehicleName(theVehicle)) == &amp;quot;Banshee&amp;quot; then&lt;br /&gt;
		outputChatBox(&amp;quot;You entered a Banshee!&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;This isn't a Banshee!&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;,getRootElement(),checkVehicles)&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 player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29035</id>
		<title>OnClientPlayerVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29035"/>
		<updated>2012-01-17T10:37:52Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is fired when a player enters a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''vehicle:''' the vehicle that the player entered&lt;br /&gt;
*'''seat:''' the seat that the player now is on. Driver's seat = 0, higher numbers are passenger seats.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This will check if the car you entered is a Banshee or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkVehicles()&lt;br /&gt;
	local theVehicle = getPedOccupiedVehicle(source)&lt;br /&gt;
	if (getVehicleName(theVehicle)) == &amp;quot;Banshee&amp;quot; then&lt;br /&gt;
		outputChatBox(&amp;quot;You entered a Banshee!&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;This isn't a Banshee!&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;,getRootElement(),checkVehicles)&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 player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSoundSpeed&amp;diff=29034</id>
		<title>SetSoundSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSoundSpeed&amp;diff=29034"/>
		<updated>2012-01-17T10:37:01Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function can be used to change the playback speed of the specified [[sound]] element.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setSoundSpeed ( element theSound, float speed )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' The [[sound]] element which volume you want to modify.&lt;br /&gt;
*'''speed:''' A [[float]]ing point number representing the desired sound playback speed.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the [[sound]] element playback speed was successfully changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &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;
function soundFunc()&lt;br /&gt;
sound = playSound ( &amp;quot;/sounds/jizzy.mp3&amp;quot;,true) -- Let's play a sound&lt;br /&gt;
setSoundSpeed ( sound, 1.2 ) -- And it will be a little bit faster !&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;play&amp;quot;,soundFunc)&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_audio_functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29033</id>
		<title>OnClientPlayerVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29033"/>
		<updated>2012-01-17T10:34:35Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is fired when a player enters a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''vehicle:''' the vehicle that the player entered&lt;br /&gt;
*'''seat:''' the seat that the player now is on. Driver's seat = 0, higher numbers are passenger seats.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This will check if the car you entered is a Banshee or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkVehicles()&lt;br /&gt;
	local theVehicle = source&lt;br /&gt;
	if (getVehicleName(theVehicle)) == &amp;quot;Banshee&amp;quot; then&lt;br /&gt;
		outputChatBox(&amp;quot;You entered a Banshee!&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;This isn't a Banshee!&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;,getRootElement(),checkVehicles)&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 player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29032</id>
		<title>OnClientPlayerVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29032"/>
		<updated>2012-01-17T10:33:11Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is fired when a player enters a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''vehicle:''' the vehicle that the player entered&lt;br /&gt;
*'''seat:''' the seat that the player now is on. Driver's seat = 0, higher numbers are passenger seats.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&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;
function checkVehicles()&lt;br /&gt;
	local theVehicle = source&lt;br /&gt;
	if (getVehicleName(theVehicle)) == &amp;quot;Banshee&amp;quot; then&lt;br /&gt;
		outputChatBox(&amp;quot;You entered a Banshee!&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;This isn't a Banshee!&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;,getRootElement(),checkVehicles)&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 player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29031</id>
		<title>OnClientPlayerVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerVehicleEnter&amp;diff=29031"/>
		<updated>2012-01-17T10:32:52Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is fired when a player enters a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''vehicle:''' the vehicle that the player entered&lt;br /&gt;
*'''seat:''' the seat that the player now is on. Driver's seat = 0, higher numbers are passenger seats.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the player that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&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;
function checkVehicles()&lt;br /&gt;
	local theVehicle = source&lt;br /&gt;
	if (getVehicleName(theVehicle)) == &amp;quot;Banshee&amp;quot; then&lt;br /&gt;
		outputChatBox(&amp;quot;You entered a Banshee!&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;This isn't a Banshee!&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;,getRootElement(),checkVehicles)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundSpeed&amp;diff=29030</id>
		<title>GetSoundSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundSpeed&amp;diff=29030"/>
		<updated>2012-01-17T10:25:08Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the playback speed of the specified [[sound]] element.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getSoundSpeed ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' The [[sound]] element which playback speed you want to return.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[float]] value indicating the playback speed of the [[sound]] element. Default sound playback speed is '''1.0'''.&lt;br /&gt;
&lt;br /&gt;
==Example== &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;
function outputSpeed(soundname) &lt;br /&gt;
	local sound = playSound(&amp;quot;sounds/&amp;quot;..tostring(soundname)..&amp;quot;.mp3&amp;quot;) --Play the sound from the sounds folder&lt;br /&gt;
	setSoundVolume(sound, 0.5) -- set the sound volume to 50%&lt;br /&gt;
	outputChatBox(&amp;quot;The sound speed : &amp;quot;..getSoundSpeed(sound)) -- output the sound speed&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;soundspeed&amp;quot;,outputSpeed)&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_audio_functions}}&lt;br /&gt;
[[Category:Needs_Example]]&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AttachElements&amp;diff=27326</id>
		<title>AttachElements</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AttachElements&amp;diff=27326"/>
		<updated>2011-10-18T11:35:57Z</updated>

		<summary type="html">&lt;p&gt;Xthepr0mise: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function attaches one element to another, so that the first one follows the second whenever it moves. &lt;br /&gt;
&lt;br /&gt;
If an attempt is made to attach two elements that are already attached the opposite way (eg theElement becomes theAttachToElement and vice versa), the 1st attachment order is automatically detached in favor of the 2nd attachment order. For example, if carA was attached to carB, now carB is attached to carA. Also, an element cannot be attached to two separate elements at one time. For example, two cars can be attached to one single car, but one single car cannot be attached to two separate cars. If you attempt to do this, the existing attachment will automatically be dropped in favor of the new attachment. For example, if carA is asked to attached to carB then carC, it is only attached to carC.&lt;br /&gt;
&lt;br /&gt;
This is not compatible with all elements.  The following elements are compatible:&lt;br /&gt;
* [[Marker]]s&lt;br /&gt;
* [[Blip]]s&lt;br /&gt;
* [[Object]]s&lt;br /&gt;
* [[Player]]s&lt;br /&gt;
* [[Vehicle]]s&lt;br /&gt;
* [[Sound]]s&lt;br /&gt;
* [[Colshape]]s&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The offset coodinates reflect the object space, not the world space. This means that you cannot calculate the exact offsets between two objects by pre-positioning them in the map editor as a reference. Please see [[attachElementsOffsets]] for more details.&lt;br /&gt;
&lt;br /&gt;
'''Note #2:''' Due to a limitation in GTA, unexpected attach rotations may occur if all rotation offsets are non-zero. (i.e. Try to ensure at least one of 'xRotOffset', 'yRotOffset' or 'zRotOffset' is zero)&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 attachElements ( element theElement, element theAttachToElement, [ float xPosOffset, float yPosOffset, &lt;br /&gt;
float zPosOffset, float xRotOffset, float yRotOffset, float zRotOffset ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The element to be attached.&lt;br /&gt;
*'''theAttachToElement:''' The element to attach the first to.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''xPosOffset:''' The x offset, if you want the elements to be a certain distance from one another (default 0).&lt;br /&gt;
*'''yPosOffset:''' The y offset (default 0).&lt;br /&gt;
*'''zPosOffset:''' The z offset (default 0).&lt;br /&gt;
*'''xRotOffset:''' The x rotation offset (default 0).&lt;br /&gt;
*'''yRotOffset:''' The y rotation offset (default 0).&lt;br /&gt;
*'''zRotOffset:''' The z rotation offset (default 0).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the attaching process was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example attaches a marker to the player who steals the Mr. Whoopee:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create the vehicle&lt;br /&gt;
local vehicleMrWhoopee = createVehicle ( 423, 237.472, -54.225, 1.518, 0, 354.488, 0 )&lt;br /&gt;
&lt;br /&gt;
function onMrWhoopeeEnter ( thePlayer, seat, jackedPlayer )&lt;br /&gt;
    outputChatBox ( getPlayerName ( thePlayer ) .. &amp;quot; stole the Whoopee!&amp;quot;, getRootElement(), 255, 0, 0 )&lt;br /&gt;
    -- create the marker to attach&lt;br /&gt;
    local arrowMarker = createMarker ( 0, 0, 0, &amp;quot;arrow&amp;quot;, .75, 255, 0, 0, 170 )&lt;br /&gt;
    -- attach the marker to the player with a vertical offset of 2 units&lt;br /&gt;
    attachElements ( arrowMarker, thePlayer, 0, 0, 2 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- attach it to an event&lt;br /&gt;
addEventHandler ( &amp;quot;onVehicleEnter&amp;quot;, vehicleMrWhoopee, onMrWhoopeeEnter )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Example 2:''' This function adds a tank on top of a player (for extra defense):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function tankHat ( source, commandName )&lt;br /&gt;
      local x, y, z = getElementPosition ( source ) --Get the players position&lt;br /&gt;
      local tank = createVehicle ( 432, x, y, z + 5 ) --Create a tank&lt;br /&gt;
      attachElements ( tank, source, 0, 0, 5 ) --Attach the tank to the player.&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;hat&amp;quot;, tankHat )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 3:''' This function adds a tank on top of a player (for extra defense), clientside.  This means it will be invisible to other players.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function tankHat ( commandName )&lt;br /&gt;
      local x, y, z = getElementPosition ( source ) --Get the players position&lt;br /&gt;
      local tank = createVehicle ( 432, x, y, z + 5 ) --Create a tank&lt;br /&gt;
      attachElements ( tank, source, 0, 0, 5 ) --Attach the tank to the player.&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;hat&amp;quot;, tankHat )&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;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>Xthepr0mise</name></author>
	</entry>
</feed>