SetAllRandomPedsFlee
DocsSetAllRandomPedsFlee(player, toggle)Description
Sets whether all random peds will run away from the player if they are agitated (threatened) (bool=true), or if they will stand their ground (bool=false).
Parameters
| Name | Type | Description |
|---|---|---|
player | Player | The Player ID for whom you want to set this behavior. |
toggle | BOOL | true/false. |
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))Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.