0.0.1
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
local _scanDelay = 500
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
Global.currentInteriorId = GetInteriorFromEntity(PlayerPedId())
|
||||
|
||||
if Global.currentInteriorId == 0 then
|
||||
Global.ResetInteriorVariables()
|
||||
else
|
||||
-- Setting variables
|
||||
|
||||
-- GTA Online
|
||||
Global.Online.isInsideApartmentHi1 = (Global.currentInteriorId == GTAOApartmentHi1.interiorId)
|
||||
Global.Online.isInsideApartmentHi2 = (Global.currentInteriorId == GTAOApartmentHi2.interiorId)
|
||||
Global.Online.isInsideHouseHi1 = (Global.currentInteriorId == GTAOHouseHi1.interiorId)
|
||||
Global.Online.isInsideHouseHi2 = (Global.currentInteriorId == GTAOHouseHi2.interiorId)
|
||||
Global.Online.isInsideHouseHi3 = (Global.currentInteriorId == GTAOHouseHi3.interiorId)
|
||||
Global.Online.isInsideHouseHi4 = (Global.currentInteriorId == GTAOHouseHi4.interiorId)
|
||||
Global.Online.isInsideHouseHi5 = (Global.currentInteriorId == GTAOHouseHi5.interiorId)
|
||||
Global.Online.isInsideHouseHi6 = (Global.currentInteriorId == GTAOHouseHi6.interiorId)
|
||||
Global.Online.isInsideHouseHi7 = (Global.currentInteriorId == GTAOHouseHi7.interiorId)
|
||||
Global.Online.isInsideHouseHi8 = (Global.currentInteriorId == GTAOHouseHi8.interiorId)
|
||||
Global.Online.isInsideHouseLow1 = (Global.currentInteriorId == GTAOHouseLow1.interiorId)
|
||||
Global.Online.isInsideHouseMid1 = (Global.currentInteriorId == GTAOHouseMid1.interiorId)
|
||||
|
||||
-- DLC: High life
|
||||
Global.HighLife.isInsideApartment1 = (Global.currentInteriorId == HLApartment1.interiorId)
|
||||
Global.HighLife.isInsideApartment2 = (Global.currentInteriorId == HLApartment2.interiorId)
|
||||
Global.HighLife.isInsideApartment3 = (Global.currentInteriorId == HLApartment3.interiorId)
|
||||
Global.HighLife.isInsideApartment4 = (Global.currentInteriorId == HLApartment4.interiorId)
|
||||
Global.HighLife.isInsideApartment5 = (Global.currentInteriorId == HLApartment5.interiorId)
|
||||
Global.HighLife.isInsideApartment6 = (Global.currentInteriorId == HLApartment6.interiorId)
|
||||
|
||||
-- DLC: Bikers - Clubhouses
|
||||
Global.Biker.isInsideClubhouse1 = (Global.currentInteriorId == BikerClubhouse1.interiorId)
|
||||
Global.Biker.isInsideClubhouse2 = (Global.currentInteriorId == BikerClubhouse2.interiorId)
|
||||
|
||||
-- DLC: Finance & Felony - Offices
|
||||
Global.FinanceOffices.isInsideOffice1 = (Global.currentInteriorId == FinanceOffice1.currentInteriorId)
|
||||
Global.FinanceOffices.isInsideOffice2 = (Global.currentInteriorId == FinanceOffice2.currentInteriorId)
|
||||
Global.FinanceOffices.isInsideOffice3 = (Global.currentInteriorId == FinanceOffice3.currentInteriorId)
|
||||
Global.FinanceOffices.isInsideOffice4 = (Global.currentInteriorId == FinanceOffice4.currentInteriorId)
|
||||
|
||||
-- DLC: The Contract
|
||||
Global.Security.isInsideOffice1 = (Global.currentInteriorId == MpSecurityOffice1.InteriorId)
|
||||
Global.Security.isInsideOffice2 = (Global.currentInteriorId == MpSecurityOffice2.InteriorId)
|
||||
Global.Security.isInsideOffice3 = (Global.currentInteriorId == MpSecurityOffice3.InteriorId)
|
||||
Global.Security.isInsideOffice4 = (Global.currentInteriorId == MpSecurityOffice4.InteriorId)
|
||||
end
|
||||
|
||||
Wait(_scanDelay)
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,45 @@
|
||||
local _scanDelay = 1000
|
||||
|
||||
-- The mansions have broken LODs for the enterable version, so cull the generic version when not close by
|
||||
local _mansions = {
|
||||
{
|
||||
coords = vector3(543.852, 712.754, 201.0),
|
||||
ipl = "apa_ch2_04_mansion_generic"
|
||||
},
|
||||
{
|
||||
coords = vector3(-1630.434, 470.852, 128.0),
|
||||
ipl = "hei_ch1_06e_mansion_generic"
|
||||
},
|
||||
{
|
||||
coords = vector3(-2601.712, 1874.826, 166.0),
|
||||
ipl = "hei_ch1_09_mansion_generic"
|
||||
}
|
||||
}
|
||||
|
||||
CreateThread(function()
|
||||
if GetGameBuildNumber() < 3717 then
|
||||
return
|
||||
end
|
||||
|
||||
while true do
|
||||
local coords = GetEntityCoords(PlayerPedId())
|
||||
|
||||
for _, mansion in ipairs(_mansions) do
|
||||
local close = #(coords - mansion.coords) < 200
|
||||
|
||||
EnableIpl(mansion.ipl, not close)
|
||||
end
|
||||
|
||||
Wait(_scanDelay)
|
||||
end
|
||||
end)
|
||||
|
||||
-- CreateThread(function()
|
||||
-- while true do
|
||||
-- for _, mansion in ipairs(_mansions) do
|
||||
-- DrawGlowSphere(mansion.coords, 200.0, 0, 0, 255, 0.2, false, true)
|
||||
-- end
|
||||
|
||||
-- Wait(0)
|
||||
-- end
|
||||
-- end)
|
||||
@@ -0,0 +1,35 @@
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local sleep = 500
|
||||
|
||||
if Global.Security.isInsideOffice1 or Global.Security.isInsideOffice2 or Global.Security.isInsideOffice3 or Global.Security.isInsideOffice4 then
|
||||
sleep = 0
|
||||
|
||||
if Global.Security.isInsideOffice1 then
|
||||
EnableExteriorCullModelThisFrame(`bh1_05_build1`)
|
||||
EnableExteriorCullModelThisFrame(`bh1_05_em`)
|
||||
end
|
||||
|
||||
if Global.Security.isInsideOffice2 then
|
||||
EnableExteriorCullModelThisFrame(`hei_hw1_08_hotplaz01`)
|
||||
EnableExteriorCullModelThisFrame(`hw1_08_hotplaz_rail`)
|
||||
EnableExteriorCullModelThisFrame(`hw1_08_emissive_c`)
|
||||
end
|
||||
|
||||
if Global.Security.isInsideOffice3 then
|
||||
EnableExteriorCullModelThisFrame(`hei_kt1_05_01`)
|
||||
EnableExteriorCullModelThisFrame(`kt1_05_glue_b`)
|
||||
EnableExteriorCullModelThisFrame(`kt1_05_kt_emissive_kt1_05`)
|
||||
end
|
||||
|
||||
if Global.Security.isInsideOffice4 then
|
||||
EnableExteriorCullModelThisFrame(`hei_kt1_08_buildingtop_a`)
|
||||
EnableExteriorCullModelThisFrame(`hei_kt1_08_kt1_emissive_ema`)
|
||||
end
|
||||
|
||||
DisableOcclusionThisFrame()
|
||||
end
|
||||
|
||||
Wait(sleep)
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,47 @@
|
||||
-- Delay between each attempt to open/close the doors corresponding to their state
|
||||
local _scanDelay = 500
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local office = 0
|
||||
|
||||
-- Search for the current office to open/close the safes doors
|
||||
if Global.FinanceOffices.isInsideOffice1 then
|
||||
office = FinanceOffice1
|
||||
elseif Global.FinanceOffices.isInsideOffice2 then
|
||||
office = FinanceOffice2
|
||||
elseif Global.FinanceOffices.isInsideOffice3 then
|
||||
office = FinanceOffice3
|
||||
elseif Global.FinanceOffices.isInsideOffice4 then
|
||||
office = FinanceOffice4
|
||||
end
|
||||
|
||||
if office ~= 0 then
|
||||
-- Office found, let's check the doors
|
||||
|
||||
-- Check left door
|
||||
doorHandle = office.Safe.GetDoorHandle(office.currentSafeDoors.hashL)
|
||||
|
||||
if doorHandle ~= 0 then
|
||||
if office.Safe.isLeftDoorOpen then
|
||||
office.Safe.SetDoorState("left", true)
|
||||
else
|
||||
office.Safe.SetDoorState("left", false)
|
||||
end
|
||||
end
|
||||
|
||||
-- Check right door
|
||||
doorHandle = office.Safe.GetDoorHandle(office.currentSafeDoors.hashR)
|
||||
|
||||
if doorHandle ~= 0 then
|
||||
if office.Safe.isRightDoorOpen then
|
||||
office.Safe.SetDoorState("right", true)
|
||||
else
|
||||
office.Safe.SetDoorState("right", false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Wait(_scanDelay)
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user