GetPedGravity: Difference between revisions
Jump to navigation
Jump to search
(Added OOP syntax) |
m (→See Also) |
||
(One intermediate revision by one other user not shown) | |||
Line 26: | Line 26: | ||
==See Also== | ==See Also== | ||
{{Ped functions}} | {{Ped functions|server}} | ||
[[hu:getPedGravity]] |
Latest revision as of 22:35, 6 September 2024
This function returns the current gravity for the specified ped. The default gravity is 0.008.
Syntax
float getPedGravity ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:getGravity(...)
- Variable: .gravity
- Counterpart: setPedGravity
Required Arguments
- thePed: The ped whose gravity you want to check.
Returns
Returns a float indicating the ped's gravity, or false if the ped is invalid. Default value is 0.008.
Example
This example outputs the gravity of the player who entered the 'showGravity' command.
function showGravity ( thePlayer ) local gravity = getPedGravity ( thePlayer ) outputChatBox ( "Your gravity: " .. tostring(gravity), thePlayer ) end addCommandHandler ( "showGravity", showGravity )
See Also
- getPedGravity
- reloadPedWeapon
- setPedChoking
- setPedGravity
- setPedWearingJetpack
- 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