https://wiki.multitheftauto.com/api.php?action=feedcontributions&user=Lars-marcel&feedformat=atomMulti Theft Auto: Wiki - User contributions [en]2024-03-29T08:40:21ZUser contributionsMediaWiki 1.39.3https://wiki.multitheftauto.com/index.php?title=DE/playSound3D&diff=36959DE/playSound3D2013-08-24T02:16:21Z<p>Lars-marcel: Misspellings removed</p>
<hr />
<div>__NOTOC__ <br />
{{DE/Client function}}<br />
Erstellt einen Sound und spielt ihn für den lokalen Spieler ab. [[DE/setElementPosition|setElementPosition]] kann benutzt werden, um den Sound zu positionieren.<br /><br />
<br /><br />
'''Beachte:''' Unterstützte Audio Formate sind MP3, WAV, OGG, RIFF, MOD, XM, IT und S3M.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua">element playSound3D ( string soundPfad, float x, float y, float z, [ bool wiederholend = false ] )</syntaxhighlight> <br />
<br />
===Benötigte Argumente=== <br />
*'''soundPfad:''' Der [[DE/filepath|Dateipfad]] wo sich der Sound befindet.<br />
*'''x:''' Eine Fließkommazahl, welche die X Koordinate in der Karte darstellt.<br />
*'''y:''' Eine Fließkommazahl, welche die Y Koordinate in der Karte darstellt.<br />
*'''z:''' Eine Fließkommazahl, welche die Z Koordinate in der Karte darstellt<br />
<br />
===Optimale Argumente=== <br />
*'''looped:''' Ein [[DE/bool|bool]], welcher angibt, ob sich der Sound wiederholen soll. Standard: '''true'''.<br />
<br />
===Rückgabe===<br />
Gibt ein Sound-Element zurück, wenn der Sound erfolgreich erstellt wurde, falls nicht ''false''.<br />
<br />
==Beispiel== <br />
Dieses Beispiel erstellt ein Sound, der sich am Pier 69 in San Fierro befindet, und wiederholt.<br />
<section name="Example" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function onResourceStart()<br />
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true) <br />
end<br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)<br />
</syntaxhighlight><br />
</section><br />
<br />
<br />
==Andere Funktionen==<br />
{{DE/Client_audio_functions}}<br />
<br />
[[en:playSoundFrontEnd]]<br />
<br />
==See Also==<br />
{{Client_audio_functions}}<br />
[[EN:playSound3D]]<br />
[[AR:playSound3D]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/GetElementID&diff=36958DE/GetElementID2013-08-24T02:11:18Z<p>Lars-marcel: Misspellings removed</p>
<hr />
<div>__NOTOC__ <br />
{{Server client function}}<br />
Diese Funktion gibt die [[ID]] eines [[Element]]'s aus. Das ist die ID des [[Element]]'s, doch nicht die [[Vehicle]]-ID, [[Weapon]]-ID etc.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
string getElementID ( element theElement ) <br />
</syntaxhighlight> <br />
<br />
===Erforderliche Argumente=== <br />
*'''theElement:''' Das [[Element]] von dem die ID ausgegeben werden soll.<br />
<br />
===Ausgabe===<br />
Die Funktion gibt einen ''string'' aus, welcher die ID des [[Element]]s enthält. Sie wird einen leeren ''string'' ausgeben, wenn das Element keine ID hat. Sie wird ''false'' ausgeben, wenn das [[Element]] ungültig ist.<br />
<br />
==Beispiel== <br />
Um die ID des folgenden [[Element]] ausgeben:<br />
<syntaxhighlight lang="xml"><flag id="northflag" posX="2365" posY="215" posZ="32" /></syntaxhighlight><br />
Sie können folgenden Code nutzen:<br />
<syntaxhighlight lang="lua"><br />
-- Bezieht sich auf das Element 'flag' im oberen XML-Code.<br />
idstring = getElementID ( flag ) -- Liest die ID des Elements aus<br />
outputChatBox ( "Die ID ist " .. idstring ) -- Ausgabe: Die ID ist: northflag<br />
</syntaxhighlight><br />
<br />
==Siehe auch==<br />
{{Element_functions}}<br />
[[en:GetElementID]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/GetElementPosition&diff=36957DE/GetElementPosition2013-08-24T02:03:51Z<p>Lars-marcel: Misspellings removed</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Diese Funktion ermöglicht es, die Position eines [[Element]]s abzurufen. Dies kann ein belibiges [[Element]] sein:<br />
* [[Element/Player|Players]]<br />
* [[Element/Vehicle|Vehicles]]<br />
* [[Element/Object|Objects]]<br />
* [[Element/Pickup|Pickups]]<br />
* [[Element/Marker|Markers]]<br />
* [[Element/Collision shape|Collision shapes]]<br />
* [[Element/Blip|Blips]]<br />
* [[Element/Radar area|Radar areas]]<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
float, float, float getElementPosition ( element theElement )<br />
</syntaxhighlight><br />
<br />
===Erforderliche Argumente===<br />
*'''theElement:''' Das [[Element]] von dem die Position ausgelesen werden soll.<br />
<br />
===Rückgabe===<br />
Gibt drei "''float''s" aus, welche die x, y und z Koordinaten des [[Element]]s enthalten.<br />
<br />
==Beispiel==<br />
Dieses Objekt attacht eine "samsite" an das Fahrzeug des [[Player]]'s.<br />
<syntaxhighlight lang="lua"><br />
-- erstellt einen Elegy<br />
myElegy = createVehicle ( 562, 1591.596680, -2495.323242, 18.098244 ) <br />
-- liest die Position des Fahrzeugs ( Elegy ) aus.<br />
local x,y,z = getElementPosition( myElegy )<br />
-- erstellt die "samsite"<br />
samsite = createObject ( 3267, x, y, z + 3 )<br />
-- attacht die "samsite" an den elegy;<br />
attachElementToElement ( samsite, myElegy, 0, 0, 0 )<br />
</syntaxhighlight><br />
<br />
==Siehe auch==<br />
{{Element functions}}<br />
[[en:GetElementPosition]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/playSound3D&diff=36894DE/playSound3D2013-08-10T15:33:39Z<p>Lars-marcel: </p>
<hr />
<div>__NOTOC__ <br />
{{DE/Client function}}<br />
Erstellt ein [[DE/sound|sound]] Element und spielt es für den lokalen Spieler ab. [[DE/setElementPosition|setElementPosition]] kann benutzt werden, um das [[DE/sound|sound]] Element zu verschieben.<br /><br />
<br /><br />
'''Beachte:''' Unterstützte Audio Formate sind MP3, WAV, OGG, RIFF, MOD, XM, IT und S3M.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua">element playSound3D ( string soundPfad, float x, float y, float z, [ bool wiederholend = false ] )</syntaxhighlight> <br />
<br />
===Benötigte Argumente=== <br />
*'''soundPfad:''' Der [[DE/filepath|Dateipfad]] wo sich der Sound befindet.<br />
*'''x:''' Eine Fließkommazahl, welche die X Koordinate in der Karte darstellt.<br />
*'''y:''' Eine Fließkommazahl, welche die Y Koordinate in der Karte darstellt.<br />
*'''z:''' Eine Fließkommazahl, welche die Z Koordinate in der Karte darstellt<br />
<br />
===Optimale Argumente=== <br />
*'''wiederholend:''' Ein [[DE/bool|bool]], welcher angibt, ob sich der Sound wiederholen soll. Standard: '''true'''.<br />
<br />
===Returns===<br />
Gibt ein [[DE/sound|sound]]-Element zurück, wenn der Sound erfolgreich erstellt wurde. ''false'' andernfalls.<br />
<br />
==Beispiel== <br />
Dieses Beispiel erstellt ein Sound, der sich am Pier 69 in San Fierro, wiederholt.<br />
<section name="Example" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function onResourceStart()<br />
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true) <br />
end<br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)<br />
</syntaxhighlight><br />
</section><br />
<br />
<br />
==Andere Funktionen==<br />
{{DE/Client_audio_functions}}<br />
<br />
[[en:playSoundFrontEnd]]<br />
<br />
==See Also==<br />
{{Client_audio_functions}}<br />
[[EN:playSound3D]]<br />
[[AR:playSound3D]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=AR/playSound3D&diff=36893AR/playSound3D2013-08-10T15:32:37Z<p>Lars-marcel: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
Creates a [[sound]] element in the GTA world and plays it immediately after creation for the local player. [[setElementPosition]] can be used to move the [[sound]] element around after it has been created.<br /><br />
<br /><br />
'''Note:''' The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua">element playSound3D ( string soundPath, float x, float y, float z, [ bool looped = false ] )</syntaxhighlight> <br />
<br />
===Required Arguments=== <br />
*'''soundPath:''' The [[filepath]] to the sound file you want to play. (Sound file has to be predefined in the [[meta.xml]] file with <file /> tag. And also can use url instead of [[filepath]] )<br />
*'''x:''' A floating point number representing the X coordinate on the map.<br />
*'''y:''' A floating point number representing the Y coordinate on the map.<br />
*'''z:''' A floating point number representing the Z coordinate on the map.<br />
<br />
===Optional Arguments=== <br />
{{OptionalArg}} <br />
*'''looped:''' A [[boolean]] representing whether the sound will be looped. To loop the sound, use ''true''.<br />
<br />
===Returns===<br />
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.<br />
<br />
==Example== <br />
This example creates a looping sound within a pizza shop. The pizza shop is in san fierro near pier 69<br />
<section name="Example" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function onResourceStart()<br />
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true) <br />
end<br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)<br />
</syntaxhighlight><br />
</section><br />
This example play internet radio in groove street.<br />
<section name="Example 2" class="client" show="true" ><br />
<syntaxhighlight lang="lua"><br />
addEventHandler( 'onClientResourceStart', resourceRoot,<br />
function( )<br />
local uSound = playSound3D( 'http://78.31.74.220:8000/BadRadio', 2498, -1659, 12 ) <br />
setSoundMaxDistance( uSound, 100 )<br />
end<br />
)<br />
</syntaxhighlight><br />
</section><br />
<br />
==أنظر أيضاً==<br />
{{AR/Audio_functions}}<br />
<br />
{{Client_audio_functions}}<br />
[[EN:playSound3D]]<br />
[[DE:playSound3D]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=PlaySound3D&diff=36892PlaySound3D2013-08-10T15:32:11Z<p>Lars-marcel: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
Creates a [[sound]] element in the GTA world and plays it immediately after creation for the local player. [[setElementPosition]] can be used to move the [[sound]] element around after it has been created. Remember to use [[setElementDimension]] after creating the sound to play it outside of dimension 0.<br /><br />
<br /><br />
'''Note:''' The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua">element playSound3D ( string soundPath, float x, float y, float z, [ bool looped = false ] )</syntaxhighlight> <br />
<br />
===Required Arguments=== <br />
*'''soundPath:''' The [[filepath]] to the sound file you want to play. (Sound file has to be predefined in the [[meta.xml]] file with <file /> tag. And also can use url instead of [[filepath]] )<br />
*'''x:''' A floating point number representing the X coordinate on the map.<br />
*'''y:''' A floating point number representing the Y coordinate on the map.<br />
*'''z:''' A floating point number representing the Z coordinate on the map.<br />
<br />
===Optional Arguments=== <br />
{{OptionalArg}} <br />
*'''looped:''' A [[boolean]] representing whether the sound will be looped. To loop the sound, use ''true''.<br />
<br />
===Returns===<br />
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.<br />
<br />
==Example== <br />
This example creates a looping sound within a pizza shop. The pizza shop is in san fierro near pier 69<br />
<section name="Example" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function onResourceStart()<br />
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true) <br />
end<br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)<br />
</syntaxhighlight><br />
</section><br />
This example play internet radio in groove street.<br />
<section name="Example 2" class="client" show="true" ><br />
<syntaxhighlight lang="lua"><br />
addEventHandler( 'onClientResourceStart', resourceRoot,<br />
function( )<br />
local uSound = playSound3D( 'http://78.31.74.220:8000/BadRadio', 2498, -1659, 12 ) <br />
setSoundMaxDistance( uSound, 100 )<br />
end<br />
)<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Client_audio_functions}}<br />
[[AR:playSound3D]]<br />
[[DE:playSound3D]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=AR/playSound&diff=36891AR/playSound2013-08-10T15:29:55Z<p>Lars-marcel: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
[[sound]] إنشاء ملف صوت .<br /><br />
<br /><br />
'''مـلاحـظـة:''' MP3, WAV, OGG, RIFF, MOD, XM, IT و S3M ''' --- صـيـغـة ملف الـصـوت تـقـبـل فـقـط'''<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua">element playSound ( string soundPath, [ bool looped = false ] )</syntaxhighlight> <br />
<br />
===العناصر المطلوبة=== <br />
*'''soundPath: هو ملف الصوت المراد تشغيله [[filepath]] / ( <file /> مع علامة [[meta.xml]] و يجب ان يكون ملف الصوت معرفا في )<br />
<br />
===Optional Arguments=== <br />
{{OptionalArg}} <br />
*'''looped:''' الحلقة غير متوفرة لتدفق الأصوات، فقط لملفات الصوت . true تمثل اذا كان سوف يحلق الصوت . لتكرار الصوت , استخدم [[boolean]] '''<br />
<br />
===Returns===<br />
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.<br />
<br />
==مثال== <br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function wasted (killer, weapon, bodypart) <br />
local sound = playSound("sounds/wasted.mp3") -- wasted.mp3 نشغل الصوت - sounds من مجلد اسمه <br />
setSoundVolume(sound, 0.5) -- 50% نجعل حجم الصوت<br />
end<br />
<br />
addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) -- نضع الايفنت الى هذه الوظيفه عند موت الاعب<br />
</syntaxhighlight><br />
</section><br />
<br />
==أنظر أيضاً==<br />
{{AR/Audio_functions}}<br />
<br />
==See Also==<br />
{{Client_audio_functions}}<br />
[[EN:playSound]]<br />
[[DE:playSound]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=AR/playSound&diff=36890AR/playSound2013-08-10T15:29:37Z<p>Lars-marcel: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
[[sound]] إنشاء ملف صوت .<br /><br />
<br /><br />
'''مـلاحـظـة:''' MP3, WAV, OGG, RIFF, MOD, XM, IT و S3M ''' --- صـيـغـة ملف الـصـوت تـقـبـل فـقـط'''<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua">element playSound ( string soundPath, [ bool looped = false ] )</syntaxhighlight> <br />
<br />
===العناصر المطلوبة=== <br />
*'''soundPath: هو ملف الصوت المراد تشغيله [[filepath]] / ( <file /> مع علامة [[meta.xml]] و يجب ان يكون ملف الصوت معرفا في )<br />
<br />
===Optional Arguments=== <br />
{{OptionalArg}} <br />
*'''looped:''' الحلقة غير متوفرة لتدفق الأصوات، فقط لملفات الصوت . true تمثل اذا كان سوف يحلق الصوت . لتكرار الصوت , استخدم [[boolean]] '''<br />
<br />
===Returns===<br />
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.<br />
<br />
==مثال== <br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
function wasted (killer, weapon, bodypart) <br />
local sound = playSound("sounds/wasted.mp3") -- wasted.mp3 نشغل الصوت - sounds من مجلد اسمه <br />
setSoundVolume(sound, 0.5) -- 50% نجعل حجم الصوت<br />
end<br />
<br />
addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) -- نضع الايفنت الى هذه الوظيفه عند موت الاعب<br />
</syntaxhighlight><br />
</section><br />
<br />
==أنظر أيضاً==<br />
{{AR/Audio_functions}}<br />
<br />
==See Also==<br />
{{Client_audio_functions}}<br />
[[playSound]]<br />
[[DE:playSound]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=PlaySound&diff=36889PlaySound2013-08-10T15:27:25Z<p>Lars-marcel: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
Creates a [[sound]] element and plays it immediately after creation for the local player.<br /><br />
<br /><br />
'''Note:''' The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT, S3M and PLS(e.g. Webstream).<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua">element playSound ( string soundPath, [ bool looped = false ] )</syntaxhighlight> <br />
<br />
===Required Arguments=== <br />
*'''soundPath:''' The [[filepath]] to the sound file you want to play. (Sound file has to be predefined in the [[meta.xml]] file with <file /> tag.)<br />
<br />
===Optional Arguments=== <br />
{{OptionalArg}} <br />
*'''looped:''' A [[boolean]] representing whether the sound will be looped. To loop the sound, use ''true''. Loop is not available for streaming sounds, only for sound files.<br />
<br />
===Returns===<br />
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.<br />
<br />
==Example==<br />
<syntaxhighlight lang="lua"><br />
function wasted (killer, weapon, bodypart) <br />
local sound = playSound("sounds/wasted.mp3") --Play wasted.mp3 from the sounds folder<br />
setSoundVolume(sound, 0.5) -- set the sound volume to 50%<br />
end<br />
<br />
addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) --add the event handler<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Client_audio_functions}}<br />
[[AR:playSound]]<br />
[[DE:playSound]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=User_talk:Lars-marcel&diff=32692User talk:Lars-marcel2012-08-24T12:42:00Z<p>Lars-marcel: Created page with "Ich bin ein Beispiel Text"</p>
<hr />
<div>Ich bin ein Beispiel Text</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=GetElementID&diff=32689GetElementID2012-08-24T12:23:47Z<p>Lars-marcel: </p>
<hr />
<div>__NOTOC__ <br />
{{Server client function}}<br />
This function gets the ID of an element. This is the "id" attribute of the element and is a string, NOT a number like a model ID, weapons ID or similar.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
string getElementID ( element theElement ) <br />
</syntaxhighlight> <br />
<br />
===Required Arguments=== <br />
*'''theElement:''' the element from which to retrieve the ID.<br />
<br />
===Returns===<br />
This returns a ''string'' containing the element ID. It will return an empty ''string'' if it has no ID. It will return ''false'' if the element is invalid.<br />
<br />
==Example== <br />
To get the ID of the following element:<br />
<syntaxhighlight lang="xml"><flag id="northflag" posX="2365" posY="215" posZ="32" /></syntaxhighlight><br />
You could use the following code:<br />
<syntaxhighlight lang="lua"><br />
-- assume flag refers to the flag element in the above XML code<br />
idstring = getElementID ( flag ) -- get the id of the flag element<br />
outputChatBox ( "The flag's ID is: " .. idstring ) -- output: The flag's ID is: northflag<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Element_functions}}<br />
[[de:GetElementID]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/GetElementID&diff=32688DE/GetElementID2012-08-24T12:23:29Z<p>Lars-marcel: Created page with "__NOTOC__ {{Server client function}} Diese Funktion gibt die ID eines Element's aus. Das ist die ID des Element's, doch nicht die Vehicle-ID, Weapon-ID etc. ==Syntax== <syntaxhighlight lang="lua">[..."</p>
<hr />
<div>__NOTOC__ <br />
{{Server client function}}<br />
Diese Funktion gibt die ID eines Element's aus. Das ist die ID des Element's, doch nicht die Vehicle-ID, Weapon-ID etc.<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
string getElementID ( element theElement ) <br />
</syntaxhighlight> <br />
<br />
===Erforderliche Argumente=== <br />
*'''theElement:''' Das Element von dem die ID ausgegeben werden soll.<br />
<br />
===Ausgabe===<br />
Die Funktion gibt einen ''string'' aus, welcher die ID des Elements enthält. Sie wuird einen leeren ''string'' ausgeben, wenn das Element keine ID hat. Sie wird ''false'' ausgeben, wenn das Element ungültig ist.<br />
<br />
==Beispiel== <br />
ID des folgenden Elemt ausgeben:<br />
<syntaxhighlight lang="xml"><flag id="northflag" posX="2365" posY="215" posZ="32" /></syntaxhighlight><br />
Sie können folgenden Code nutzen:<br />
<syntaxhighlight lang="lua"><br />
-- assume flag refers to the flag element in the above XML code<br />
idstring = getElementID ( flag ) -- liest die ID des Elements aus<br />
outputChatBox ( "Die ID ist " .. idstring ) -- ausgabe: Die ID ist: northflag<br />
</syntaxhighlight><br />
<br />
==Siehe auch==<br />
{{Element_functions}}<br />
[[en:GetElementID]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=GetElementPosition&diff=32687GetElementPosition2012-08-24T12:14:26Z<p>Lars-marcel: </p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
The getElementPosition function allows you to retrieve the position coordinates of an element. This can be any real world element, including:<br />
* [[Element/Player|Players]]<br />
* [[Element/Vehicle|Vehicles]]<br />
* [[Element/Object|Objects]]<br />
* [[Element/Pickup|Pickups]]<br />
* [[Element/Marker|Markers]]<br />
* [[Element/Collision shape|Collision shapes]]<br />
* [[Element/Blip|Blips]]<br />
* [[Element/Radar area|Radar areas]]<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
float, float, float getElementPosition ( element theElement )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
*'''theElement:''' The element which you'd like to retrieve the location of<br />
<br />
===Returns===<br />
Returns three ''float''s indicating the position of the element, ''x'', ''y'' and ''z'' respectively.<br />
<br />
==Example==<br />
This example attaches a samsite on the player's vehicle.<br />
<syntaxhighlight lang="lua"><br />
-- create the elegy;<br />
myElegy = createVehicle ( 562, 1591.596680, -2495.323242, 18.098244 ) <br />
-- get the vehicle's position;<br />
local x,y,z = getElementPosition( myElegy )<br />
-- create the samsite;<br />
samsite = createObject ( 3267, x, y, z + 3 )<br />
-- attach the samsite to the elegy;<br />
attachElementToElement ( samsite, myElegy, 0, 0, 0 )<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Element functions}}<br />
[[de:GetElementPosition]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/GetElementPosition&diff=32686DE/GetElementPosition2012-08-24T12:14:15Z<p>Lars-marcel: Created page with "{{Server client function}} __NOTOC__ Die getElementPosition Funktion ermöglicht es, die Position eines Elements abzurufen. Dies kann ein belibiges Element sein: * [[Element/Play..."</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Die getElementPosition Funktion ermöglicht es, die Position eines Elements abzurufen. Dies kann ein belibiges Element sein:<br />
* [[Element/Player|Players]]<br />
* [[Element/Vehicle|Vehicles]]<br />
* [[Element/Object|Objects]]<br />
* [[Element/Pickup|Pickups]]<br />
* [[Element/Marker|Markers]]<br />
* [[Element/Collision shape|Collision shapes]]<br />
* [[Element/Blip|Blips]]<br />
* [[Element/Radar area|Radar areas]]<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
float, float, float getElementPosition ( element theElement )<br />
</syntaxhighlight><br />
<br />
===Erforderliche Argumente===<br />
*'''theElement:''' Das Elemt von dem die Position ausgelesen werden soll.<br />
<br />
===Returns===<br />
Gibt drei "''float''s" aus, welche die x, y und z Koordinaten des Elements enthalten.<br />
<br />
==Beispiel==<br />
Dieses Objekt attacht eine "samsite" an das Fahrzeug des Player's.<br />
<syntaxhighlight lang="lua"><br />
-- erstellt einen Elegy<br />
myElegy = createVehicle ( 562, 1591.596680, -2495.323242, 18.098244 ) <br />
-- liest die Position des Fahrzeugs ( Elegy ) aus.<br />
local x,y,z = getElementPosition( myElegy )<br />
-- erstellt die "samsite"<br />
samsite = createObject ( 3267, x, y, z + 3 )<br />
-- attacht die "samsite" an den elegy;<br />
attachElementToElement ( samsite, myElegy, 0, 0, 0 )<br />
</syntaxhighlight><br />
<br />
==Siehe auch==<br />
{{Element functions}}<br />
[[en:GetElementPosition]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/getPlayerIP&diff=32685DE/getPlayerIP2012-08-24T12:06:02Z<p>Lars-marcel: </p>
<hr />
<div>{{Server function}}<br />
__NOTOC__<br />
Diese Funktion gibt einen [[string]] aus, der die IP-Adresse des [[player]]'s enthält.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getPlayerIP ( player thePlayer )<br />
</syntaxhighlight><br />
<br />
===Erfordrliche Argumente===<br />
* '''thePlayer:''' Der [[player]] von dem die IP-Adresse ausgegeben werden soll.<br />
<br />
===Ausgabe===<br />
Gibt einen [[string]] mit der IP-Adresse des [[player]]'s zurück.<br />
<br />
==Beispiel==<br />
Dieses Beispiel gibt die IP-Adresse des player's im Chat aus.<br />
<syntaxhighlight lang="lua"><br />
function printIp ( thePlayer )<br />
outputChatBox ( "IP: " .. getPlayerIP ( thePlayer ), thePlayer )<br />
end<br />
addCommandHandler ( "ip", printIp )<br />
</syntaxhighlight><br />
<br />
==Siehe auch==<br />
{{Player functions}}<br />
[[en:GetPlayerIP]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/getPlayerIP&diff=32684DE/getPlayerIP2012-08-24T12:05:52Z<p>Lars-marcel: </p>
<hr />
<div>{{Server function}}<br />
__NOTOC__<br />
Diese Funktion gibt einen [[string]] aus, der die IP-Adresse des [[player]]'s enthält.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getPlayerIP ( player thePlayer )<br />
</syntaxhighlight><br />
<br />
===Erfordrliche Argumente===<br />
* '''thePlayer:''' Der [[player]] von dem die IP-Adresse ausgegeben werden soll.<br />
<br />
===Ausgabe===<br />
Gibt einen [[string]] mit der IP-Adresse des [[player]]'s zurück.<br />
<br />
==Beispiel==<br />
Dieses Beispiel gibt die IP-Adresse des player's im Chat aus.<br />
<syntaxhighlight lang="lua"><br />
function printIp ( thePlayer )<br />
outputChatBox ( "IP: " .. getPlayerIP ( thePlayer ), thePlayer )<br />
end<br />
addCommandHandler ( "ip", printIp )<br />
</syntaxhighlight><br />
<br />
==Siehe Auch==<br />
{{Player functions}}<br />
[[en:GetPlayerIP]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/GetVehiclesOfType&diff=32683DE/GetVehiclesOfType2012-08-24T12:04:06Z<p>Lars-marcel: </p>
<hr />
<div>{{Server function}}<br />
__NOTOC__<br />
Diese Funktion sucht alle Fahrzuge mit einer Vehicle-ID auf der Map.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua">table getVehiclesOfType ( int model )</syntaxhighlight><br />
<br />
===Erforderliche Argumente===<br />
*'''model''': Die Vehicle-ID des Fahrzeugs, siehe [[Vehicle_IDs]].<br />
<br />
===Ausgabe===<br />
Gibt eine Liste mit den gefundenen Fahrzeugen der angegebenen ID aus.<br />
<br />
==Beispiel==<br />
Dieses Beispiel findet alle "Landstalkers" auf der Map und bewegt sie 5 einheiten nach Links.<br />
<br />
<syntaxhighlight lang="lua"><br />
-- Alle Fahrzeuge mit der ID 400 finden (landstalker)<br />
vehicles = getVehiclesOfType ( 400 )<br />
-- Durschsuchen der Fahrzeugliste<br />
for vehicleKey, vehicleValue in ipairs ( vehicles ) do<br />
-- Liest die Postion des Fahrzeugs aus<br />
x, y, z = getElementPosition ( vehicleValue )<br />
-- Bewegt dass Fahrzeug 5 einheiten nach Links<br />
setElementPosition ( vehicleValue, x - 5, y, z )<br />
end<br />
</syntaxhighlight><br />
<br />
==Siehe Auch==<br />
{{Vehicle functions}}<br />
[[EN:GetVehiclesOfType]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/GetVehiclesOfType&diff=32682DE/GetVehiclesOfType2012-08-24T12:02:53Z<p>Lars-marcel: Created page with "{{Server function}} __NOTOC__ Diese Funktion scannt alle Fahrzuge mit einer vorgegebenen Vehicle-ID, und gibt die anzahl aller Fahrzeuge auf der Map mit der Vehicle-ID aus. ==Sy..."</p>
<hr />
<div>{{Server function}}<br />
__NOTOC__<br />
Diese Funktion scannt alle Fahrzuge mit einer vorgegebenen Vehicle-ID, und gibt die anzahl aller Fahrzeuge auf der Map mit der Vehicle-ID aus.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua">table getVehiclesOfType ( int model )</syntaxhighlight><br />
<br />
===Erforderliche Argumente===<br />
*'''model''': Die Vehicle-ID des Fahrzeugs, siehe [[Vehicle_IDs]].<br />
<br />
===Ausgabe===<br />
Gibt eine Liste mit den gefundenen Fahrzeugen der angegebenen ID aus.<br />
<br />
==Beispiel==<br />
Dieses Beispiel findet alle "Landstalkers" auf der Map und bewegt sie 5 einheiten nach Links.<br />
<br />
<syntaxhighlight lang="lua"><br />
-- Alle Fahrzeuge mit der ID 400 finden (landstalker)<br />
vehicles = getVehiclesOfType ( 400 )<br />
-- Durschsuchen der Fahrzeugliste<br />
for vehicleKey, vehicleValue in ipairs ( vehicles ) do<br />
-- Liest die Postion des Fahrzeugs aus<br />
x, y, z = getElementPosition ( vehicleValue )<br />
-- Bewegt dass Fahrzeug 5 einheiten nach Links<br />
setElementPosition ( vehicleValue, x - 5, y, z )<br />
end<br />
</syntaxhighlight><br />
<br />
==Siehe Auch==<br />
{{Vehicle functions}}<br />
[[EN:GetVehiclesOfType]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=GetVehiclesOfType&diff=32681GetVehiclesOfType2012-08-24T11:53:55Z<p>Lars-marcel: </p>
<hr />
<div>{{Server function}}<br />
__NOTOC__<br />
This function scans through all the current vehicles and returns the ones matching the given model.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua">table getVehiclesOfType ( int model )</syntaxhighlight><br />
<br />
===Required Arguments===<br />
*'''model''': The model of vehicles you want.<br />
<br />
===Returns===<br />
Returns a table of existing vehicles matching the specified model.<br />
<br />
==Example==<br />
This example finds all landstalkers on the map and moves them 5 units to the left.<br />
<syntaxhighlight lang="lua"><br />
-- Find all the vehicles with the model 400 (landstalker)<br />
vehicles = getVehiclesOfType ( 400 )<br />
-- Loop through the vehicle list<br />
for vehicleKey, vehicleValue in ipairs ( vehicles ) do<br />
-- Get the vehicle's position<br />
x, y, z = getElementPosition ( vehicleValue )<br />
-- Move the vehicle to the left<br />
setElementPosition ( vehicleValue, x - 5, y, z )<br />
end<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Vehicle functions}}<br />
{{Server function}}<br />
__NOTOC__<br />
This function scans through all the current vehicles and returns the ones matching the given model.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua">table getVehiclesOfType ( int model )</syntaxhighlight><br />
<br />
===Required Arguments===<br />
*'''model''': The model of vehicles you want.<br />
<br />
===Returns===<br />
Returns a table of existing vehicles matching the specified model.<br />
<br />
==Example==<br />
This example finds all landstalkers on the map and moves them 5 units to the left.<br />
<syntaxhighlight lang="lua"><br />
-- Find all the vehicles with the model 400 (landstalker)<br />
vehicles = getVehiclesOfType ( 400 )<br />
-- Loop through the vehicle list<br />
for vehicleKey, vehicleValue in ipairs ( vehicles ) do<br />
-- Get the vehicle's position<br />
x, y, z = getElementPosition ( vehicleValue )<br />
-- Move the vehicle to the left<br />
setElementPosition ( vehicleValue, x - 5, y, z )<br />
end<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Vehicle functions}}<br />
{{Server function}}<br />
__NOTOC__<br />
This function scans through all the current vehicles and returns the ones matching the given model.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua">table getVehiclesOfType ( int model )</syntaxhighlight><br />
<br />
===Required Arguments===<br />
*'''model''': The model of vehicles you want.<br />
<br />
===Returns===<br />
Returns a table of existing vehicles matching the specified model.<br />
<br />
==Example==<br />
This example finds all landstalkers on the map and moves them 5 units to the left.<br />
<syntaxhighlight lang="lua"><br />
-- Find all the vehicles with the model 400 (landstalker)<br />
vehicles = getVehiclesOfType ( 400 )<br />
-- Loop through the vehicle list<br />
for vehicleKey, vehicleValue in ipairs ( vehicles ) do<br />
-- Get the vehicle's position<br />
x, y, z = getElementPosition ( vehicleValue )<br />
-- Move the vehicle to the left<br />
setElementPosition ( vehicleValue, x - 5, y, z )<br />
end<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Vehicle functions}}<br />
[[de:GetVehiclesOfType]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=GetPlayerIP&diff=32680GetPlayerIP2012-08-24T11:52:39Z<p>Lars-marcel: </p>
<hr />
<div>{{Server function}}<br />
__NOTOC__<br />
This function returns a [[string]] containing the IP address of the [[player]].<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getPlayerIP ( player thePlayer )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''thePlayer:''' The [[player]] element you want to get the IP of.<br />
<br />
===Returns===<br />
Returns a [[string]] containing the requested players's IP, or ''false'' if the player passed to the function is invalid.<br />
<br />
==Example==<br />
This example prints a player's IP to the chat.<br />
<syntaxhighlight lang="lua"><br />
function printIp ( thePlayer )<br />
outputChatBox ( "IP: " .. getPlayerIP ( thePlayer ), thePlayer )<br />
end<br />
addCommandHandler ( "ip", printIp )<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Player functions}}<br />
[[de:GetPlayerIP]]</div>Lars-marcelhttps://wiki.multitheftauto.com/index.php?title=DE/getPlayerIP&diff=32679DE/getPlayerIP2012-08-24T11:51:53Z<p>Lars-marcel: Created page with "{{Server function}} __NOTOC__ Diese Funktion gibt einen string aus, der die IP-Adresse des player's enthält. ==Syntax== <syntaxhighlight lang="lua"> string getPlayerIP ( player thePla..."</p>
<hr />
<div>{{Server function}}<br />
__NOTOC__<br />
Diese Funktion gibt einen [[string]] aus, der die IP-Adresse des [[player]]'s enthält.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
string getPlayerIP ( player thePlayer )<br />
</syntaxhighlight><br />
<br />
===Erfordrliche Argumente===<br />
* '''thePlayer:''' Der [[player]] von dem die IP-Adresse ausgegeben werden soll.<br />
<br />
===Ausgabe===<br />
Gibt einen [[string]] mit der IP-Adresse des [[player]]'s zurück.<br />
<br />
==Beispiel==<br />
Dieses Beispiel gibt die IP-Adresse des player's im Chat aus.<br />
<syntaxhighlight lang="lua"><br />
function printIp ( thePlayer )<br />
outputChatBox ( "IP: " .. getPlayerIP ( thePlayer ), thePlayer )<br />
end<br />
addCommandHandler ( "ip", printIp )<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Player functions}}<br />
[[en:GetPlayerIP]]</div>Lars-marcel