RO/addPedClothes
		
		
		
		
		
		Jump to navigation
		Jump to search
		
		
	
| Observație: Această funcție poate fi utilizată doar pe un ped care folosește skin de CJ (ID 0). | 
Această funcție este utilizată pentru a seta îmbrăcămintea curentă a unui ped.
Sintaxă
bool addPedClothes(ped thePed, string clothesTexture, string clothesModel, int clothesType)
OOP Syntax Help! I don't understand this!
- Method: ped:addClothes(...)
 - Counterpart: getPedClothes
 
Argumente Necesare
- thePed: Elementul ped a cărui îmbrăcăminte doriți să o schimbați.
 - clothesTexture: Un string determinând textura obiectului vestimentar ce va fi adăugat. Vizualizați catalogul vestimentar.
 - clothesModel: Un string determinând modelul ce va fi adăugat. Vizualizați catalogul vestimentar.
 - clothesType: Un integer reprezentând poziția/tipul îmbrăcămintei ce trebuie adăugată. Vizualizați catalogul vestimentar.
 
Redare
Această funcție redă true dacă îmbrăcămintea a fost adăugată cu succes. În caz contrar, false.
Exemplu
Click to collapse [-]
ServerAcest exemplu adăuga o cască de motociclist unui jucător atunci când acesta se urcă pe un NRG-500 și o înlătură în momentul în care acesta se coboară de pe motor.
function onEnterVehicle(theVehicle, seat, jacked)
    if (getElementModel(theVehicle) == 522) then -- verificăm dacă este un NRG-500
        addPedClothes(source, "moto", "moto", 16) -- adăugăm casca de motociclist
    end
end
addEventHandler("onPlayerVehicleEnter", root, onEnterVehicle)
function onExitVehicle(theVehicle, seat, jacked)
    if (getElementModel(theVehicle) == 522) then -- verificăm dacă este un NRG-500
        removePedClothes(source, 16) -- înlăturăm casca de motociclist
    end
end
addEventHandler("onPlayerVehicleExit", root, onExitVehicle)
Vizualizați de asemenea
- RO/addPedClothes
 - RO/createPed
 - RO/getPedAmmoInClip
 - RO/getPedArmor
 - RO/getPedClothes
 - RO/getPedContactElement
 - RO/getPedFightingStyle
 - RO/getPedGravity
 - RO/getPedOccupiedVehicle
 - RO/getPedOccupiedVehicleSeat
 - RO/getPedStat
 - RO/getPedTarget
 - RO/getPedTotalAmmo
 - RO/getPedWalkingStyle
 - RO/getPedWeapon
 - RO/getPedWeaponSlot
 - RO/getValidPedModels
 - RO/isPedChoking
 - RO/isPedDead
 - RO/isPedDoingGangDriveby
 - RO/isPedDucked
 - RO/isPedHeadless
 - RO/isPedInVehicle
 - RO/isPedOnFire
 - RO/isPedOnGround
 
- RO/isPedWearingJetpack
 - RO/killPed
 - RO/reloadPedWeapon
 - RO/removePedClothes
 - RO/removePedFromVehicle
 - RO/setPedAnimation
 - RO/setPedAnimationProgress
 
