{"action":"created","issue":{"url":"https://api.github.com/repos/crosire/scripthookvdotnet/issues/451","repository_url":"https://api.github.com/repos/crosire/scripthookvdotnet","labels_url":"https://api.github.com/repos/crosire/scripthookvdotnet/issues/451/labels{/name}","comments_url":"https://api.github.com/repos/crosire/scripthookvdotnet/issues/451/comments","events_url":"https://api.github.com/repos/crosire/scripthookvdotnet/issues/451/events","html_url":"https://github.com/crosire/scripthookvdotnet/issues/451","id":145083496,"number":451,"title":"Zone Type Question (Zones vs Regions)","user":{"login":"Dilapidated","id":9470543,"avatar_url":"https://avatars.githubusercontent.com/u/9470543?v=3","gravatar_id":"","url":"https://api.github.com/users/Dilapidated","html_url":"https://github.com/Dilapidated","followers_url":"https://api.github.com/users/Dilapidated/followers","following_url":"https://api.github.com/users/Dilapidated/following{/other_user}","gists_url":"https://api.github.com/users/Dilapidated/gists{/gist_id}","starred_url":"https://api.github.com/users/Dilapidated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dilapidated/subscriptions","organizations_url":"https://api.github.com/users/Dilapidated/orgs","repos_url":"https://api.github.com/users/Dilapidated/repos","events_url":"https://api.github.com/users/Dilapidated/events{/privacy}","received_events_url":"https://api.github.com/users/Dilapidated/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-01T04:27:11Z","updated_at":"2016-04-04T21:28:10Z","closed_at":null,"body":"I'm currently expanding RDE's script to include detection for the country side region. The game uses this zone in dispatch.meta so I was hoping it would be listed in the natives somewhere. \r\n`<ZoneType>VEHICLE_RESPONSE_COUNTRYSIDE</ZoneType>\r\n`\r\n\r\nSo far the only way I've seen to do this is by naming all the zones within the country side region individually since there's multiple zones within this region. I've seen the enum list to do this. I was hoping for a more \"clean\" method to detect the country side region instead of bundling zones together otherwise it'll be more tedious for me to set it up.\r\n\r\nIt would be awesome if there was something like this (Game.player.IsInCountryside) as a check. I've searched natives and haven't found anything resembling that however.\r\n\r\nAs a side note I plan to do something like this with the ocean at some point as well so an ocean region detection method would be neat. It's difficult to specify something to only spawn in ocean waters. Maybe zone types could be combined into regions or maybe there's an easier way to do this?"},"comment":{"url":"https://api.github.com/repos/crosire/scripthookvdotnet/issues/comments/205503859","html_url":"https://github.com/crosire/scripthookvdotnet/issues/451#issuecomment-205503859","issue_url":"https://api.github.com/repos/crosire/scripthookvdotnet/issues/451","id":205503859,"user":{"login":"Dilapidated","id":9470543,"avatar_url":"https://avatars.githubusercontent.com/u/9470543?v=3","gravatar_id":"","url":"https://api.github.com/users/Dilapidated","html_url":"https://github.com/Dilapidated","followers_url":"https://api.github.com/users/Dilapidated/followers","following_url":"https://api.github.com/users/Dilapidated/following{/other_user}","gists_url":"https://api.github.com/users/Dilapidated/gists{/gist_id}","starred_url":"https://api.github.com/users/Dilapidated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dilapidated/subscriptions","organizations_url":"https://api.github.com/users/Dilapidated/orgs","repos_url":"https://api.github.com/users/Dilapidated/repos","events_url":"https://api.github.com/users/Dilapidated/events{/privacy}","received_events_url":"https://api.github.com/users/Dilapidated/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T21:28:10Z","updated_at":"2016-04-04T21:28:10Z","body":"Update#2:\r\n\r\nWanted to report some progress on determining regions.\r\n\r\n \r\n\r\nThere is currently only two regions that can be used: Countryside and City\r\n\r\nHere is the code:\r\n \r\n\r\n`                            uint MapArea;\r\n                            MapArea = Function.Call<uint>(Hash.GET_HASH_OF_MAP_AREA_AT_COORDS, Game.Player.Character.Position.X, Game.Player.Character.Position.Y, Game.Player.Character.Position.Z);\r\n                            if (MapArea == 4005646697) //4005646697 = city hash\r\n                                UI.Notify(\"Player is at map hash name city\");\r\n                            if (MapArea == Game.GenerateHash(\"countryside\"))\r\n                                UI.Notify(\"Player is at map hash name countryside\");\r\n                else\r\n                                UI.Notify(MapArea.ToString());`\r\n\r\nSadly no way to specify the Ocean region..... hopefully there is a way though."}}