IsPedOnGround: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 22: | Line 22: | ||
outputChatBox ( "No, you're not flying, you're just stoned!", sourcePlayer ) | outputChatBox ( "No, you're not flying, you're just stoned!", sourcePlayer ) | ||
else | else | ||
outputChatBox ( "Is it a bird, is it a plane... No it's " .. | outputChatBox ( "Is it a bird, is it a plane... No it's " .. getClientName ( sourcePlayer ) .. "!", sourcePlayer ) | ||
end | end | ||
end | end |
Revision as of 20:22, 25 May 2008
This function is used to determine whether or not a ped is on the ground. This is for on-foot usage only.
Syntax
bool isPedOnGround ( ped thePed )
Required Arguments
- thePed: The ped you are checking.
Returns
Returns true if the ped is on foot and on the ground, false otherwise, even if he is in a car that stands still.
Example
Click to collapse [-]
ServerThis example checks if the player who enters the 'amiflying' command is on the ground and outputs a message.
function isHeFlying ( sourcePlayer ) if isPedOnGround ( sourcePlayer ) then outputChatBox ( "No, you're not flying, you're just stoned!", sourcePlayer ) else outputChatBox ( "Is it a bird, is it a plane... No it's " .. getClientName ( sourcePlayer ) .. "!", sourcePlayer ) end end addCommandHandler ( "amiflying", isHeFlying )
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
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle