<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Resource:EntityData/restrictions_key?action=history&amp;feed=atom</id>
	<title>Resource:EntityData/restrictions key - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Resource:EntityData/restrictions_key?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData/restrictions_key&amp;action=history"/>
	<updated>2026-05-17T14:36:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:EntityData/restrictions_key&amp;diff=73067&amp;oldid=prev</id>
		<title>GalAnonim: Created page with &quot;== Restrictions key == Set of data validation functions for the key according to the assumed array in the flag.  = Introduction = setKeyFlag(&quot;Example Key&quot;, {type = string type,  value = string value, bettwen = table bettwen, function func = function value operation, int len = length only works for string data operations})  The flag function mainly consists of an array and basic concepts such as: * string type - A specific data type from Lua and the MTA platform. * string...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:EntityData/restrictions_key&amp;diff=73067&amp;oldid=prev"/>
		<updated>2021-11-26T01:46:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Restrictions key == Set of data validation functions for the key according to the assumed array in the flag.  = Introduction = setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = string type,  value = string value, bettwen = table bettwen, function func = function value operation, int len = length only works for string data operations})  The flag function mainly consists of an array and basic concepts such as: * string type - A specific data type from Lua and the MTA platform. * string...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Restrictions key ==&lt;br /&gt;
Set of data validation functions for the key according to the assumed array in the flag.&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = string type,  value = string value, bettwen = table bettwen, function func = function value operation, int len = length only works for string data operations})&lt;br /&gt;
&lt;br /&gt;
The flag function mainly consists of an array and basic concepts such as:&lt;br /&gt;
* string type - A specific data type from Lua and the MTA platform.&lt;br /&gt;
* string value - The type of data type&lt;br /&gt;
* table bettwen - An array with two numeric values ​​from to, the first must be the smallest and the second largest.&lt;br /&gt;
* function func - A function that checks the correctness of data according to your needs, the function structure consists of the default value parameter already added.&lt;br /&gt;
* int len - The value of the maximum accepted data length works for string&lt;br /&gt;
&lt;br /&gt;
= Explanation =&lt;br /&gt;
We divide the type into: userdata, number, string, table, boolean values ​​are not checked by the flag, if they are used, this fragment can be omitted.&lt;br /&gt;
The accepted types of values ​​for particular things are these: &lt;br /&gt;
* userdata:&lt;br /&gt;
** resource-data&lt;br /&gt;
** xml-node&lt;br /&gt;
** lua-timer&lt;br /&gt;
** vector2&lt;br /&gt;
** vector3&lt;br /&gt;
** vector4&lt;br /&gt;
** matrix&lt;br /&gt;
** account&lt;br /&gt;
** db-query&lt;br /&gt;
** acl&lt;br /&gt;
** acl-group&lt;br /&gt;
** ban&lt;br /&gt;
** text-item&lt;br /&gt;
** text-display&lt;br /&gt;
** vehicle&lt;br /&gt;
** ped&lt;br /&gt;
** player&lt;br /&gt;
** object&lt;br /&gt;
** gui&lt;br /&gt;
** element&lt;br /&gt;
* number&lt;br /&gt;
** int&lt;br /&gt;
** float&lt;br /&gt;
* string&lt;br /&gt;
* table&lt;br /&gt;
&lt;br /&gt;
= Bettwen =&lt;br /&gt;
can use the term bettwen for numeric and string values, &lt;br /&gt;
The structure of the structure is as follows, example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = &amp;quot;number&amp;quot;,  value = &amp;quot;int&amp;quot;, bettwen = {0, 50} })&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Values ​​that will be adopted will be between 0 and 50, in the case of others they will not be &lt;br /&gt;
assigned to the element.&lt;br /&gt;
&lt;br /&gt;
= func =&lt;br /&gt;
A custom function that you can engage if you lack any data validation capabilities for a key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local funcExample = [[&lt;br /&gt;
function(value)&lt;br /&gt;
    return value%2 == 0&lt;br /&gt;
end]]&lt;br /&gt;
setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = &amp;quot;number&amp;quot;,  value = &amp;quot;int&amp;quot;, func = funcExample })&lt;br /&gt;
&lt;br /&gt;
-- OR&lt;br /&gt;
&lt;br /&gt;
funcCheckEven = function(value)&lt;br /&gt;
    return value%2 == 0&lt;br /&gt;
end&lt;br /&gt;
setKeyFlag(&amp;quot;Example Key&amp;quot;, {type = &amp;quot;number&amp;quot;,  value = &amp;quot;int&amp;quot;, func = funcCheckEven})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This function will check if the number we give is even if it allows it to be assigned to an element.&lt;br /&gt;
&lt;br /&gt;
= len value =&lt;br /&gt;
Length checking for the string data type&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setKeyFlag(&amp;quot;descrpition&amp;quot;, {type = &amp;quot;string&amp;quot;, len = 25})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the value for the description key is 25 characters, then it will be assigned to the element.&lt;/div&gt;</summary>
		<author><name>GalAnonim</name></author>
	</entry>
</feed>