<?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=Ramzes</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=Ramzes"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Ramzes"/>
	<updated>2026-04-10T18:16:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerLogin&amp;diff=69721</id>
		<title>OnPlayerLogin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerLogin&amp;diff=69721"/>
		<updated>2021-04-01T07:10:11Z</updated>

		<summary type="html">&lt;p&gt;Ramzes: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event is triggered when a player logs into their account in-game.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
account thePreviousAccount, account theCurrentAccount&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''thePreviousAccount''': the [[account]] the player was logged into before.&lt;br /&gt;
*'''theCurrentAccount''': the [[account]] the player logged into just now.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the player [[element]] that just logged in.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is canceled the player will not be logged in.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example just outputs to the player console that a player in one account logged into an another account:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- root = getElementRoot()&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerLogin&amp;quot;, root,&lt;br /&gt;
  function()&lt;br /&gt;
    outputChatBox(getPlayerName(source)..&amp;quot; has logged in!&amp;quot;, root)&lt;br /&gt;
  end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This example allows only hardcoded serials to access given accounts.&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' ] = 'playerSerial',&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 and Serial ~= getPlayerSerial ( source ) then&lt;br /&gt;
            outputChatBox( &amp;quot;Sorry, you're not allowed to access this account.&amp;quot;, source)&lt;br /&gt;
            cancelEvent( true )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;br /&gt;
&lt;br /&gt;
[[ru:onPlayerLogin]]&lt;/div&gt;</summary>
		<author><name>Ramzes</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddElementDataSubscriber&amp;diff=68468</id>
		<title>AddElementDataSubscriber</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddElementDataSubscriber&amp;diff=68468"/>
		<updated>2021-01-30T11:34:05Z</updated>

		<summary type="html">&lt;p&gt;Ramzes: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{New items|3.0158|1.5.7-9.20477|This function subscribes a [[player]] to specific [[element data]].&lt;br /&gt;
This function is used together with [[setElementData]] in ''&amp;quot;subscribe&amp;quot;'' mode.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool addElementDataSubscriber ( element theElement, string key, player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[element]]:addDataSubscriber||removeElementDataSubscriber}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] you wish to subscribe the [[player]] to.&lt;br /&gt;
*'''key:''' The key you wish to subscribe the player to.&lt;br /&gt;
*'''thePlayer:''' The [[player]] you wish to subscribe.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player was subscribed, ''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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onVehicleEnter&amp;quot;, getRootElement(), function(thePlayer, seat)&lt;br /&gt;
   if seat==0 then -- if the player is a driver&lt;br /&gt;
      addElementDataSubscriber(source, &amp;quot;id&amp;quot;, thePlayer) -- subscribe the player to element&lt;br /&gt;
   end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.7-9.20477|n/a|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element_functions}}&lt;/div&gt;</summary>
		<author><name>Ramzes</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Ramzes&amp;diff=68466</id>
		<title>User:Ramzes</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Ramzes&amp;diff=68466"/>
		<updated>2021-01-29T11:30:46Z</updated>

		<summary type="html">&lt;p&gt;Ramzes: Created page with &amp;quot;== LUA == I am learning lua for a year with a little break&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LUA ==&lt;br /&gt;
I am learning lua for a year with a little break&lt;/div&gt;</summary>
		<author><name>Ramzes</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPedVehicleExit&amp;diff=68465</id>
		<title>OnPedVehicleExit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPedVehicleExit&amp;diff=68465"/>
		<updated>2021-01-29T11:15:19Z</updated>

		<summary type="html">&lt;p&gt;Ramzes: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is triggered when a ped leaves 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, ped jacker, bool forcedByScript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': a [[vehicle]] element representing the vehicle in which the ped exited from.&lt;br /&gt;
*'''seat''': an [[int]] representing the seat in which the ped was before exiting.&lt;br /&gt;
*'''jacker''': a [[player]] or [[ped]] element representing who jacked the driver.&lt;br /&gt;
*'''forcedByScript:''' a [[boolean]] representing whether the exit was forced using [[removePedFromVehicle]] or by the ped.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] that left the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
{{Needs 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;
Destroy the vehicle when ped has been jacked and kick the jacker if exists&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function destroyVehicle(theVehicle, seat, jacker, forcedByScript)&lt;br /&gt;
   if seat==0 then -- If ped was a driver&lt;br /&gt;
      if forcedByScript then&lt;br /&gt;
         destroyElement(theVehicle) -- If the exit was forced using removePedFromVehicle then destroy the vehicle&lt;br /&gt;
      elseif jacker then&lt;br /&gt;
         kickPlayer(jacker)&lt;br /&gt;
         destroyElement(theVehicle)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPedVehicleExit&amp;quot;, root, destroyVehicle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Ped events}}&lt;/div&gt;</summary>
		<author><name>Ramzes</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68464</id>
		<title>OnPedVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68464"/>
		<updated>2021-01-29T11:01:06Z</updated>

		<summary type="html">&lt;p&gt;Ramzes: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is triggered when a ped 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, ped jacked&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': a [[vehicle]] element representing the vehicle that was entered.&lt;br /&gt;
*'''seat''': an [[int]] representing the seat in which the ped is entering.&lt;br /&gt;
*'''jacked''': a [[player]] or [[ped]] element representing who has been jacked.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
{{Needs 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;
Sending a message to every player when ped has entered to a vehicle&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function sendMessage(theVehicle, seat)&lt;br /&gt;
   local vehicleName = getVehicleName(theVehicle) -- Get name of the vehicle&lt;br /&gt;
   if seat==0 then -- if the ped is a driver&lt;br /&gt;
      outputChatBox(&amp;quot;Ped is now a driver of &amp;quot;..vehicleName, root)&lt;br /&gt;
   else -- if not&lt;br /&gt;
      outputChatBox(&amp;quot;Ped has entered to &amp;quot;..vehicleName, root)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPedVehicleEnter&amp;quot;, root, sendMessage)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Ped events}}&lt;/div&gt;</summary>
		<author><name>Ramzes</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68463</id>
		<title>OnPedVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68463"/>
		<updated>2021-01-29T10:58:29Z</updated>

		<summary type="html">&lt;p&gt;Ramzes: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is triggered when a ped 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, ped jacked&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': a [[vehicle]] element representing the vehicle that was entered.&lt;br /&gt;
*'''seat''': an [[int]] representing the seat in which the ped is entering.&lt;br /&gt;
*'''jacked''': a [[player]] or [[ped]] element representing who has been jacked.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
{{Needs 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;
Sending a message to every player when ped has entered to a vehicle&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function sendMessage(theVehicle, seat)&lt;br /&gt;
   local vehicleName = getVehicleName(theVehicle) -- Get name of the vehicle&lt;br /&gt;
   if seat==0 then -- if the ped is a driver&lt;br /&gt;
      outputChatBox(&amp;quot;Ped is now a driver of &amp;quot;..vehicleName, root)&lt;br /&gt;
   else -- if not&lt;br /&gt;
      outputChatBox(&amp;quot;Ped has entered to &amp;quot;..vehicleName, root)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPedVehicleEnter&amp;quot;, root, sendMessage)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Ped events}}&lt;/div&gt;</summary>
		<author><name>Ramzes</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68462</id>
		<title>OnPedVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68462"/>
		<updated>2021-01-29T10:53:22Z</updated>

		<summary type="html">&lt;p&gt;Ramzes: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is triggered when a ped 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, ped jacked&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': a [[vehicle]] element representing the vehicle that was entered.&lt;br /&gt;
*'''seat''': an [[int]] representing the seat in which the ped is entering.&lt;br /&gt;
*'''jacked''': a [[player]] or [[ped]] element representing who has been jacked.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
{{Needs 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;
Sending a message to every player when ped has entered to a vehicle&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function sendMessage()&lt;br /&gt;
   for _, player in pairs(getElementsByType(&amp;quot;player&amp;quot;)) do&lt;br /&gt;
      outputChatBox(&amp;quot;Ped has entered to a vehicle&amp;quot;, player)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPedVehicleEnter&amp;quot;, root, sendMessage)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Ped events}}&lt;/div&gt;</summary>
		<author><name>Ramzes</name></author>
	</entry>
</feed>