Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SuleMareVientu committed Nov 23, 2023
1 parent 7a8dddd commit 58af2cd
Show file tree
Hide file tree
Showing 31 changed files with 17,603 additions and 0 deletions.
428 changes: 428 additions & 0 deletions Docs/GTA V Interiors Functions.cs

Large diffs are not rendered by default.

8,163 changes: 8,163 additions & 0 deletions Docs/IPL List.txt

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions Docs/IPLs Interiors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
v_int_1 Fire Station (V_FIREDEPT)
v_int_2 Coroner (V_CORONER)
v_int_3 Janitor's Apartment (V_JANITOR)
v_int_4 Bahama Mama's (Unused) (V_BAHAMA)
v_int_5 Pacific Standard Bank (V_BANK)
v_int_6 UNKNOWN (REMOVED) (SPECULATION: V_JEWEL)
v_int_7 Ammunation with shooting range (V_GUN)
v_int_8 O'neil's farm (V_FARMHOUSE)
v_int_9 Lifeinvader Office (V_FACEOFFICE)
v_int_10 Fleeca Bank and Liquor Store (V_GENBANK and V_GEN_LIQUOR)
v_int_11 Abattoir (V_ABATTOIR)
v_int_12 UNKNOWN (REMOVED) (SPECULATION: V_DEVIANT)
v_int_13 Recycling Center (V_RECYCLE)
v_int_14 UNKNOWN (CUT) (v_office texture name inside dummy box) (SPECULATION: V_SAUNA)
v_int_15 Simeon's Dealership (V_CARSHOWROOM)
v_int_16 GTA Online Apartments (V_APARTMENT_HIGH and V_APART_MIDSPAZ and V_STUDIO_LO)
v_int_17 Unknown Strip Club (DELETED) (V_STRIP)
v_int_18 Hornbills Strip Club (DELETED) (V_STRIP2)
v_int_19 Vanilla Unicorn Strip Club (V_STRIP3)
v_int_20 Mission Row Police Station (V_POLICEHUB)
v_int_21 Split Sides Comedy Club (Unused) (V_COMEDY)
v_int_22 Ammunation (V_GUN2)
v_int_23 Vangellico Jewelry Store (V_JEWEL2)
v_int_24 Franklin's Mansion (V_FRANKLINSHOUSE)
v_int_25 Army Tower (V_TOWER)
v_int_26 Trevor's Trailer (V_TRAILER and V_TRAILERTIDY and V_TRAILERTRASH)
v_int_27 Epsilon Storage Room (V_EPSILONISM)
v_int_28 Humane Labs (V_LAB)
v_int_29 Foundry (V_FOUNDRY)
v_int_30 UNKNOWN (REMOVED) (SPECULATION: V_BURGER)
v_int_31 Tunnel
v_int_31a Tunnel
v_int_31b Tunnel (center)
v_int_32 Hicks Bar (V_HICKSBAR)
v_int_33 IAA Office (V_CIA)
v_int_34 Clucking Bell Factory (V_FACTORY1 and V_FACTORY2 and V_FACTORY3 and V_FACTORY4)
v_int_35 Lester's Sweatshop (V_SWEAT and V_SWEATEMPTY)
v_int_36 Tattoo shop (V_TATTOO))
v_int_37 Bob Mullet Barber Shop (V_HAIRDRESSER)
v_int_38 Barber Shop (V_BARBERS)
v_int_39 Meth Lab (V_METHLAB and V_METHTRAILER - REMOVED)
v_int_40 Destroyed Pillbox Hill Hospital (V_HOSPITAL)
v_int_41 Paleto Bay Bank (V_BANK4)
v_int_42 UNKNOWN (REMOVED) (SPECULATION: V_CHICKEN)
v_int_43 Vagos Safehouse (REMOVED)(V_CARMOD2)
v_int_44 Michael's House (V_MICHAEL and V_MICHAEL_GARAGE)
v_int_45 Hayes Autos (V_CHOPSHOP)
v_int_46 Los Santos Customs (V_CARMOD and V_CARMOD3)
v_int_47 Sheriff (V_SHERIFF and V_SHERIFF2) and Vangellico Construction Site (V_REFIT)
v_int_48 FIB Lobby (V_OFFICE_LOBBY)
v_int_49 Jack Howitzer Motel (V_MOTEL_MP) and Tattoo Shop (V_TATTOO2)
v_int_50 Cinema/Theatre (V_CINEMA)
v_int_51 Binco (V_CLOTHESLO)
v_int_52 Suburban (V_CLOTHESMID)
v_int_53 Ponsonbys (V_CLOTHESHI)
v_int_54 Lester's House (V_LESTERS)
v_int_55 Torture Room (V_TORTURE)
v_int_56 La Fuente Blanca (Madrazo's) Ranch (V_RANCH)
v_int_57 Franklin's Aunt House (V_FRANKLINS)
v_int_58 Solomon's Office (V_58_SOL_OFFICE) and Kickstart Arena (REMOVED) (V_TRIALSTAD)
v_int_59 Merryweather Dock's Control Room (V_DOCKCONTROL)
v_int_60 Devin Weston's Hangar (V_HANGER)
v_int_61 Floyd's House (V_TREVORS)
v_int_62 Maze Bank Arena (V_STADIUM)
v_int_63 Union Depository Vault (V_FINALEBANK)
v_int_64 Tequi-la-la (V_ROCKCLUB)
v_int_65 Psychiatrist Office (V_PSYCHEOFFICE)
v_int_66 24/7 Store (V_SHOP_247)
v_int_67 UNKNOWN (REMOVED)
v_int_68 Gas Station (V_GASSTATION)
v_int_69 FIB Grab Office (CUT)
v_int_70 Lost MC Clubhouse (REMOVED/Added back in mpbiker)
V_int_71 Prison Tower (V_GUARDTOWER) and Big Los Santos Customs (V_LOCKUP)
v_int_72 Garages (V_GARAGEL) and (V_GARAGEM) and (V_GARAGES) and V(GARAGEM_SP)
v_int_73 FIB (V_FIB01 and V_FIB04)
v_int_74 FIB (V_FIB02 and V_FIB03)
v_int_75 Surgery Room (REMOVED)
7 changes: 7 additions & 0 deletions Docs/Sources.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
https://pastebin.com/bmirNn39
https://github.com/Bob74/bob74_ipl
https://wiki.rage.mp/index.php?title=Interior_Props
https://docs.altv.mp/gta/articles/references/interiors-and-locations.html
https://altv.stuyk.com/docs/articles/tables/ipls.html
https://pastebin.com/4zhQRYWE
https://pastebin.com/42JDPZBr
Binary file added Images/Los-Santos.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Preview/InteriorsV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Preview/InteriorsV.psd
Binary file not shown.
Binary file added Images/Preview/Screenshot 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Preview/Screenshot 2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Preview/Screenshot 3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions InteriorsV/InteriorsV.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="script.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="script.h" />
</ItemGroup>
</Project>
30 changes: 30 additions & 0 deletions InteriorsV/InteriorsV.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34031.279
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InteriorsV", "InteriorsV.vcxproj", "{8D82F34A-1D64-465B-84B1-37F89AD3D20B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8D82F34A-1D64-465B-84B1-37F89AD3D20B}.Debug|x64.ActiveCfg = Release|x64
{8D82F34A-1D64-465B-84B1-37F89AD3D20B}.Debug|x64.Build.0 = Release|x64
{8D82F34A-1D64-465B-84B1-37F89AD3D20B}.Debug|x86.ActiveCfg = Release|x64
{8D82F34A-1D64-465B-84B1-37F89AD3D20B}.Debug|x86.Build.0 = Release|x64
{8D82F34A-1D64-465B-84B1-37F89AD3D20B}.Release|x64.ActiveCfg = Release|x64
{8D82F34A-1D64-465B-84B1-37F89AD3D20B}.Release|x64.Build.0 = Release|x64
{8D82F34A-1D64-465B-84B1-37F89AD3D20B}.Release|x86.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {45DB4207-118D-427D-A0E4-27145166B55F}
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions InteriorsV/InteriorsV.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
73 changes: 73 additions & 0 deletions InteriorsV/InteriorsV.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="globals.h" />
<ClCompile Include="interiors.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="script.cpp" />
<ClCompile Include="functions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="functions.h" />
<ClInclude Include="interiors.h" />
<ClInclude Include="script.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8D82F34A-1D64-465B-84B1-37F89AD3D20B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>InteriorsV</RootNamespace>
<ProjectName>InteriorsV</ProjectName>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.asi</TargetExt>
<OutDir>bin\$(Configuration)\</OutDir>
<IntDir>tmp\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;NativeTrainer_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalIncludeDirectories>inc/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalOptions>lib\ScriptHookV.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
4 changes: 4 additions & 0 deletions InteriorsV/InteriorsV.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
Binary file added InteriorsV/bin/Release/InteriorsV.asi
Binary file not shown.
112 changes: 112 additions & 0 deletions InteriorsV/functions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
//ScriptHook
#include "natives.h"
#include "types.h"
//Custom
#include "functions.h"
#include "globals.h"

Hash doorHash;

/*
#include "string"
char* ToString(Any var)
{
std::string str = std::to_string(var);
char* c = strcpy((char*)malloc(str.length() + 1), str.c_str());
return(c);
}
*/

void Print(char* string, int ms)
{
UI::BEGIN_TEXT_COMMAND_PRINT("STRING");
UI::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(string);
UI::END_TEXT_COMMAND_PRINT(ms, 1);
return;
}

void LoadIPL(char* ipl)
{
if (!STREAMING::IS_IPL_ACTIVE(ipl))
STREAMING::REQUEST_IPL(ipl);
return;
}

void UnloadIPL(char* ipl)
{
if (STREAMING::IS_IPL_ACTIVE(ipl))
STREAMING::REMOVE_IPL(ipl);
return;
}

void EnableInterior(int interior)
{
INTERIOR::_LOAD_INTERIOR(interior);
STREAMING::SET_INTERIOR_ACTIVE(interior, true);
INTERIOR::DISABLE_INTERIOR(interior, false);
INTERIOR::CAP_INTERIOR(interior, false);
return;
}

void AltUnlockDoor(Hash EntityHash, float x, float y, float z)
{
if (OBJECT::DOOR_SYSTEM_FIND_EXISTING_DOOR(x, y, z, EntityHash, &doorHash))
{
if (OBJECT::DOOR_SYSTEM_GET_DOOR_STATE(doorHash) != 0)
OBJECT::_SET_DOOR_ACCELERATION_LIMIT(doorHash, 0, false, false);
}
return;
}

void ForceUnlockDoor(Hash EntityHash, float x, float y, float z, int seed)
{
if (!OBJECT::DOOR_SYSTEM_FIND_EXISTING_DOOR(x, y, z, EntityHash, &doorHash))
{
Hash newDoorHash = EntityHash + seed;
Object door = OBJECT::GET_CLOSEST_OBJECT_OF_TYPE(x, y, z, 0.5, EntityHash, false, true, true);
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(door, true, true);
ENTITY::DELETE_ENTITY(&door);
OBJECT::ADD_DOOR_TO_SYSTEM(newDoorHash, EntityHash, x, y, z, false, false, false);
OBJECT::_SET_DOOR_ACCELERATION_LIMIT(newDoorHash, 0, false, false);
}
return;
}

void DeleteObject(Hash EntityHash, float x, float y, float z)
{
Object entity = OBJECT::GET_CLOSEST_OBJECT_OF_TYPE(x, y, z, 0.5, EntityHash, false, true, true);
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(entity, true, true);
OBJECT::DELETE_OBJECT(&entity);
return;
}

void EnableInteriorProp(int interior, char* prop, bool refresh)
{
if (!INTERIOR::_IS_INTERIOR_PROP_ENABLED(interior, prop))
{
INTERIOR::_ENABLE_INTERIOR_PROP(interior, prop);
if (refresh)
INTERIOR::REFRESH_INTERIOR(interior);
}
return;
}

void DisableInteriorProp(int interior, char* prop, bool refresh)
{
if (INTERIOR::_IS_INTERIOR_PROP_ENABLED(interior, prop))
{
INTERIOR::_DISABLE_INTERIOR_PROP(interior, prop);
if (refresh)
INTERIOR::REFRESH_INTERIOR(interior);
}
return;
}

void SetScenarioGroup(char* scenarioGroup, bool toggle)
{
if (AI::DOES_SCENARIO_GROUP_EXIST(scenarioGroup) && !AI::IS_SCENARIO_GROUP_ENABLED(scenarioGroup))
{
AI::SET_SCENARIO_GROUP_ENABLED(scenarioGroup, toggle);
}
return;
}
13 changes: 13 additions & 0 deletions InteriorsV/functions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

char* ToString(Any var);
void Print(char* string, int ms);
void LoadIPL(char* ipl);
void UnloadIPL(char* ipl);
void EnableInterior(int interior);
void AltUnlockDoor(Hash EntityHash, float x, float y, float z);
void ForceUnlockDoor(Hash EntityHash, float x, float y, float z, int seed);
void DeleteObject(Hash EntityHash, float x, float y, float z);
void EnableInteriorProp(int interior, char* prop, bool refresh);
void DisableInteriorProp(int interior, char* prop, bool refresh);
void SetScenarioGroup(char* scenarioGroup, bool toggle);
7 changes: 7 additions & 0 deletions InteriorsV/globals.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#pragma once

#include "types.h"

extern Vector3 playerLoc;
extern Hash doorHash;
extern float distance;
Loading

0 comments on commit 58af2cd

Please sign in to comment.