clearPlayerWantedLevel
CLEAR_PLAYER_WANTED_LEVEL0xB302540597885499The GTA V native CLEAR_PLAYER_WANTED_LEVEL of the PLAYER namespace, as LS:MP client scripts call it: the global function clearPlayerWantedLevel, in JavaScript and in Lua.
clearPlayerWantedLevel(player: Player): voidclearPlayerWantedLevel(player: Player)Usage
JavaScript
clearPlayerWantedLevel(player);Lua
clearPlayerWantedLevel(player)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
This executes at the same as speed as setPlayerWantedLevel(player, 0, false);
getPlayerWantedLevel(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.
Reference
- Namespace
- Player PLAYER
- In the game
void CLEAR_PLAYER_WANTED_LEVEL(Player player)- Hash
0xB302540597885499