SetPlayerWantedLevelNow
DocsSetPlayerWantedLevelNow(player, p1)Description
Forces any pending wanted level to be applied to the specified player immediately.
Call SET_PLAYER_WANTED_LEVEL with the desired wanted level, followed by SET_PLAYER_WANTED_LEVEL_NOW.
Second parameter is unknown (always false).
Parameters
| Name | Type | Description |
|---|---|---|
player | Player | — |
p1 | BOOL | — |
Quick Snippet: Get Playerplayer
playerUse this to get the local player ID or a target player's server ID.
-- Get the local player index (client-side)
local playerId = PlayerId()
-- Get the local player's server ID (for server events)
local serverId = GetPlayerServerId(playerId)
print("Player ID: " .. playerId)
print("Server ID: " .. serverId)
-- Get player ped from a server ID:
-- local targetPed = GetPlayerPed(GetPlayerFromServerId(targetServerId))Returns
voidThis native does not return a value.