<?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=Abdullah+Aljameel</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=Abdullah+Aljameel"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Abdullah_Aljameel"/>
	<updated>2026-05-18T08:12:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=MathNumber&amp;diff=36570</id>
		<title>MathNumber</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=MathNumber&amp;diff=36570"/>
		<updated>2013-07-08T19:44:23Z</updated>

		<summary type="html">&lt;p&gt;Abdullah Aljameel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function can be used to take or add a number from a large number.&lt;br /&gt;
&lt;br /&gt;
MTA clients do only support 24-bits numbers, therefore you can't take or add a single digit from large numbers like '1364576384'.&lt;br /&gt;
&lt;br /&gt;
This function is only needed clientside since the server runs with a floating-point precision of 56-bits, however this works also serverside.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;number mathNumber ( int num, int integer, string type )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''num''': The number you want to edit&lt;br /&gt;
* '''integer''': The amount you want to add or take from the number&lt;br /&gt;
* '''type ''': Can be either '-' or '+'&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a number if everything went good, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Function that takes a digit from a larger number&lt;br /&gt;
function mathNumber ( num, integer, type )&lt;br /&gt;
    if not ( num ) or not ( integer ) then return false end&lt;br /&gt;
&lt;br /&gt;
    local function formatNumber( numb )&lt;br /&gt;
    if not ( numb ) then return false end&lt;br /&gt;
        local fn = string.sub( tostring( numb ), ( #tostring( numb ) -6 ) )&lt;br /&gt;
        return tonumber( fn )&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
    if not ( type ) or ( type == &amp;quot;+&amp;quot; ) then&lt;br /&gt;
        local fn = string.sub( tostring( num ), 1, -8 )..( formatNumber ( num ) ) + integer&lt;br /&gt;
        return tonumber( fn )&lt;br /&gt;
    else&lt;br /&gt;
        local fn = string.sub( tostring( num ), 1, -8 )..( formatNumber ( num ) ) - integer&lt;br /&gt;
        return tonumber( fn )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mathNumber ( 1364576384, 1, '-' )&lt;br /&gt;
-- Returns: 1364576383&lt;br /&gt;
&lt;br /&gt;
1364576384 - 1&lt;br /&gt;
-- Returns: 1364576384&lt;br /&gt;
&lt;br /&gt;
mathNumber ( 1364576384, 1, '+' )&lt;br /&gt;
-- Returns: 1364576385&lt;br /&gt;
&lt;br /&gt;
1364576384 + 1&lt;br /&gt;
-- Returns: 1364576384&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: DennisUniOn&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Abdullah Aljameel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/isGuestAccount&amp;diff=36480</id>
		<title>AR/isGuestAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/isGuestAccount&amp;diff=36480"/>
		<updated>2013-06-29T13:56:37Z</updated>

		<summary type="html">&lt;p&gt;Abdullah Aljameel: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
هذه الوظيفة تتحقق من حساب الاعب إذا كان مسجل الدخول أو لا&lt;br /&gt;
&lt;br /&gt;
guest account&lt;br /&gt;
&lt;br /&gt;
هو حساب يُنشئ اوتوماتيكياً عند دخول الاعب ويُمسح اوتوماتيكياً عند خروجه الا اذا كان الاعب مسجل في السيرفر من قبل&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isGuestAccount ( account theAccount )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theAccount:''' الحساب الذي تريد ان تتحقق منه اذا كان غير مسجل&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the account is a guest account, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
هذا المثال سوف يُريك كيف تستطيع ان تُنشئ كلمة للاعبين المسجلين فقط&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function callAdmin ( playerSource )&lt;br /&gt;
    -- اختصار للتحقق من حساب اللاعب&lt;br /&gt;
    sourceAccount = getPlayerAccount ( playerSource )&lt;br /&gt;
    -- اذا كان غير مسجل&lt;br /&gt;
    if isGuestAccount ( sourceAccount ) then&lt;br /&gt;
        -- يقول لهم في لوحة اف 8 الآتي&lt;br /&gt;
        outputConsole ( &amp;quot;الرجاء التسجيل لـ تستخدم هذه الوظيفة&amp;quot;, playerSource )&lt;br /&gt;
    else&lt;br /&gt;
       -- الطريقة التي تريد بها أن تصل للأدمن هنا&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
