How to Open an Interior with Teleport

 

This article is for advanced users who don't want to install mods written by 10 year old kiddies who upload buggy scripts which get outdated real fast. Some authors have created open interior scripts with over 3,000 lines of code when in fact it could have been done with just a few lines of code. So why install crap when you can do much better by learning how to script GTA V yourself, like a big boy?

If you want to load an interior, with ipls, you can do this very easily with a script and native functions. In the video below you'll see how you can not only load the interior of the famous O'Neill ranch, we'll also show you how to restore it to its glorious former state before Trevor went nuts.

The big advantage with this method is that you don't load hundreds of memory hogging interiors because this method loads them as you teleport there - no mod does that.

You can watch the Video Here:  How to Open an Interior

There are two key native functions you can use:

void REQUEST_IPL(const char* iplName) // 0x41B4893843BBDB74 0x3B70D1DB b323

and

void REMOVE_IPL(const char* iplName) // 0xEE6C5AD3ECE0A82D 0xDF7CBD36 b323

As  an example, we can replace the burnt O'Neil Ranch with the original one and also load the interiors at the same time.

            Function.Call(Hash.REMOVE_IPL, "farm_burnt");  
            Function.Call(Hash.REMOVE_IPL, "farm_burnt_props");  
            Function.Call(Hash.REQUEST_IPL, "farm");
            Function.Call(Hash.REQUEST_IPL, "farm_props");
            Function.Call(Hash.REQUEST_IPL, "farmint");
            Function.Call(Hash.REMOVE_IPL, "farmint_cap");  //to open doors