Skip to content
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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spacevx
Copy link
Contributor

@spacevx spacevx commented May 7, 2024

  • 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

@spacevx spacevx closed this May 13, 2024
@spacevx spacevx reopened this Jun 8, 2024
@spacevx spacevx closed this Jun 11, 2024
@spacevx spacevx reopened this Jun 27, 2024
@spacevx
Copy link
Contributor Author

spacevx commented Jul 3, 2024

@4mmonium any news?

Copy link
Contributor

@colistro123 colistro123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the most part, requested some changes though.

INTERIOR/DisableMetroSystem.md Outdated Show resolved Hide resolved
```
More info: http://gtaforums.com/topic/836367-adding-props-to-interiors/
NativeDB Introduced: v323
More info: https://gtaforums.com/topic/836367-adding-props-to-interiors/
Copy link
Contributor

@PsychoShock PsychoShock Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldnt use external links - always refer to FiveM docs itself (if it's not there, you can PR then add the link after its merge)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link doesn't provide much information, so it would probably be best to just remove it.

```
This is the native that is used to hide the exterior of GTA Online apartment buildings when you are inside an apartment.
NativeDB Introduced: v323
More info: https://gtaforums.com/topic/836301-hiding-gta-online-apartment-exteriors/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to comment above.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this link too

```
More info: http://gtaforums.com/topic/836367-adding-props-to-interiors/
NativeDB Introduced: v323
More info: https://gtaforums.com/topic/836367-adding-props-to-interiors/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link doesn't provide much information, so it would probably be best to just remove it.

CreateThread(function()
local interiorID = GetInteriorAtCoords(976.6364, 70.29476, 115.1641)
PinInteriorInMemory(interiorID)
repeat
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean like this?

CreateThread(function()
    -- Coordinates of the interior
    local interiorID = GetInteriorAtCoords(976.6364, 70.29476, 115.1641)
    
    -- Load the interior into memory
    PinInteriorInMemory(interiorID)
    
    -- Wait until the interior is ready
    repeat
        Wait(0)
    until IsInteriorReady(interiorID)
    
    -- Teleport the player to the interior
    local playerPed = PlayerPedId()
    SetEntityCoords(playerPed, 976.6364, 70.29476, 115.1641)
end)

INTERIOR/DisableMetroSystem.md Outdated Show resolved Hide resolved
@spacevx
Copy link
Contributor Author

spacevx commented Jul 14, 2024

@AvarianKnight Updated, it should be better now

```
This is the native that is used to hide the exterior of GTA Online apartment buildings when you are inside an apartment.
NativeDB Introduced: v323
More info: https://gtaforums.com/topic/836301-hiding-gta-online-apartment-exteriors/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this link too

INTERIOR/DisableMetroSystem.md Outdated Show resolved Hide resolved
* 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 <dillskaggs@gmail.com>
@spacevx
Copy link
Contributor Author

spacevx commented Aug 6, 2024

Should be good

@AvarianKnight AvarianKnight added the examples need testing Examples need testing to ensure that they work label Aug 7, 2024
@AvarianKnight
Copy link
Collaborator

Is there a different interior you could use for these examples (maybe the biker hideout right next to the casino, iirc it has entity sets too).

I could not get these examples to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples need testing Examples need testing to ensure that they work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants