IsPlayerBeingArrested
Docslocal retval = IsPlayerBeingArrested(player, atArresting)Description
Return true while player is being arrested / busted.
If atArresting is set to 1, this function will return 1 when player is being arrested (while player is putting his hand up, but still have control)
If atArresting is set to 0, this function will return 1 only when the busted screen is shown.Parameters
| Name | Type | Description |
|---|---|---|
player | Player | — |
atArresting | 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
BOOLReturns TRUE (1) or FALSE (0).