RemovePlayerJetPack: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> [lua] | ||
addCommandHandler ( "jetpack", "jetPackCommand" ) | addCommandHandler ( "jetpack", "jetPackCommand" ) | ||
function jetPackCommand ( source, key ) | function jetPackCommand ( source, key ) |
Revision as of 18:06, 14 August 2006
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
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState