SetPlayerCanBeKnockedOffBike: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
{{Client function}}
{{Needs_Checking|Is this correct?}}
This function controls if you can fall of your bike.
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool setPlayerCanBeKnockedOffBike ( player thePlayer, bool canBeKnockedOffBike )         
bool setPlayerCanBeKnockedOffBike ( player thePlayer, bool canBeKnockedOffBike )         
</syntaxhighlight>
===Required Arguments===
*'''thePlayer:''' the player whose knockoffstatus being changed
*'''state:''' the true or false state
==Example==
This example sets the canBeKnockedOff status true or false.
<syntaxhighlight lang="lua">function canBeKnockedOff ( command, state )
-- The player should enter /knock true or /knock false
setPlayerCanBeKnockedOffBike ( getLocalPlayer(), state )
-- Get the player and set true or false
end
addCommandHandler ( "knock", canBeKnockedOff )
</syntaxhighlight>
</syntaxhighlight>
==See Also==
{{Player functions}}

Revision as of 07:51, 17 February 2008

Dialog-information.png This article needs checking.

Reason(s): Is this correct?

This function controls if you can fall of your bike.

Syntax

bool setPlayerCanBeKnockedOffBike ( player thePlayer, bool canBeKnockedOffBike )         

Required Arguments

  • thePlayer: the player whose knockoffstatus being changed
  • state: the true or false state

Example

This example sets the canBeKnockedOff status true or false.

function canBeKnockedOff ( command, state )
-- The player should enter /knock true or /knock false
setPlayerCanBeKnockedOffBike ( getLocalPlayer(), state )
-- Get the player and set true or false
end
addCommandHandler ( "knock", canBeKnockedOff )

See Also

Shared