SetPedSkin: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Added example and added to Deprecated category.) |
||
Line 2: | Line 2: | ||
{{Deprecated}} | {{Deprecated}} | ||
{{Server client function}} | {{Server client function}} | ||
{{Deprecated}} | |||
This function changes the skin of a ped. | This function changes the skin of a ped. | ||
Line 14: | Line 15: | ||
==Example== | ==Example== | ||
<section show="true" name="Server" class="server"> | |||
This example sets a players skin to the cop skin when they spawn. | |||
<syntaxhighlight lang="lua"> | |||
function setCopSkin () | |||
setPedSkin ( source, 280 ) | |||
outputChatBox ( "You are now a cop.", source, 255, 0, 0 ) | |||
end | |||
addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin ) | |||
</syntaxhighlight> | |||
</section> | |||
==See Also== | ==See Also== | ||
{{Client_ped_functions}} | {{Client_ped_functions}} | ||
Revision as of 20:57, 23 February 2010
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does. | |
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does. | |
This function changes the skin of a ped.
Syntax
bool setPedSkin ( ped thePed, int skinID )
Required Arguments
- thePed: The ped whose model will be changed.
- skinID: A GTASA player model (skin) ID. See Character Skins.
Example
Click to collapse [-]
ServerThis example sets a players skin to the cop skin when they spawn.
function setCopSkin () setPedSkin ( source, 280 ) outputChatBox ( "You are now a cop.", source, 255, 0, 0 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin )
See Also
- canPedBeKnockedOffBike
- getPedAnalogControlState
- getPedAnimation
- getPedBonePosition
- getPedCameraRotation
- getPedControlState
- getPedMoveState
- getPedOxygenLevel
- getPedSimplestTask
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedVoice
- getPedWeaponMuzzlePosition
- givePedWeapon
- isPedBleeding
- isPedDoingTask
- isPedReloadingWeapon
- isPedTargetingMarkerEnabled
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedBleeding
- setPedCameraRotation
- setPedCanBeKnockedOffBike
- setPedControlState
- setPedEnterVehicle
- setPedExitVehicle
- IsPedFootBloodEnabled
- setPedFootBloodEnabled
- setPedLookAt
- setPedOxygenLevel
- setPedTargetingMarkerEnabled
- setPedVoice
- Shared
- 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