GET_PLAYER_WANTED_LEVEL
Returns given players wanted level server-side.
Signature
int GET_PLAYER_WANTED_LEVEL(char* playerSrc);Parameters
| Name | Type | Description |
|---|---|---|
playerSrc | char* | The target player |
Returns int — The wanted level
Description
Returns given players wanted level server-side.Usage
local retval = GetPlayerWantedLevel(playerSrc)
-- always works, by hash
local retval = Citizen.InvokeNative(0xbdcdd163, playerSrc, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetPlayerWantedLevel(playerSrc);
// by hash
const retval = Citizen.invokeNative('0xbdcdd163', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xbdcdd163, playerSrc);See also
CLEAR_PLAYER_WANTED_LEVELThis executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false); This is the server-side RPC native equivalent of the client native CLEAR_PLAYER_WANTED_LEVEL.SET_PLAYER_WANTED_LEVELSET_PLAYER_WANTED_LEVEL This is the server-side RPC native equivalent of the client native SET_PLAYER_WANTED_LEVEL.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.