Template:AR/Client ped functions: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__
*[[AR/addPedClothes|addPedClothes]]
{{Server client function}}
*[[AR/canPedBeKnockedOffBike|canPedBeKnockedOffBike]]
Creates a Ped in the GTA world.
*[[AR/createPed|createPed]]
 
{{Deprecated items|3.0156|1.5.6|
==Example==
*[[AR/doesPedHaveJetPack|doesPedHaveJetPack]]
 
<section name="Server" class="server" show="true">
This example creates an ped when the resource starts:
<syntaxhighlight lang="lua">
function pedLoad ( name )
  createPed ( 120, 5540.6654, 1020.55122, 1240.545 )
end
addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad )
</syntaxhighlight>
</section>
 
<section name="Client" class="client" show="true">
This example creates a ped, and makes it damage proof:
<syntaxhighlight lang="lua">
thePed = createPed(120, 5540.6654, 1020.55122, 1240.545) -- Creates a ped
function cancelPedDamage()
cancelEvent() -- Cancels the onClientPedDamage event
end
addEventHandler("onClientPedDamage", thePed, cancelPedDamage) -- When thePed is damaged, cancelPedDamage is called
</syntaxhighlight>
</section>
 
==Issues==
{{Issues|
{{Issue|7970|Peds with weapons malfunction due to weird totalAmmo and ammoInClip values}}
{{Issue|7371|Network troubled players can ruin ped sync}}
{{Issue|6048|Ped weapon isn't synced on join}}
{{Issue|5113|setPedControlState doesn't work on the control "enter_exit"}}
{{Issue|6287|Sync distance of unoccupied vehicles and peds should match stream distance}}
{{Issue|8790|Using setElementHealth on a dead ped makes it invincible}}
{{Issue|5725|Ped fireing Projectiles doesn't work}}
{{Issue|4921|Improve ped synchronization}}
{{Issue|5840|ped position not synced to server after falling through the ground}}
{{Issue|6682|Server doesnt update ped position after warping it to vehicle}}
{{Issue|6506|Ped animation is only visible if it was set while player was in stream distance from source ped}}
{{Issue|4596|Serverside peds have their animations not applied for joining players}}
{{Issue|4504|Peds shooting incorrectly}}
{{Issue|4008|Can't use giveWeapon() directly after createPed()}}
}}
}}
*[[AR/getPedAmmoInClip|getPedAmmoInClip]]
*[[AR/getPedAnalogControlState|getPedAnalogControlState]]
*[[AR/getPedAnimation|getPedAnimation]]
*[[AR/getPedArmor|getPedArmor]]
*[[AR/getPedBonePosition|getPedBonePosition]]
*[[AR/getPedCameraRotation|getPedCameraRotation]]
*[[AR/getPedClothes|getPedClothes]]
*[[AR/getPedContactElement|getPedContactElement]]
*[[AR/getPedControlState|getPedControlState]]
{{New items|3.0157|1.5.6|
*[[AR/getPedFightingStyle|getPedFightingStyle]]
|16362}}
*[[AR/getPedMoveState|getPedMoveState]]
*[[AR/getPedOccupiedVehicle|getPedOccupiedVehicle]]
*[[AR/getPedOccupiedVehicleSeat|getPedOccupiedVehicleSeat]]
*[[AR/getPedOxygenLevel|getPedOxygenLevel]]
*[[AR/getPedSimplestTask|getPedSimplestTask]]
*[[AR/getPedStat|getPedStat]]
*[[AR/getPedTarget|getPedTarget]]
*[[AR/getPedTargetCollision|getPedTargetCollision]]
*[[AR/getPedTargetEnd|getPedTargetEnd]]
*[[AR/getPedTargetStart|getPedTargetStart]]
*[[AR/getPedTask|getPedTask]]
*[[AR/getPedTotalAmmo|getPedTotalAmmo]]
*[[AR/getPedVoice|getPedVoice]]
*[[AR/getPedWalkingStyle|getPedWalkingStyle]]
*[[AR/getPedWeapon|getPedWeapon]]
*[[AR/getPedWeaponMuzzlePosition|getPedWeaponMuzzlePosition]]
*[[AR/getPedWeaponSlot|getPedWeaponSlot]]
*[[AR/getValidPedModels|getValidPedModels]]
*[[AR/givePedWeapon|givePedWeapon]]
*[[AR/isPedChoking|isPedChoking]]
*[[AR/isPedDead|isPedDead]]
*[[AR/isPedDoingGangDriveby|isPedDoingGangDriveby]]
*[[AR/isPedDoingTask|isPedDoingTask]]
*[[AR/isPedDucked|isPedDucked]]
*[[AR/isPedHeadless|isPedHeadless]]
*[[AR/isPedInVehicle|isPedInVehicle]]
*[[AR/isPedOnFire|isPedOnFire]]
*[[AR/isPedOnGround|isPedOnGround]]
{{New items|3.0156|1.5.5|
*[[AR/isPedReloadingWeapon|isPedReloadingWeapon]]
|11856}}
*[[AR/isPedTargetingMarkerEnabled|isPedTargetingMarkerEnabled]]
{{New items|3.0156|1.5.5|
*[[AR/isPedWearingJetpack|isPedWearingJetpack]]
|13846}}
*[[AR/killPed|killPed]]
*[[AR/removePedClothes|removePedClothes]]
*[[AR/removePedFromVehicle|removePedFromVehicle]]
*[[AR/setAnalogControlState|setAnalogControlState]]
*[[AR/setPedAimTarget|setPedAimTarget]]
*[[AR/setPedAnalogControlState|setPedAnalogControlState]]
*[[AR/setPedAnimation|setPedAnimation]]
*[[AR/setPedAnimationProgress|setPedAnimationProgress]]
{{New items|3.0156|1.5.5|
*[[AR/setPedAnimationSpeed|setPedAnimationSpeed]]
|14219}}
{{New items|3.0160|1.5.7|
*[[AR/setPedArmor|setPedArmor]]
|19626}}
*[[AR/setPedCameraRotation|setPedCameraRotation]]
*[[AR/setPedCanBeKnockedOffBike|setPedCanBeKnockedOffBike]]
*[[AR/setPedControlState|setPedControlState]]
*[[AR/setPedDoingGangDriveby|setPedDoingGangDriveby]]
{{New items|3.0160|1.5.7|
*[[AR/setPedFightingStyle|setPedFightingStyle]]
|19626}}
*[[AR/setPedFootBloodEnabled|setPedFootBloodEnabled]]
*[[AR/isPedFootBloodEnabled|isPedFootBloodEnabled]]
*[[AR/setPedHeadless|setPedHeadless]]
*[[AR/setPedLookAt|setPedLookAt]]
*[[AR/setPedOnFire|setPedOnFire]]
*[[AR/setPedOxygenLevel|setPedOxygenLevel]]
*[[AR/setPedStat|setPedStat]]
*[[AR/setPedTargetingMarkerEnabled|setPedTargetingMarkerEnabled]]
*[[AR/setPedVoice|setPedVoice]]
*[[AR/setPedWalkingStyle|setPedWalkingStyle]]
*[[AR/setPedWeaponSlot|setPedWeaponSlot]]
*[[AR/warpPedIntoVehicle|warpPedIntoVehicle]]


 
<noinclude>[[Category:Functions templates]]</noinclude>
==See Also==
{{Ped functions}}
[[ru:createPed]]

Latest revision as of 17:00, 2 May 2020