Template:AR/Client ped functions
Jump to navigation
Jump to search
Creates a Ped in the GTA world.
Example
Click to collapse [-]
ServerThis example creates an ped when the resource starts:
function pedLoad ( name ) createPed ( 120, 5540.6654, 1020.55122, 1240.545 ) end addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad )
Click to collapse [-]
ClientThis example creates a ped, and makes it damage proof:
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
Issues
| Issue ID | Description |
|---|---|
| #7970 | Peds with weapons malfunction due to weird totalAmmo and ammoInClip values |
| #7371 | Network troubled players can ruin ped sync |
| #6048 | Ped weapon isn't synced on join |
| #5113 | setPedControlState doesn't work on the control "enter_exit" |
| #6287 | Sync distance of unoccupied vehicles and peds should match stream distance |
| #8790 | Using setElementHealth on a dead ped makes it invincible |
| #5725 | Ped fireing Projectiles doesn't work |
| #4921 | Improve ped synchronization |
| #5840 | ped position not synced to server after falling through the ground |
| #6682 | Server doesnt update ped position after warping it to vehicle |
| #6506 | Ped animation is only visible if it was set while player was in stream distance from source ped |
| #4596 | Serverside peds have their animations not applied for joining players |
| #4504 | Peds shooting incorrectly |
| #4008 | Can't use giveWeapon() directly after createPed() |
See Also
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnGround
- isPedReloadingWeapon
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle