HU/getPedContactElement: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function detects the element a ped is standing on. This can be a vehicle or an object. ==Syntax== <syntaxhighlight lang="lua"> elem...") |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Shared function hu}} | ||
Ez a function felismeri azt az elemet, amin egy ped áll. Ez lehet egy jármű, vagy egy objekt. | |||
== | ==Szintaxis== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
element getPedContactElement ( ped thePed ) | element getPedContactElement ( ped thePed ) | ||
Line 9: | Line 9: | ||
{{OOP||[[ped]]:getContactElement|contactElement}} | {{OOP||[[ped]]:getContactElement|contactElement}} | ||
=== | ===Kötelező argumentumok=== | ||
*'''thePed:''' The [[ped]] of which you want to get the [[element]] he is standing on. | *'''thePed:''' The [[ped]] of which you want to get the [[element]] he is standing on. | ||
=== | ===Visszatérési érték=== | ||
Returns an [[object]] or a [[vehicle]] if the ped is standing on one, ''false'' if he is touching none or an invalid element was passed. | Returns an [[object]] or a [[vehicle]] if the ped is standing on one, ''false'' if he is touching none or an invalid element was passed. | ||
== | ==Példa== | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
This clientside function outputs the name of the vehicle the specified player is standing on, or a message saying he isn't on one. | This clientside function outputs the name of the vehicle the specified player is standing on, or a message saying he isn't on one. | ||
Line 31: | Line 31: | ||
</section> | </section> | ||
== | ==Lásd még== | ||
{{Ped functions}} | {{Ped functions hu}} | ||
[[en:getPedContactElement]] | [[en:getPedContactElement]] | ||
==Fordította== | |||
* '''''[https://wiki.multitheftauto.com/wiki/User:Surge Surge]''''' |
Revision as of 12:33, 7 October 2018
Ez a function felismeri azt az elemet, amin egy ped áll. Ez lehet egy jármű, vagy egy objekt.
Szintaxis
element getPedContactElement ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:getContactElement(...)
- Variable: .contactElement
Kötelező argumentumok
Visszatérési érték
Returns an object or a vehicle if the ped is standing on one, false if he is touching none or an invalid element was passed.
Példa
Click to collapse [-]
ClientThis clientside function outputs the name of the vehicle the specified player is standing on, or a message saying he isn't on one.
function outputContactVehicleMessage ( thePlayer ) local elementStandingOn = getPedContactElement ( thePlayer ) if elementStandingOn and getElementType ( elementStandingOn ) == "vehicle" then local vehicleName = getVehicleName ( elementStandingOn ) outputChatBox( "You're standing on a " .. vehicleName .. "." ) else outputChatBox( "You're not standing on any vehicle." ) end end
Lásd még
- HU/addPedClothes
- HU/createPed
- HU/getPedAmmoInClip
- HU/getPedArmor
- HU/getPedClothes
- HU/getPedContactElement
- HU/getPedFightingStyle
- HU/getPedGravity
- HU/getPedOccupiedVehicle
- HU/getPedOccupiedVehicleSeat
- HU/getPedStat
- HU/getPedTarget
- HU/getPedTotalAmmo
- HU/getPedWalkingStyle
- HU/getPedWeapon
- HU/getPedWeaponSlot
- HU/getValidPedModels
- HU/isPedChoking
- HU/isPedDead
- HU/isPedDoingGangDriveby
- HU/isPedDucked
- HU/isPedFrozen
- HU/isPedHeadless
- HU/isPedInVehicle
- HU/isPedOnFire
- HU/isPedOnGround
- HU/isPedWearingJetpack
- HU/killPed
- HU/reloadPedWeapon
- HU/removePedClothes
- HU/removePedFromVehicle
- HU/setPedAnimation
- HU/setPedAnimationProgress
- HU/setPedAnimationSpeed
- HU/setPedArmor
- HU/setPedChoking
- HU/setPedDoingGangDriveby
- HU/setPedFightingStyle
- HU/setPedGravity
- HU/setPedHeadless
- HU/setPedOnFire
- HU/setPedStat
- HU/setPedWalkingStyle
- HU/setPedWeaponSlot
- HU/setPedWearingJetpack
- HU/warpPedIntoVehicle