<?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=RamJano</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=RamJano"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/RamJano"/>
	<updated>2026-05-02T05:50:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/getPlayerFromName&amp;diff=45574</id>
		<title>AR/getPlayerFromName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/getPlayerFromName&amp;diff=45574"/>
		<updated>2015-07-29T15:14:13Z</updated>

		<summary type="html">&lt;p&gt;RamJano: /* مثال */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==تكوين الجملة==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player getPlayerFromName ( string playerName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[اللاعب]]||}}&lt;br /&gt;
===الارقمنت===&lt;br /&gt;
* '''playerName''': اسم اللاعب الذي تريد إحضاره&lt;br /&gt;
&lt;br /&gt;
===إرجاع===&lt;br /&gt;
*يقوم بإرجاع اللاعب الذي تم اختياره من قِبل اسمه&lt;br /&gt;
==مثال==&lt;br /&gt;
على سبيل المثال، يقوم هذا الامر &amp;quot;إرسال&amp;quot; بأرسال رسالة خاصة للاعب المحدد من الأمر&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function send( player,command, playerName, ... )&lt;br /&gt;
    message = table.concat({...}, &amp;quot; &amp;quot;)&lt;br /&gt;
    outputChatBox(&amp;quot;(PM) &amp;quot;..getPlayerName(player)..&amp;quot;: &amp;quot;..message..&amp;quot;&amp;quot;,getPlayerFromName(playerName),255,255,0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;إرسال&amp;quot;, send)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==آخر==&lt;br /&gt;
{{Player functions}}&lt;br /&gt;
[[ru:getPlayerFromName]]&lt;/div&gt;</summary>
		<author><name>RamJano</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/getPlayerFromName&amp;diff=45573</id>
		<title>AR/getPlayerFromName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/getPlayerFromName&amp;diff=45573"/>
		<updated>2015-07-29T15:13:57Z</updated>

		<summary type="html">&lt;p&gt;RamJano: Created page with &amp;quot;==تكوين الجملة== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; player getPlayerFromName ( string playerName ) &amp;lt;/syntaxhighlight&amp;gt; {{OOP||اللاعب||}} ===الارقمنت=== * '''playerName''': اسم ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==تكوين الجملة==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player getPlayerFromName ( string playerName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[اللاعب]]||}}&lt;br /&gt;
===الارقمنت===&lt;br /&gt;
* '''playerName''': اسم اللاعب الذي تريد إحضاره&lt;br /&gt;
&lt;br /&gt;
===إرجاع===&lt;br /&gt;
*يقوم بإرجاع اللاعب الذي تم اختياره من قِبل اسمه&lt;br /&gt;
==مثال==&lt;br /&gt;
على سبيل المثال، يقوم هذا الامر &amp;quot;إرسال&amp;quot; بأرسال رسالة خاصة للاعب المحدد من الأمر&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function send( player,command, playerName, ... )&lt;br /&gt;
	message = table.concat({...}, &amp;quot; &amp;quot;)&lt;br /&gt;
	outputChatBox(&amp;quot;(PM) &amp;quot;..getPlayerName(player)..&amp;quot;: &amp;quot;..message..&amp;quot;&amp;quot;,getPlayerFromName(playerName),255,255,0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;إرسال&amp;quot;, send)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==آخر==&lt;br /&gt;
{{Player functions}}&lt;br /&gt;
[[ru:getPlayerFromName]]&lt;/div&gt;</summary>
		<author><name>RamJano</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerSerial&amp;diff=45572</id>
		<title>GetPlayerSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerSerial&amp;diff=45572"/>
		<updated>2015-07-29T14:47:52Z</updated>

		<summary type="html">&lt;p&gt;RamJano: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function returns the [[serial]] for a specified [[player]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
string getPlayerSerial ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[player]]:getSerial|serial|}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' A [[player]] object referencing the specified player.&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;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getPlayerSerial ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Player]].getSerial}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the serial as a ''string'' if it was found, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a command with which player can check their own serial.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkMySerial( thePlayer, command )&lt;br /&gt;
    local theSerial = getPlayerSerial( thePlayer )&lt;br /&gt;
    if theSerial then&lt;br /&gt;
        outputChatBox( &amp;quot;Your serial is: &amp;quot; .. theSerial, thePlayer )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox( &amp;quot;Sorry, you have no serial. =(&amp;quot;, thePlayer )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;myserial&amp;quot;, checkMySerial )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 2&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example add command to ban player serial.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function banSerial( source, command, noob, reason )&lt;br /&gt;
   if ( noob ) then&lt;br /&gt;
      local theNoob = getPlayerFromName( noob )&lt;br /&gt;
      local theNoobSerial = getPlayerSerial( theNoob )&lt;br /&gt;
      if ( theNoob ) then&lt;br /&gt;
         addBan( theNoobSerial, source, reason )&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;banserial&amp;quot;, banSerial )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 3&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example add command to get client's serial.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getMySerial( )&lt;br /&gt;
    local theSerial = getPlayerSerial()&lt;br /&gt;
    outputChatBox(&amp;quot;Your serial is: &amp;quot;..tostring(theSerial))&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;myserial&amp;quot;, getMySerial )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 4&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example is Firewall Account Player by serial on Login&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Firewall = &lt;br /&gt;
{&lt;br /&gt;
    [ 'AccountName' ] = 'SerialPlayer',&lt;br /&gt;
    [ '3ash8' ] = '9C9F3B55D9D7BB7135FF274D3BF444E4',&lt;br /&gt;
    [ 'test5' ] = '1D6F76CF8D7193792D13789849498452',&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( 'onPlayerLogin', getRootElement ( ),&lt;br /&gt;
    function ( _, theCurrentAccount )&lt;br /&gt;
    local Serial = Firewall[getAccountName(theCurrentAccount)]&lt;br /&gt;
        if ( Serial ) then&lt;br /&gt;
            if Serial ~= getPlayerSerial ( source ) then&lt;br /&gt;
                banPlayer ( source, false, false, true, getRootElement ( ), 'reason ban' )&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Serial functions}}&lt;/div&gt;</summary>
		<author><name>RamJano</name></author>
	</entry>
</feed>