HU/addPedClothes: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Shared function hu}} | {{Shared function hu}} | ||
{{Note| | {{Note|Ez a function egyedül csak a CJ skinnel működik (ID 0).}} | ||
This function is used to set the current clothes on a [[ped]]. | This function is used to set the current clothes on a [[ped]]. | ||
Line 11: | Line 11: | ||
===Kötelező paraméterek=== | ===Kötelező paraméterek=== | ||
*'''thePed''': | *'''thePed''': A [[ped]], akinek a ruháját meg akarjuk változtatni. | ||
*'''clothesTexture''': A string determining the clothes texture that will be added. See the [[CJ Clothes|clothes catalog]]. | *'''clothesTexture''': A string determining the clothes texture that will be added. See the [[CJ Clothes|clothes catalog]]. | ||
*'''clothesModel''': A string determining the clothes model that will be added. See the [[CJ Clothes|clothes catalog]]. | *'''clothesModel''': A string determining the clothes model that will be added. See the [[CJ Clothes|clothes catalog]]. | ||
Line 17: | Line 17: | ||
===Visszatérési érték=== | ===Visszatérési érték=== | ||
Visszatérési értéke ''true'', ha a ruhák sikeresen hozzá lettek adva a pedhez, egyébként ''false''. | |||
==Példa== | ==Példa== | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
Ez a példa egy 'moto' sisakot rak egy játékosra, amikor egy nrg-ra ül fel, majd eltávolítja, ha leszáll róla. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function onEnterVehicle ( theVehicle, seat, jacked ) | function onEnterVehicle ( theVehicle, seat, jacked ) | ||
Line 41: | Line 41: | ||
==Lásd még== | ==Lásd még== | ||
{{Ped functions}} | {{Ped functions}} | ||
==Fordította== | |||
* '''''[https://wiki.multitheftauto.com/wiki/User:Surge Surge]''''' | |||
[[en:AddPedClothes]] | [[en:AddPedClothes]] | ||
[[pl:AddPedClothes]] | [[pl:AddPedClothes]] |
Revision as of 21:37, 17 September 2018
This function is used to set the current clothes on a ped.
Szintaxis
bool addPedClothes ( ped thePed, string clothesTexture, string clothesModel, int clothesType )
OOP Syntax Help! I don't understand this!
- Method: ped:addClothes(...)
- Counterpart: getPedClothes
Kötelező paraméterek
- thePed: A ped, akinek a ruháját meg akarjuk változtatni.
- clothesTexture: A string determining the clothes texture that will be added. See the clothes catalog.
- clothesModel: A string determining the clothes model that will be added. See the clothes catalog.
- clothesType: A integer representing the clothes slot/type the clothes should be added to. See the clothes catalog.
Visszatérési érték
Visszatérési értéke true, ha a ruhák sikeresen hozzá lettek adva a pedhez, egyébként false.
Példa
Click to collapse [-]
ServerEz a példa egy 'moto' sisakot rak egy játékosra, amikor egy nrg-ra ül fel, majd eltávolítja, ha leszáll róla.
function onEnterVehicle ( theVehicle, seat, jacked ) if getElementModel ( theVehicle ) == 522 then -- if it's an nrg addPedClothes ( source, "moto", "moto", 16 ) -- add the helmet end end addEventHandler ( "onPlayerVehicleEnter", root, onEnterVehicle ) function onExitVehicle ( theVehicle, seat, jacked ) if getElementModel ( theVehicle ) == 522 then -- if it's an nrg removePedClothes ( source, 16 ) -- remove the helmet end end addEventHandler ( "onPlayerVehicleExit", root, onExitVehicle )
Lásd még
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle