HU/getPedClothes: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Server client function}}
{{Shared function hu}}
__NOTOC__
__NOTOC__
This function is used to get the current clothes texture and model of a certain type on a [[ped]].
Ez a function arra szolgál, hogy a [[ped|peden]] lévő ruhatípus textúráját és modeljét megkapjuk.


==Syntax==
==Szintaxis==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
string, string getPedClothes ( ped thePed, int clothesType )
string, string getPedClothes ( ped thePed, int clothesType )
Line 9: Line 9:
{{OOP||[[ped]]:getClothes||addPedClothes}}
{{OOP||[[ped]]:getClothes||addPedClothes}}


===Required Arguments===
===Kötelező paraméterek===
*'''thePed:''' A [[ped]], akinek a ruháját szeretné megkapni.
*'''thePed:''' A [[ped]], akinek a ruháját szeretné megkapni.
*'''clothesType:''' A ruhák típusa, melyet szeretne megkapni.
*'''clothesType:''' A ruhák típusa, melyet szeretne megkapni.
{{Clothes Textures}}
{{Clothes Textures}}


===Returns===
===Visszatérési érték===
This function returns 2 [[string|strings]], the clothes texture and model. The first return value will be ''false'' if this player's clothes type is empty or an invalid player was specified.
Ez a function visszaad 2 [[string|strings]] értéket, a ruhák textúráját és a modelt. Az első visszatérő érték ''false'' lesz, ha a játékos ruhájának a típusa üres, vagy, ha egy érvénytelen játékos lett megadva.


==Example==
==Példa==
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
This example prints the model and texture of the current clothing on the player who enters the "clothes" command. For example: "clothes 3" for the shoes.
Ez a példa kiírja a játékoson lévő ruházat textúráját és modeljét a "clothes" parancs segítségével. Például: "clothes 3" a cipőknek.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function getClothes ( source, key, clothesType )
function getClothes ( source, key, clothesType )
Line 34: Line 34:
</section>
</section>


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


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

Latest revision as of 18:44, 9 October 2018

Ez a function arra szolgál, hogy a peden lévő ruhatípus textúráját és modeljét megkapjuk.

Szintaxis

string, string getPedClothes ( ped thePed, int clothesType )

OOP Syntax Help! I don't understand this!

Method: ped:getClothes(...)
Counterpart: addPedClothes


Kötelező paraméterek

  • thePed: A ped, akinek a ruháját szeretné megkapni.
  • clothesType: A ruhák típusa, melyet szeretne megkapni.
Clothing Types
  • 0: SHIRT
  • 1: HEAD
  • 2: TROUSERS
  • 3: SHOES
  • 4: TATTOOS_LEFT_UPPER_ARM
  • 5: TATTOOS_LEFT_LOWER_ARM
  • 6: TATTOOS_RIGHT_UPPER_ARM
  • 7: TATTOOS_RIGHT_LOWER_ARM
  • 8: TATTOOS_BACK
  • 9: TATTOOS_LEFT_CHEST
  • 10: TATTOOS_RIGHT_CHEST
  • 11: TATTOOS_STOMACH
  • 12: TATTOOS_LOWER_BACK
  • 13: NECKLACE
  • 14: WATCH
  • 15: GLASSES
  • 16: HAT
  • 17: EXTRA

Visszatérési érték

Ez a function visszaad 2 strings értéket, a ruhák textúráját és a modelt. Az első visszatérő érték false lesz, ha a játékos ruhájának a típusa üres, vagy, ha egy érvénytelen játékos lett megadva.

Példa

Click to collapse [-]
Server

Ez a példa kiírja a játékoson lévő ruházat textúráját és modeljét a "clothes" parancs segítségével. Például: "clothes 3" a cipőknek.

function getClothes ( source, key, clothesType )
    local texture, model = getPedClothes ( source, clothesType )
    if ( texture and model ) then
        outputChatBox ( getPlayerName(source) .. " is wearing " .. texture .. " " .. model ..
                        " on his " .. getClothesTypeName(clothesType), source )
    else
        outputChatBox ( "Invalid input.", source )
    end
end
addCommandHandler ( "clothes", getClothes )

Lásd még

Fordította