-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(natives/interior): update interiors natives/examples
* Update PIN_INTERIOR_IN_MEMORY * Update IS_INTERIOR_ENTITY_SET_ACTIVE * Update ENABLE_SHADOW_CULL_MODEL_THIS_FRAME * Update ENABLE_EXTERIOR_CULL_MODEL_THIS_FRAME * Update DISABLE_METRO_SYSTEM * Update DEACTIVATE_INTERIOR_ENTITY_SET * Update ACTIVATE_INTERIOR_ENTITY_SET refactor(example): set the player into the interior * In the example of PinMemory when the interior is ready we are now teleporting the player in the interior * Removed the gtaforum link Co-Authored-By: Dillon Skaggs <[email protected]>
- Loading branch information
1 parent
5999728
commit 7754843
Showing
9 changed files
with
264 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
ns: INTERIOR | ||
aliases: ["0x9E6542F0CE8E70A3"] | ||
--- | ||
## DISABLE_METRO_SYSTEM | ||
|
||
```c | ||
// 0x9E6542F0CE8E70A3 0x5EF9C5C2 | ||
void DISABLE_METRO_SYSTEM(BOOL toggle); | ||
``` | ||
Completely disables the metro system in the game. | ||
``` | ||
NativeDB Introduced: v323 | ||
``` | ||
## Parameters | ||
* **toggle**: A boolean value indicating whether to disable (`true`) or enable (`false`) the metro system. | ||
## Examples | ||
```lua | ||
-- Disable metro system | ||
DisableMetroSystem(true) | ||
``` | ||
```javascript | ||
// Disable metro system | ||
DisableMetroSystem(true); | ||
``` | ||
```csharp | ||
using static CitizenFX.Core.Native.API; | ||
|
||
// Disable metro system | ||
DisableMetroSystem(true); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
ns: INTERIOR | ||
aliases: ["0x50C375537449F369", "_ENABLE_SCRIPT_CULL_MODEL_THIS_FRAME"] | ||
--- | ||
## ENABLE_SHADOW_CULL_MODEL_THIS_FRAME | ||
|
||
```c | ||
// 0x50C375537449F369 | ||
void ENABLE_SHADOW_CULL_MODEL_THIS_FRAME(cs_type(Any) Hash mapObjectHash); | ||
``` | ||
Culls exterior objects from rendering (cascade shadows only) based on the model name hash. Primarily used in multiplayer apartments to hide the exterior structure of buildings. This native needs to be called every frame and is generally used with [`ENABLE_EXTERIOR_CULL_MODEL_THIS_FRAME`](#_0xA97F257D0151A6AB). | ||
``` | ||
NativeDB Introduced: v323 | ||
``` | ||
## Parameters | ||
* **mapObjectHash**: The hash of the model name to cull from shadow rendering. | ||
## Examples | ||
```lua | ||
CreateThread(function() | ||
local buildingTopHash = GetHashKey("hei_kt1_08_buildingtop_a") | ||
local emissiveHash = GetHashKey("hei_kt1_08_kt1_emissive_ema") | ||
while (true) do | ||
-- hei_kt1_08_buildingtop_a | ||
EnableExteriorCullModelThisFrame(buildingTopHash) | ||
EnableShadowCullModelThisFrame(buildingTopHash) | ||
-- hei_kt1_08_kt1_emissive_ema | ||
EnableExteriorCullModelThisFrame(emissiveHash) | ||
EnableShadowCullModelThisFrame(emissiveHash) | ||
Wait(0) | ||
end | ||
end) | ||
``` | ||
```javascript | ||
const buildingTopHash = GetHashKey("hei_kt1_08_buildingtop_a"); | ||
const emissiveHash = GetHashKey("hei_kt1_08_kt1_emissive_ema"); | ||
|
||
setTick(() => { | ||
// hei_kt1_08_buildingtop_a | ||
EnableExteriorCullModelThisFrame(buildingTopHash); | ||
EnableShadowCullModelThisFrame(buildingTopHash); | ||
// hei_kt1_08_kt1_emissive_ema | ||
EnableExteriorCullModelThisFrame(emissiveHash); | ||
EnableShadowCullModelThisFrame(emissiveHash); | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters