CanPlayerBeKnockedOffBike: 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|Can someone confirm this?}}
This function checks if you can fall of your bike.
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool canPlayerBeKnockedOffBike ( player thePlayer )         
bool canPlayerBeKnockedOffBike ( player thePlayer )         
</syntaxhighlight>
</syntaxhighlight>
===Required Arguments===
*'''thePlayer:''' the player whose knockoffstatus being asked
==Example==
This example puts the knockoff status in the chatbox.
<syntaxhighlight lang="lua">function canBeKnockedOff ( command )
-- The player should enter /knockstatus
status = canPlayerCanBeKnockedOffBike ( getLocalPlayer())
  if (status == true) then
  -- If the status is true then
  outputChatBox ( "You can be knocked off your bike." )
  else
  -- Otherwise
  outputChatBox ( "You can't be knocked off your bike." )
  end
end
addCommandHandler ( "knockstatus", canBeKnockedOff )
</syntaxhighlight>
==See Also==
{{Player functions}}

Revision as of 08:01, 17 February 2008

Dialog-information.png This article needs checking.

Reason(s): Can someone confirm this?

This function checks if you can fall of your bike.

Syntax

bool canPlayerBeKnockedOffBike ( player thePlayer )         

Required Arguments

  • thePlayer: the player whose knockoffstatus being asked

Example

This example puts the knockoff status in the chatbox.

function canBeKnockedOff ( command )
-- The player should enter /knockstatus
status = canPlayerCanBeKnockedOffBike ( getLocalPlayer())
  if (status == true) then
   -- If the status is true then
   outputChatBox ( "You can be knocked off your bike." )
   else
   -- Otherwise
   outputChatBox ( "You can't be knocked off your bike." )
  end
end
addCommandHandler ( "knockstatus", canBeKnockedOff )

See Also