-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(natives/interior): update interiors natives/examples #1104
Open
spacevx
wants to merge
1
commit into
citizenfx:master
Choose a base branch
from
spacevx:interior_2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would be best do do something below this while loop to show why you should wait?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean like this?