Player::clearPlayerWantedLevel: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
 
Line 1: Line 1:
This executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false);<br><br>PLAYER::GET_PLAYER_WANTED_LEVEL(player); executes in less than half the time. Which means that it's worth first checking if the wanted level needs to be cleared before clearing. However, this is mostly about good code practice and can important in other situations. The difference in time in this example is negligible.  
This executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false);<br><br>PLAYER::GET_PLAYER_WANTED_LEVEL(player); executes in less than half the time. Which means that it's worth first checking if the wanted level needs to be cleared before clearing. However, this is mostly about good code practice and can important in other situations. The difference in time in this example is negligible.  
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.clearPlayerWantedLevel();</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.player.clearPlayerWantedLevel();</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
===Return value===
===Return value===
Line 7: Line 7:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Player_function_c}}
{{Player_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:30, 6 May 2017

This executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false);

PLAYER::GET_PLAYER_WANTED_LEVEL(player); executes in less than half the time. Which means that it's worth first checking if the wanted level needs to be cleared before clearing. However, this is mostly about good code practice and can important in other situations. The difference in time in this example is negligible.

Syntax

mp.game.player.clearPlayerWantedLevel();

Required Arguments

Return value

  • Undefined

Example

// todo

See also