GetPedTargetStart
From Multi Theft Auto: Wiki
This function allows retrieval of the position a ped's target range begins, when he is aiming with a weapon.
Syntax
float float float getPedTargetStart ( ped targetingPed )
Required Arguments
- targetingPed: The ped whose target start you wish to retrieve
Returns
Returns three floats, x,y,z, representing the position where the ped's target starts, or false if it was unsuccessful.
Example
This Example draws a line from where the Ped´s Target Starts to the Point where the Target Ends
function drawline() local x, y, z = getPedTargetStart(localPlayer) -- Gets the Point to start From. if (x) then -- Checks if there is a Point to start From. local sx, sy, sz = getPedTargetCollision(localPlayer) -- Gets the Point where the Targets Collision is. dxDrawLine3D(x, y, z, sx, sy, sz) -- Draws the Line end end addEventHandler("onClientPreRender", getRootElement(), drawline) -- Adds the Handler.
See Also
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedOxygenLevel
- getPedSimplestTask
- getPedStat
- getPedTarget
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedTotalAmmo
- getPedVoice
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponMuzzlePosition
- getPedWeaponSlot
- getValidPedModels
- givePedWeapon
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDoingTask
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedClothes
- removePedFromVehicle
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.5.7 r19626 ONWARDS
- setPedFootBloodEnabled
- setPedHeadless
- setPedLookAt
- setPedOnFire
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle