Player::getConfigFlag: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(Added link to config flags list page.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
p2 is always 1 in the scripts.<br><br>if (GET_Player_CONFIG_FLAG(ped, 78, 1))<br>= returns true if ped is aiming/shooting a gun
__TOC__
 
{{ClientsideJsFunction}}
Gets player config flag.<br/>
See available flags here: [[Player_Config_Flags|Player Config Flags]]
 
 
{{JSContainer|
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.getConfigFlag(flagId, p2);</syntaxhighlight>
<pre>player.getConfigFlag(flagId, true);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''flagId:''' int
*{{Required}}'''flagId:''' {{RageType|Int}} ([[Player_Config_Flags|Flag IDs]])
*'''p2:''' Boolean
 
===Return value===
===Return value===
*'''Boolean'''
*'''Boolean'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
{{ClientsideCode|
<pre>
// todo
// todo
</syntaxhighlight>
</pre>
}}
}}
==See also==
==See also==
{{Player_function_c}}
{{Player_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:24, 9 February 2020

Client-Side
Function

 JavaScript



Gets player config flag.
See available flags here: Player Config Flags


JavaScript Syntax

Syntax

player.getConfigFlag(flagId, true);

Required Arguments

Return value

  • Boolean

Example

Client-Side
// todo


See also