-- يُمثَل الحدث هنا بـ كلمة &amp;quot; الادمن &amp;quot; لكي يتم الاتصال به&lt;br /&gt;
addCommandHandler ( &amp;quot;الادمن&amp;quot;, callAdmin )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==أنظر أيضاً==&lt;br /&gt;
{{AR Account_functions}}&lt;br /&gt;
[[en:isGuestAccount]]&lt;/div&gt;</summary>
		<author><name>Abdullah Aljameel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/isGuestAccount&amp;diff=36479</id>
		<title>AR/isGuestAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/isGuestAccount&amp;diff=36479"/>
		<updated>2013-06-29T13:55:28Z</updated>

		<summary type="html">&lt;p&gt;Abdullah Aljameel: /* مثال */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
هذه الوظيفة تتحقق من حساب الاعب إذا كان مسجل الدخول أو لا&lt;br /&gt;
&lt;br /&gt;
guest account&lt;br /&gt;
&lt;br /&gt;
هو حساب يُنشئ اوتوماتيكياً عند دخول الاعب ويُمسح اوتوماتيكياً عند خروجه الا اذا كان الاعب مسجل في السيرفر من قبل&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isGuestAccount ( account theAccount )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theAccount:''' الحساب الذي تريد ان تتحقق منه اذا كان غير مسجل&lt;br /&gt;
&lt;br /&gt;
''guest account''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the account is a guest account, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
هذا المثال سوف يُريك كيف تستطيع ان تُنشئ كلمة للاعبين المسجلين فقط&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function callAdmin ( playerSource )&lt;br /&gt;
    -- اختصار للتحقق من حساب اللاعب&lt;br /&gt;
    sourceAccount = getPlayerAccount ( playerSource )&lt;br /&gt;
    -- اذا كان غير مسجل&lt;br /&gt;
    if isGuestAccount ( sourceAccount ) then&lt;br /&gt;
        -- يقول لهم في لوحة اف 8 الآتي&lt;br /&gt;
        outputConsole ( &amp;quot;الرجاء التسجيل لـ تستخدم هذه الوظيفة&amp;quot;, playerSource )&lt;br /&gt;
    else&lt;br /&gt;
       -- الطريقة التي تريد بها أن تصل للأدمن هنا&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
-- يُمثَل الحدث هنا بـ كلمة &amp;quot; الادمن &amp;quot; لكي يتم الاتصال به&lt;br /&gt;
addCommandHandler ( &amp;quot;الادمن&amp;quot;, callAdmin )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==أنظر أيضاً==&lt;br /&gt;
{{AR Account_functions}}&lt;br /&gt;
[[en:isGuestAccount]]&lt;/div&gt;</summary>
		<author><name>Abdullah Aljameel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedGravity&amp;diff=36434</id>
		<title>SetPedGravity</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedGravity&amp;diff=36434"/>
		<updated>2013-06-22T04:26:13Z</updated>

		<summary type="html">&lt;p&gt;Abdullah Aljameel: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function sets the gravity level of a ped.&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 setPedGravity ( ped thePed, float gravity )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed''': The ped whose gravity to change.&lt;br /&gt;
*'''level''': The level of gravity (default is 0.008).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the gravity was successfully set, ''false'' otherwise&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example allows the user to type a command to change their gravity:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function consoleSetPlayerGravity ( thePlayer, commandName, level )&lt;br /&gt;
	if thePlayer and level then&lt;br /&gt;
		local success = setPedGravity ( thePlayer, tonumber ( level ) )  -- Set the gravity&lt;br /&gt;
		if not success then                           -- Check if setPlayerGravity was false (not successful)&lt;br /&gt;
			outputConsole( &amp;quot;Failed to set ped gravity&amp;quot;, thePlayer )  -- If success is false, meaning gravity could not be set, this message will show&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;setplayergravity&amp;quot;, consoleSetPlayerGravity )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped functions}}&lt;br /&gt;
[[ru:setPedGravity]]&lt;/div&gt;</summary>
		<author><name>Abdullah Aljameel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Useful_Functions&amp;diff=36417</id>
		<title>Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Useful_Functions&amp;diff=36417"/>
		<updated>2013-06-18T08:04:42Z</updated>

		<summary type="html">&lt;p&gt;Abdullah Aljameel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
{{Adding_Pages_to_Categories_and_Templates}}&lt;br /&gt;
&lt;br /&gt;
This page lists functions that are not included in the server or the client, but are still useful.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[ES:Funciones Útiles]]&lt;br /&gt;
[[ru:Useful Functions]]&lt;br /&gt;
[[de:Nützliche_Funktionen]]&lt;br /&gt;
[[Ar:وظائف مفيدة]]&lt;/div&gt;</summary>
		<author><name>Abdullah Aljameel</name></author>
	</entry>
</feed>