IsControlEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
<!-- Describe in plain english what this function does. Don't go into details, just give an overview -->
Checks whether a GTA control is enabled or disabled for a certain player.
This fake function is for use with blah & blah and does blahblahblabhalbhl


==Syntax==  
==Syntax==  
<!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd -->
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool isControlEnabled ( player theplayer, string (control) )
bool isControlEnabled ( player theplayer, string control )
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
<!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type -->
*'''thePlayer:''' The player you wish the control status of.
*'''argumentName:''' description
*'''control:''' The control you wish to check. See [[control names]] for a list of possible controls.
 
<!-- Only include this section below if there are optional arguments -->
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' description
*'''argumentName3:''' description


===Returns===
===Returns===
<!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check -->
Returns ''true'' if control is enabled, ''false'' otherwise.
Returns ''true'' if blah, ''false'' otherwise.


==Example==  
==Example==  
<!-- Explain what the example is in a single sentance -->
This example does...
<!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized -->
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
--This line does...

Revision as of 14:43, 20 June 2007

Checks whether a GTA control is enabled or disabled for a certain player.

Syntax

bool isControlEnabled ( player theplayer, string control )

Required Arguments

  • thePlayer: The player you wish the control status of.
  • control: The control you wish to check. See control names for a list of possible controls.

Returns

Returns true if control is enabled, false otherwise.

Example

--This line does...
blabhalbalhb --abababa
--This line does this...
mooo

See Also

Template:FunctionArea functions -- leave this unless you complete the function