<?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=Szybki</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=Szybki"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Szybki"/>
	<updated>2026-04-28T06:30:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=How_you_can_help&amp;diff=39889</id>
		<title>How you can help</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=How_you_can_help&amp;diff=39889"/>
		<updated>2014-06-14T15:44:22Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 39885 by Le'CC (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!&lt;br /&gt;
&lt;br /&gt;
==Coding for MTASA==&lt;br /&gt;
* Submit source patches for the mod, containing requested features or bugfixes. ([[Coding guidelines]])&lt;br /&gt;
* Translate MTA:SA to your native language - http://translate.multitheftauto.com/&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
* Create a gamemode &lt;br /&gt;
**[[Scripting Introduction]]&lt;br /&gt;
**[http://www.lua.org/pil/index.html &amp;quot;Programming in Lua&amp;quot; Manual]&lt;br /&gt;
* Create an administration page on the HTTP server.&lt;br /&gt;
**[[Resource Web Access]]&lt;br /&gt;
* Make a general purpose resource that provides useful functions to other resources.&lt;br /&gt;
&lt;br /&gt;
==Mapping==&lt;br /&gt;
* Create a map with the map editor for an existing gamemode.&lt;br /&gt;
**[[Resource:Editor|Map Editor Manual]]&lt;br /&gt;
&lt;br /&gt;
==Web development==&lt;br /&gt;
* Work with lil_Toady to add new features and improvements to community.mtasa.com.&lt;br /&gt;
* Create your own system for statistics - using the [[PHP SDK]] as a basis. Contact eAi or jbeta for help.&lt;br /&gt;
&lt;br /&gt;
==Documentation==&lt;br /&gt;
Before you make changes check out: [[Help:Editing Guidelines|Editing Guidelines]]&lt;br /&gt;
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something.&lt;br /&gt;
* Add examples to [[:Category:Needs Example|functions &amp;amp; events missing examples]] - please test them, and again, as if you need help.&lt;br /&gt;
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category.&lt;br /&gt;
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]].&lt;br /&gt;
* Write tutorials to help new people.&lt;br /&gt;
* Translate the wiki pages so people from other countries can get started in MTA too.&lt;br /&gt;
* Create documentation for undocumented functions and events [[Undocumented Items]]&lt;br /&gt;
&lt;br /&gt;
==Specific tasks==&lt;br /&gt;
* Create a fuzzer to check for crashes in our scripting functions.&lt;br /&gt;
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.&lt;br /&gt;
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.&lt;br /&gt;
&lt;br /&gt;
[[pl:Jak możesz pomóc]]&lt;br /&gt;
[[ru:How you can help]]&lt;br /&gt;
[[es:Cómo puedes ayudar]]&lt;br /&gt;
[[hu:How you can help]]&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateBlip&amp;diff=39534</id>
		<title>CreateBlip</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateBlip&amp;diff=39534"/>
		<updated>2014-05-15T13:37:19Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 39533 by Iromand (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a [[blip]] [[element]], which is displayed as an icon on the client's radar.&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;
blip createBlip ( float x, float y, float z [, int icon = 0, int size = 2, int r = 255, int g = 0, int b = 0, int a = 255, &lt;br /&gt;
int ordering = 0, float visibleDistance = 99999.0, visibleTo = getRootElement( ) ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
*'''visibleTo:''' This defines which elements can see the blip. Defaults to visible to everyone. See [[visibility]].&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;
blip createBlip ( float x, float y, float z [, int icon = 0, int size = 2, int r = 255, int g = 0, int b = 0, int a = 255, &lt;br /&gt;
int ordering = 0, float visibleDistance ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns an [[element]] of the [[blip]] if it was created successfully, ''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;
'''Example 1:''' This example creates a radar blip at a random player's position and makes it so that it is only visible to that player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
local myPlayer = getRandomPlayer( )&lt;br /&gt;
-- Retrieve the player's position and store it in the variables x, y and z&lt;br /&gt;
local x, y, z = getElementPosition( myPlayer )&lt;br /&gt;
-- Create a radar blip at the player's position, with a 'cash' icon and only visible to the player&lt;br /&gt;
local myBlip = createBlip( x, y, z, 51, 0, 0, 0, 255, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example attaches a blip to a player. You can attach a blip to an element by just setting the blip's parent to that element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
local myPlayer = getRandomPlayer( )&lt;br /&gt;
-- Create a radar blip in the middle of the map&lt;br /&gt;
local myBlip = createBlip( 0, 0, 0 )&lt;br /&gt;
-- Make the player the parent of the blip, so that the blip follows the player around&lt;br /&gt;
setElementParent( myBlip, myPlayer )&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;
{{Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
[[AR:createBlip]]&lt;br /&gt;
[[es:createBlip]]&lt;br /&gt;
[[DE:createBlip]]&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Lopez&amp;diff=36324</id>
		<title>User:Lopez</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Lopez&amp;diff=36324"/>
		<updated>2013-06-02T03:35:29Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36306 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello, my name is lopez(loo) and I'm from [[PL/Strona_Główna|Poland]][[File:Plflag.png]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Oilschaps.jpg|thumb|350px|I don't have idea what I am doing.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Greetings.&lt;br /&gt;
&lt;br /&gt;
== [http://bugs.mtasa.com/view.php?id=7631 playGTAScriptSound] ==&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;
playGTAScriptSound(int soundID, [bool looped = false])&lt;br /&gt;
playGTAScriptSound3D(int soundID, float x, float y, float z, [bool looped = false])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sounds ID ===&lt;br /&gt;
* http://pastebin.com/cfMR0phi -- list of all GTA script sounds from data/AudioEvents.txt (ex. casino conversations etc.)&lt;br /&gt;
&lt;br /&gt;
=== Memory adress ===&lt;br /&gt;
Memory adress of main.scm function to play sound.&lt;br /&gt;
&amp;lt;section name=&amp;quot;from main.scm&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;
&lt;br /&gt;
0952: load_soundtrack 0 -- 0 is id?&lt;br /&gt;
0953: get_soundtrack_status_to @23 - I think last argument is main.scm code block&lt;br /&gt;
&lt;br /&gt;
0954: start_playing_loaded_soundtrack &lt;br /&gt;
0955: end_playing_loaded_soundtrack&lt;br /&gt;
^ i think this is the old, bugged playMissionAudio function&lt;br /&gt;
&lt;br /&gt;
043C: disable_sounds_after_fade 1 -- can be 1 or 0 &lt;br /&gt;
&lt;br /&gt;
I think this is what Im looking for&lt;br /&gt;
018C: play_sound 1052 at 0.0 0.0 0.0 - this? SOUND_AMMUNATION_BUY_WEAPON 1052; I think 0 0 0 = no 3D sound&lt;br /&gt;
018C: play_sound 65535 at 2181.127 -2251.999 14.036 - another example; id 65535 doesnt exist in AudioEvents.txt&lt;br /&gt;
018C: play_sound 1058 at 0.0 0.0 0.0 &lt;br /&gt;
018C: play_sound 1053 at 0.0 0.0 0.0 &lt;br /&gt;
&lt;br /&gt;
'--&amp;gt; 018C &amp;lt;--&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;
== ? ==&lt;br /&gt;
&lt;br /&gt;
MOJRM-511&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Language&amp;quot; content=&amp;quot;ar-sa&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;font size=&amp;quot;64px&amp;quot;&amp;gt; ̿̿ ̿̿ ̿̿ ̿'̿'\̵͇̿̿\з=( ͡° ͜ʖ ͡°)=ε/̵͇̿̿/’̿’̿ ̿ ̿̿ ̿̿ ̿̿&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateElement&amp;diff=36323</id>
		<title>CreateElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateElement&amp;diff=36323"/>
		<updated>2013-06-02T03:34:40Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36309 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function is used to create a new dummy element in the [[element tree]] which do not necessarily represent an entity within the San Andreas world. A common use for this function is for creating custom elements, such as a Flag or a Base.&lt;br /&gt;
&lt;br /&gt;
Elements created using this function are placed in the element tree with their parent as the 'dynamic' map element.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element createElement ( string elementType, [ string elementID = nil ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''elementType:''' The type of element being created.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''elementID:''' The ID of the element being created.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the element if it was successfully created. Returns ''false'' if the arguments are wrong.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a &amp;quot;flag&amp;quot; element, named &amp;quot;blue&amp;quot;, which will be at the resource's dynamic map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
blueTeamFlag = createElement( &amp;quot;flag&amp;quot;, &amp;quot;blue&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Except for it being placed in a different map root, that line will have the same effect as having this in a .map file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;flag id=&amp;quot;blue&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also== &lt;br /&gt;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetAttachedElements&amp;diff=36322</id>
		<title>GetAttachedElements</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetAttachedElements&amp;diff=36322"/>
		<updated>2013-06-02T03:34:22Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36308 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns a table of all the elements attached to the specified element&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 getAttachedElements ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement''': The [[element]] which you require the information from.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table of all the elements attached to the specified element.&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;
-- Print a list of all the players attached to the specified element&lt;br /&gt;
  local Inf = getElementByID ( &amp;quot;infernus1&amp;quot; )&lt;br /&gt;
  local attachedElements = getAttachedElements ( Inf )&lt;br /&gt;
  if ( attachedElements ) then -- if we got the table&lt;br /&gt;
    local attachedElementsList = &amp;quot;none&amp;quot;&lt;br /&gt;
    -- Loop through the table&lt;br /&gt;
    for ElementKey, ElementValue in ipairs ( attachedElements ) do&lt;br /&gt;
      -- add their name to the list&lt;br /&gt;
      if ( getElementType ( ElementValue ) == &amp;quot;player&amp;quot; ) then&lt;br /&gt;
        if ( attachedElementsList == &amp;quot;none&amp;quot; ) then&lt;br /&gt;
          attachedElementsList = getPlayerName ( ElementValue )&lt;br /&gt;
        else&lt;br /&gt;
          attachedElementsList = attachedElementsList .. &amp;quot;, &amp;quot; .. getPlayerName ( ElementValue )&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    outputConsole ( &amp;quot;Players attached to the infernus: &amp;quot; .. attachedElementsList )&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;
==See Also==&lt;br /&gt;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCameraTarget&amp;diff=36321</id>
		<title>GetCameraTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCameraTarget&amp;diff=36321"/>
		<updated>2013-06-02T03:34:05Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36307 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns an [[element]] that corresponds to the current target of the specified player's camera (i.e. what it is following). &lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&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;
element getCameraTarget ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose camera you wish to receive the target of.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&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;
element getCameraTarget ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
* Returns an [[element]] of the target if the function was successful, or ''false'' if bad arguments were specified&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
* Returns ''false'' if the camera is in Fixed mode and has no target.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example checks whether a player's camera's target is another player, and returns true or false accordingly.&lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server script&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;
function isTargetPlayer( thePlayer )&lt;br /&gt;
    local target = getCameraTarget ( thePlayer )&lt;br /&gt;
    if ( getElementType ( target ) == &amp;quot;player&amp;quot; ) then   -- If target is a player&lt;br /&gt;
        return true                                     -- Return true&lt;br /&gt;
    else&lt;br /&gt;
        return false                                    -- Otherwise, return false.&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;
==See Also==&lt;br /&gt;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerDamage&amp;diff=36303</id>
		<title>OnClientPlayerDamage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerDamage&amp;diff=36303"/>
		<updated>2013-06-02T00:14:08Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36278 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is triggered whenever a player is damaged.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element attacker, int weapon, int bodypart [, float loss ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''attacker''': A [[player]] [[element]] representing the attacker or [[vehicle]] [[element]] (when being run over or falling off a bike).&lt;br /&gt;
*'''weapon''': An integer representing the weapon ID the attacker used&lt;br /&gt;
*'''bodypart''': An integer representing the bodypart the player was damaged&lt;br /&gt;
{{BodyParts}}&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''loss''': A float representing the percentage of health the player lost.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that got damaged. (Streamed in players only)&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], then any damaging effects to the local player will cease.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example prevents any damage from the minigun.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function stopMinigunDamage ( attacker, weapon, bodypart )&lt;br /&gt;
	if ( weapon == 38 ) then --if the weapon used was the minigun&lt;br /&gt;
		cancelEvent() --cancel the event&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientPlayerDamage&amp;quot;, getLocalPlayer(), stopMinigunDamage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerDamage&amp;diff=36302</id>
		<title>OnClientPlayerDamage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerDamage&amp;diff=36302"/>
		<updated>2013-06-02T00:13:56Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36277 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is triggered whenever a player is damaged.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element attacker, int weapon, int bodypart [, float loss ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''attacker''': A [[player]] [[element]] representing the attacker or [[vehicle]] [[element]] (when being run over or falling off a bike).&lt;br /&gt;
*'''weapon''': An integer representing the weapon ID the attacker used&lt;br /&gt;
*'''bodypart''': An integer representing the bodypart the player was damaged&lt;br /&gt;
{{BodyParts}}&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''loss''': A float representing the percentage of health the player lost.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that got damaged. (Streamed in players only)&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], then any damaging effects to the local player will cease.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example prevents any damage from the minigun.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function stopMinigunDamage ( attacker, weapon, bodypart )&lt;br /&gt;
	if ( weapon == MOJRM-511 ) then --if the weapon used was the MOJRM-511&lt;br /&gt;
		cancelEvent() --cancel the event&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientPlayerDamage&amp;quot;, getLocalPlayer(), stopMinigunDamage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPickupHit&amp;diff=36301</id>
		<title>OnClientPickupHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPickupHit&amp;diff=36301"/>
		<updated>2013-06-02T00:13:35Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36273 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event triggers whenever a pickup is hit clientside.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player thePlayer, bool matchingDimension&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''thePlayer:''' the player that hit the pickup&lt;br /&gt;
*'''matchingDimension:''' ''true'' if thePlayer is in the same dimension as the pickup, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the pickup that was hit.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs a message whenever a player hits a pickup locally.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local function clientPickupHit(thePlayer, matchingDimension)&lt;br /&gt;
    outputChatBox(&amp;quot;* &amp;quot;..getPlayerName(thePlayer)..&amp;quot; hit a pickup!&amp;quot;, 255, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPickupHit&amp;quot;, root, clientPickupHit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client pickup events===&lt;br /&gt;
{{Client_pickup_events}}&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerConnect&amp;diff=36290</id>
		<title>OnPlayerConnect</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerConnect&amp;diff=36290"/>
		<updated>2013-06-02T00:07:45Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36268 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player attempts to connect to the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string playerNick, string playerIP, string playerUsername, string playerSerial, int playerVersionNumber, string playerVersionString&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''playerNick''': The player's current nickname.&lt;br /&gt;
*'''playerIP''': The player's current IP.&lt;br /&gt;
*'''playerUsername''': The player's community username.&lt;br /&gt;
*'''playerSerial''': The player's serial number.&lt;br /&gt;
*'''playerVersionNumber''': The player's MTA version in pure numerical form, e.g. ''''256'''' for 1.0, ''''257'''' for 1.0.1, etc.&lt;br /&gt;
*'''playerVersionString''': The player's MTA version in sortable string form. Same as the return value from [[getPlayerVersion]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the client's [[root element]].&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the player will be disconnected with an error message saying the reason specified in cancelEvent or &amp;quot;Disconnected: server refused the connection&amp;quot; if none was specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example cancels connection attempts of people who use the nick &amp;quot;Player&amp;quot; or outputs some data about the connecting player otherwise.&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--when a player connects&lt;br /&gt;
function playerConnect (playerNick, playerIP, playerUsername, playerSerial, playerVersionNumber)&lt;br /&gt;
    if playerNick == &amp;quot;Player&amp;quot; then --check if his nick is &amp;quot;Player&amp;quot;&lt;br /&gt;
        cancelEvent(true,&amp;quot;The nick \&amp;quot;Player\&amp;quot; is not allowed, please change it to something else. You can change your nick in Settings menu Multiplayer tab.&amp;quot;) --in that case refuse the connection&lt;br /&gt;
    else&lt;br /&gt;
        --output some data about the player&lt;br /&gt;
        outputChatBox (playerNick..&amp;quot; just connected to the server.&amp;quot;)&lt;br /&gt;
        outputChatBox (&amp;quot;IP: &amp;quot;..playerIP..&amp;quot; Username: &amp;quot;..playerUsername..&amp;quot; Serial: &amp;quot;..playerSerial)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--add the playerConnect function as a handler for onPlayerConnect&lt;br /&gt;
addEventHandler (&amp;quot;onPlayerConnect&amp;quot;, getRootElement(), playerConnect)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example cancels connection if player uses older MTA (older than 1.0.3)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onPlayerConnect&amp;quot;, getRootElement(),&lt;br /&gt;
    function ( _,_,_,_, clientVersion )&lt;br /&gt;
        if ( clientVersion &amp;lt; 259 ) then&lt;br /&gt;
            cancelEvent( true, &amp;quot;Update your MTA before you join this server!&amp;quot; );&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;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerSpawn&amp;diff=36280</id>
		<title>OnClientPlayerSpawn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerSpawn&amp;diff=36280"/>
		<updated>2013-06-01T23:59:51Z</updated>

		<summary type="html">&lt;p&gt;Szybki: Undo revision 36279 by MOJRM-511 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event is triggered when any player, including a remote player, spawns.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
team hisTeam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''hisTeam''': A team element representing the team the player spawned on.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that spawned.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This code will create an explosion for the local player when they spawn.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function explosionOnSpawn ( )&lt;br /&gt;
  -- get the spawned player's position&lt;br /&gt;
  local pX, pY, pZ = getElementPosition ( source )&lt;br /&gt;
  -- and create an explosion there&lt;br /&gt;
  createExplosion ( pX, pY, pZ, 6 )&lt;br /&gt;
end&lt;br /&gt;
-- add this function as a handler for any player that spawns&lt;br /&gt;
addEventHandler ( &amp;quot;onClientPlayerSpawn&amp;quot;, getLocalPlayer(), explosionOnSpawn )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Szybki</name></author>
	</entry>
</feed>