HU/getPedArmor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Shared function hu}}
This function returns the current armor of the specified [[ped]].
Ez a function visszaadja egy [[ped]] jelenlegi páncélját.


==Syntax==
==Szintaxis==
<syntaxhighlight lang="lua">float getPedArmor ( ped thePed )</syntaxhighlight>
<syntaxhighlight lang="lua">float getPedArmor ( ped thePed )</syntaxhighlight>
{{OOP||[[ped]]:getArmor|armor|setPedArmor}}
{{OOP||[[ped]]:getArmor|armor|setPedArmor}}


===Required Arguments===
===Kötelező paraméterek===
*'''thePed:''' The [[ped]] whose armor you want to check
*'''thePed:''' A [[ped]], akinek a páncélját ellenőrizni szeretné


===Returns===
===Visszatérési érték===
A ''float'' with the armor, ''false'' if an invalid ped was given.
Egy ''float'' a páncéllal, ''false'', ha érvénytelen ped volt megadva.


==Example==
==Példa==
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
This example defines a "showarmor" console command that shows the player that executes it how much armor he has.
Ezzel a példával megkaphatjuk, hogy mennyi páncélunk van, a "showarmor" parancs segétségével.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function showArmor ( )
function showArmor ( )
Line 26: Line 26:
</section>
</section>


==See Also==
==Lásd még==
{{Ped functions hu}}
{{Ped functions hu}}


[[en:getPedArmor]]
[[en:getPedArmor]]
==Fordította==
* '''''[https://wiki.multitheftauto.com/wiki/User:Surge Surge]'''''

Latest revision as of 17:37, 29 September 2018

Ez a function visszaadja egy ped jelenlegi páncélját.

Szintaxis

float getPedArmor ( ped thePed )

OOP Syntax Help! I don't understand this!

Method: ped:getArmor(...)
Variable: .armor
Counterpart: setPedArmor


Kötelező paraméterek

  • thePed: A ped, akinek a páncélját ellenőrizni szeretné

Visszatérési érték

Egy float a páncéllal, false, ha érvénytelen ped volt megadva.

Példa

Click to collapse [-]
Client

Ezzel a példával megkaphatjuk, hogy mennyi páncélunk van, a "showarmor" parancs segétségével.

function showArmor ( )
	local me = getLocalPlayer ( )
	local armor = getPedArmor ( me )
	outputChatBox( "Your armor: " .. armor )
end
addCommandHandler ( "showarmor", showArmor )

Lásd még

Fordította