RemovePlayerJetPack

From Multi Theft Auto: Wiki
Revision as of 17:44, 16 August 2007 by Arc (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

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

Returns

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

Example

function jetPackCommand ( source, key )
    if ( doesPlayerHaveJetPack ( source ) ) then  -- if the player has a jetpack
        removePlayerJetPack ( source )            -- remove it
    else
        givePlayerJetPack ( source )              -- otherwise give him one
    end
end
addCommandHandler ( "jetpack", jetPackCommand )

See Also