From da70c7a60efa699ff644e8b0f0d4d958af16b22c Mon Sep 17 00:00:00 2001 From: Mystro Date: Sat, 2 May 2026 21:23:24 +0300 Subject: [PATCH] Document IsPedSheltered --- PED/IsPedSheltered.md | 61 +++++++++++++++++++++++++++++++++++++ PED/N_0xb8b52e498014f5b0.md | 14 --------- 2 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 PED/IsPedSheltered.md delete mode 100644 PED/N_0xb8b52e498014f5b0.md diff --git a/PED/IsPedSheltered.md b/PED/IsPedSheltered.md new file mode 100644 index 000000000..979879aea --- /dev/null +++ b/PED/IsPedSheltered.md @@ -0,0 +1,61 @@ +--- +ns: PED +aliases: [ "0xB8B52E498014F5B0" ] +--- +## IS_PED_SHELTERED + +```c +// 0xB8B52E498014F5B0 +BOOL IS_PED_SHELTERED(Ped ped); +``` + +Returns whether the specified ped is currently sheltered. +A ped is considered sheltered if they are under a **roof**, a **bridge**, inside a **tunnel**, or within a **vehicle with a solid roof**, meaning they are not directly exposed to the open sky. + +## Parameters +* **ped**: The ped entity to check. + +## Return value +Returns `true` if the ped is sheltered, `false` otherwise. + +## Examples +```lua +-- Check if the player's ped is currently under a shelter. +local playerPed = PlayerPedId() +local isSheltered = IsPedSheltered(playerPed) + +if isSheltered then + print("The player is currently sheltered.") +else + print("The player is out in the open.") +end +``` + +```js +// Check if the player's ped is currently under a shelter. +const playerPed = PlayerPedId(); +const isSheltered = IsPedSheltered(playerPed); + +if (isSheltered) { + console.log("The player is currently sheltered."); +} else { + console.log("The player is out in the open."); +} +``` + +```cs +using static CitizenFX.Core.Native.API; + +// Check if the player's ped is currently under a shelter. +int playerPed = PlayerPedId(); +bool isSheltered = IsPedSheltered(playerPed); + +if (isSheltered) +{ + Debug.WriteLine("The player is currently sheltered."); +} +else +{ + Debug.WriteLine("The player is out in the open."); +} +``` diff --git a/PED/N_0xb8b52e498014f5b0.md b/PED/N_0xb8b52e498014f5b0.md deleted file mode 100644 index 2b5c75a99..000000000 --- a/PED/N_0xb8b52e498014f5b0.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -ns: PED ---- -## _0xB8B52E498014F5B0 - -```c -// 0xB8B52E498014F5B0 -BOOL _0xB8B52E498014F5B0(Ped ped); -``` - -## Parameters -* **ped**: - -## Return value