LizNet 1 Posted July 19, 2015 Share Posted July 19, 2015 (edited) Title says it all. I can't find how to check if player is inside any building with ScriptHookDotNet and Visual Basic. Any suggestions? Edited July 19, 2015 by LizNet Link to post Share on other sites
LizNet 1 Posted August 31, 2015 Author Share Posted August 31, 2015 Can't believe that nobody knows the answer Link to post Share on other sites
whorse 26 Posted August 31, 2015 Share Posted August 31, 2015 (edited) Using this native: Any INTERIOR::GET_INTERIOR_FROM_ENTITY(Entity entity) It will return 0 if the entity in question is not in any interior area. Here is an example: if (INTERIOR::GET_INTERIOR_FROM_ENTITY(player) != 0){ //(code to execute when player is in an interior)} Sorry, I only know C++ Edited August 31, 2015 by whorse Link to post Share on other sites
CamxxCore 156 Posted August 31, 2015 Share Posted August 31, 2015 Can't believe that nobody knows the answer if (Function.Call<bool>(Hash.IS_INTERIOR_SCENE){//player is inside} Link to post Share on other sites
LizNet 1 Posted September 7, 2015 Author Share Posted September 7, 2015 Can't believe that nobody knows the answer if (Function.Call<bool>(Hash.IS_INTERIOR_SCENE){//player is inside} If I use If GTA.Native.Function.Call(GTA.Native.Hash.IS_INTERIOR_SCENE) ThenEnd If I get an error saying Expression does not produce a value. Link to post Share on other sites
bilago 25 Posted September 10, 2015 Share Posted September 10, 2015 (edited) Can't believe that nobody knows the answer if (Function.Call<bool>(Hash.IS_INTERIOR_SCENE){//player is inside} If I use If GTA.Native.Function.Call(GTA.Native.Hash.IS_INTERIOR_SCENE) ThenEnd If I get an error saying Expression does not produce a value. You need to re-read what he wrote: if (Function.Call<bool>(Hash.IS_INTERIOR_SCENE)} //player is inside } Include the return type in Function.Call<T> . if you just do Function.Call() you are returning void, hence compilation errors. Edited September 10, 2015 by bilago Link to post Share on other sites
LizNet 1 Posted September 13, 2015 Author Share Posted September 13, 2015 Can't believe that nobody knows the answer if (Function.Call<bool>(Hash.IS_INTERIOR_SCENE){//player is inside} If I use If GTA.Native.Function.Call(GTA.Native.Hash.IS_INTERIOR_SCENE) ThenEnd If I get an error saying Expression does not produce a value. You need to re-read what he wrote: if (Function.Call<bool>(Hash.IS_INTERIOR_SCENE)} //player is inside } Include the return type in Function.Call<T> . if you just do Function.Call() you are returning void, hence compilation errors. I solved the problem by rewriting the whole thing again in C# Link to post Share on other sites