RemovePlayerJetPack

From Multi Theft Auto: Wiki
Revision as of 18:06, 14 August 2006 by MrJax (talk | contribs)
Jump to navigation Jump to search

This function is used to remove a player's jetpack.

Syntax

bool removePlayerJetPack ( player thePlayer )

Required Arguments

  • player: The player you want to remove the jetpack from.

Returns

Returns 'true' if the player already had a jetpack, 'false' otherwise.

Example

 [lua]
addCommandHandler ( "jetpack", "jetPackCommand" )
function jetPackCommand ( source, key )
  if ( doesPlayerHaveJetPack ( source ) ) then -- if he has a jetpack
    removePlayerJetPack ( source ) -- remove it
  else
    givePlayerJetPack ( source ) -- give him one
  end
end

See Also