1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-06-10 17:37:12 +02:00
parent 6d90da2841
commit b71b47a9fb
169 changed files with 12687 additions and 2932 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)