HU/getPedClothes

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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