isPedWearingJetpack | Multi Theft Auto: Wiki Skip to content

isPedWearingJetpack

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


Checks whether or not a ped is currently wearing a jetpack.

OOP Syntax Help! I don't understand this!

  • Method:ped:isWearingJetpack(...)
  • Variable: .jetpack

Syntax

bool isPedWearingJetpack ( ped thePed )
Required Arguments
  • thePed: the ped you want to check

Returns

  • bool: value

Returns true if the ped is carrying a jetpack, false if he is not or an invalid element was passed.

Code Examples

shared

Example 1:This examples adds a "jetpack" console command, which toggles a jetpack for the player.

addCommandHandler ( "jetpack",
function ( player )
setPedWearingJetpack ( player, not isPedWearingJetpack ( player ) )
end
)

See Also