<?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=Shux</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=Shux"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Shux"/>
	<updated>2026-05-28T09:32:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Datastore&amp;diff=68091</id>
		<title>Resource:Datastore</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Datastore&amp;diff=68091"/>
		<updated>2020-12-25T10:09:58Z</updated>

		<summary type="html">&lt;p&gt;Shux: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
DataStore allows you to store data (string/table) to a specific key in the database table. All you have to do is enter your database information in settings.lua('sqlite' or 'mysql') and once connected you can use the datastore exported functions to store and/or get data from the db table.&lt;br /&gt;
Very useful for beginner developers who lack experience with MySQL/SQLite.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Fairly easy to use. &lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
====getDatabase====&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;
This function returns the database, if there is one at least.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:getDatabase()&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the database connection if one was connected.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====storeData====&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;
This function stores data into a specific key in the connected database table.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:storeData(string key, string/table value, string theTable)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''key''': Key that the data is gonna be stored in&lt;br /&gt;
*'''value''': Data to be stored in the key '''(tables are automatically stored as a string)'''&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''theTable''': the table that you're wanting to store the data in '''(the data is stored in the default table if you didn't enter the specific table)''' - only works from version 1.1&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was stored successfully.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====getData====&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;
This function gets the data stored in a specific key.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:getData(string key, string theTable)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''key''': Key that you would like to receive the data of.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''theTable''': the table that you're wanting to get the data from '''(if no table was entered here then it automatically looks in the default table)''' - only works from version 1.1&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the data that was stored in the key if found. ''(converted tables to strings are automatically returned as tables)''&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====getAllData====&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;
This function gets all the keys and data stored in the connected database table.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:getAllData(string theTable)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''theTable''': the table that you're wanting to get the data from '''(if no table was entered here then it automatically looks in the default table)''' - only works from version 1.1&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*'''Version 1.0''': Returns table of all the data received from the connected database table. Key names being the index value, value being the data of the key.&lt;br /&gt;
*'''From Version 1.1 and forward''': Returns table of all the data received from the selected database table (default table if none was entered). Indexed numerically, value being a table of the key and value&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====removeData==== &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;
This function removes the data stored in a specific key. - Only works from version 1.1&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:removeData(string key, string theTable)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''key''': Key that you would like to remove the data of.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''theTable''': the table that you're wanting to remove the data from '''(if no table was entered here then it automatically removes from the default table)'''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
'''Resource:''' https://community.multitheftauto.com/?p=resources&amp;amp;s=details&amp;amp;id=17541&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Datastore&amp;diff=65007</id>
		<title>Resource:Datastore</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Datastore&amp;diff=65007"/>
		<updated>2020-02-04T06:05:25Z</updated>

		<summary type="html">&lt;p&gt;Shux: Created page with &amp;quot;{{Resource page}} DataStore allows you to store data (string/table) to a specific key in the database table. All you have to do is enter your database information in settings....&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
DataStore allows you to store data (string/table) to a specific key in the database table. All you have to do is enter your database information in settings.lua('sqlite' or 'mysql') and once connected you can use the datastore exported functions to store and/or get data from the db table.&lt;br /&gt;
Very useful for beginner developers who lack experience with MySQL/SQLite.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Fairly easy to use. &lt;br /&gt;
&lt;br /&gt;
==Exported functions==&lt;br /&gt;
====getDatabase====&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;
This function returns the database, if there is one at least.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:getDatabase()&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the database connection if one was connected.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====storeData====&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;
This function stores data into a specific key in the connected database table.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:storeData(string key, string/table value)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''string''' key: Key that the data is gonna be stored in&lt;br /&gt;
*'''string/table''' value: Data to be stored in the key '''(tables are automatically stored as a string)'''&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the data was stored successfully.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====getData====&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;
This function gets the data stored in a specific key.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:getData(string key)&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''string''' key: Key that you would like to receive the data of.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the data that was stored in the key if found. ''(converted tables to strings are automatically returned as tables)''&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====getAllData====&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;
This function gets all the keys and data stored in the connected database table.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;exports['datastore']:getAllData()&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Returns===&lt;br /&gt;
Returns table of all the data received from the connected database table. Key names being the index value, value being the data of the key.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
'''Resource:''' https://community.multitheftauto.com/?p=resources&amp;amp;s=details&amp;amp;id=17541&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SPS:getProperties&amp;diff=62955</id>
		<title>SPS:getProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SPS:getProperties&amp;diff=62955"/>
		<updated>2019-06-07T11:17:41Z</updated>

		<summary type="html">&lt;p&gt;Shux: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve all property elements.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getProperties()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns all '''property''' elements.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example script outputs all property IDs to the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;,root,&lt;br /&gt;
	function()&lt;br /&gt;
		local properties = getProperties()&lt;br /&gt;
		for i,property in ipairs(properties) do&lt;br /&gt;
			outputChatBox(&amp;quot;ID: &amp;quot;..getPropertyID(property))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SPS:getProperties&amp;diff=62954</id>
		<title>SPS:getProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SPS:getProperties&amp;diff=62954"/>
		<updated>2019-06-07T11:17:28Z</updated>

		<summary type="html">&lt;p&gt;Shux: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
This function is used to retrieve all property elements.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getProperties()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns all '''property''' elements.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example script outputs all property IDs to the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;,root,&lt;br /&gt;
	function()&lt;br /&gt;
		local properties = getProperties()&lt;br /&gt;
		for i,property in ipairs(properties) do&lt;br /&gt;
			outputChatBox(&amp;quot;ID: &amp;quot;..getPropertyID(property))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:SPS&amp;diff=62942</id>
		<title>Resource:SPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:SPS&amp;diff=62942"/>
		<updated>2019-06-06T10:25:22Z</updated>

		<summary type="html">&lt;p&gt;Shux: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Shux's Property System (SPS)''' ==&lt;br /&gt;
&lt;br /&gt;
This resource allows you to create and manage real estate all over GTA:SA. Download will be added '''soon'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Shared functions==&lt;br /&gt;
{{SPS_Shared_functions}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Server functions==&lt;br /&gt;
{{SPS_Server_functions}}&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:SPS_Server_functions&amp;diff=62941</id>
		<title>Template:SPS Server functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:SPS_Server_functions&amp;diff=62941"/>
		<updated>2019-06-06T10:22:05Z</updated>

		<summary type="html">&lt;p&gt;Shux: Created page with &amp;quot;SPS:isPlayerPropertyEditor  SPS:setPropertyOwner  SPS:setPropertyPrice  SPS:setPropertyIncome  SPS:setPropertyLocked  SPS:setPropertyForSale  SPS:del...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[SPS:isPlayerPropertyEditor]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:setPropertyOwner]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:setPropertyPrice]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:setPropertyIncome]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:setPropertyLocked]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:setPropertyForSale]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:deleteProperty]]&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:SPS_Shared_functions&amp;diff=62940</id>
		<title>Template:SPS Shared functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:SPS_Shared_functions&amp;diff=62940"/>
		<updated>2019-06-06T10:18:53Z</updated>

		<summary type="html">&lt;p&gt;Shux: Created page with &amp;quot;SPS:getProperties  SPS:getProperty  SPS:getPropertyID  SPS:getPropertyType  SPS:getPropertyOwner  SPS:getPropertyPrice  SPS:getPropertyIncome  SP...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[SPS:getProperties]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:getProperty]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:getPropertyID]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:getPropertyType]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:getPropertyOwner]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:getPropertyPrice]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:getPropertyIncome]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:isPropertyLocked]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:isPropertyForSale]]&lt;br /&gt;
&lt;br /&gt;
[[SPS:isElementInsideProperty]]&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SPS:getProperties&amp;diff=62939</id>
		<title>SPS:getProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SPS:getProperties&amp;diff=62939"/>
		<updated>2019-06-06T10:15:48Z</updated>

		<summary type="html">&lt;p&gt;Shux: Created page with &amp;quot;This function is used to retrieve all property elements.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is used to retrieve all property elements.&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetProperties&amp;diff=62938</id>
		<title>GetProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetProperties&amp;diff=62938"/>
		<updated>2019-06-06T10:15:30Z</updated>

		<summary type="html">&lt;p&gt;Shux: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetProperties&amp;diff=62937</id>
		<title>GetProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetProperties&amp;diff=62937"/>
		<updated>2019-06-06T10:14:45Z</updated>

		<summary type="html">&lt;p&gt;Shux: Created page with &amp;quot;This function is used to retrieve all property elements.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is used to retrieve all property elements.&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:SPS&amp;diff=62936</id>
		<title>Resource:SPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:SPS&amp;diff=62936"/>
		<updated>2019-06-06T10:06:11Z</updated>

		<summary type="html">&lt;p&gt;Shux: Created page with &amp;quot;This resource allows you to create real estate all over GTA:SA. Download can be found  '''soon'''&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This resource allows you to create real estate all over GTA:SA. Download can be found  '''soon'''&lt;/div&gt;</summary>
		<author><name>Shux</name></author>
	</entry>
</feed>