- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.1k
Update GetZoneFromNameId and GetNameOfZone #1260
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
Conversation
These 3 zones are listed in popzone.ipl but are missing here
Removed the list of zones abreviations and full names as it's misleading and unnecessary in this case and instead added proper parameter, return value and lua example
        
          
                ZONE/GetNameOfZone.md
              
                Outdated
          
        
      | MURRI = Murrieta Heights | ||
| NCHU = North Chumash | ||
| NOOSE = N.O.O.S.E | ||
| NOOSE = Galileo Observatory | 
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.
Should be OBSERV and not NOOSE
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.
Ah yeah, seems like I forgot to replace that after copy pasting... Sorry and thanks for pointing it out
| Looks good and thanks for actually doing this. | 
| 
 Thanks to you for doing the research for it. not sure about the list in GetZoneFromNameId. If you mean the old list that I removed, I feel like it's unnecessary since that is not the zone name used in the native so it's kinda misleading. If you mean a new zone list like the gist you had in your issue, that's way too long for adding it to the native documentation directly, but maybe link the gist or a pastebin with that list? idk | 
| 
 Yeah Maybe using the gist or making a pastebin would be good. I just updated the gist to include the ids and descriptions of the zones | 
Co-Authored-By: Michael S <[email protected]>
| Thank you, this is a great update. We do try to minimize external links though. If you could add the gist contents to fivem-docs as a game reference, I can merge the rest of these changes :) | 
| Thanks @technetium-cfx for the review, I opened a PR in fivem-docs where I added the list as game reference and updated the link to it here, therefore only merge this with my new PR. citizenfx/fivem-docs#554 (comment) If there's anything else, let me know. | 
These changes are based on Issue #1246.
GetZoneFromNameId
In this native the docs page included a list of the zone abbreviations and their full names which is completely irrelevant for this native. It takes a zone string ID as listed in the firts column of
update\update.rpf\common\data\levels\gta5\popzone.iplas argument and returns the zone ID as integer, which is just the index of that zone in the popzone.ipl starting at 1.The list being there is misleading as it causes people to think, the native converts the abreviations to the full are name which seemingly is also what the issue author thought but just isn't true.
GetNameOfZone
As the issue author stated, 3 zones that are listed in the popzone.ipl file are missing here, so I added them. Credits to @MichaelCoding25 for listing these. I verified these zones exist and work by making sure they are returned by the native when in the area configured by popzone.ipl. The issue author also said the zone
SANANDshould be removed since it's never used anywhere but I couldn't verify that so I left it for now.Both of these have basically not been touched since the initial commit 7 years ago so they were probably never properly manually checked.