Bob74 / bob74_ipl

Fix holes and customize the map
https://forum.fivem.net/t/release-fix-holes-in-the-map/25240
MIT License
249 stars 230 forks source link

deactivate ipl in another script #134

Closed alexwilliamlex closed 2 months ago

alexwilliamlex commented 6 months ago

Hello, I'm using the latest version of bob74_ipl I'm using the windows 7290 artifact.

I've created a custom_ipl script in which I've put a fxmanifest that loads client-side test_client.lua I put in this :

Citizen.CreateThread(function()
    HLApartment1 = exports['bob74_ipl']:GetHLApartment1Object()
    HLApartment2 = exports['bob74_ipl']:GetHLApartment2Object()
    HLApartment3 = exports['bob74_ipl']:GetHLApartment3Object()
    HLApartment4 = exports['bob74_ipl']:GetHLApartment4Object()
    HLApartment5 = exports['bob74_ipl']:GetHLApartment5Object()
    HLApartment6 = exports['bob74_ipl']:GetHLApartment6Object()
    GunrunningYacht = exports['bob74_ipl']:GetGunrunningYachtObject()
    HLApartment1.Ipl.Interior.Remove()
    HLApartment2.Ipl.Interior.Remove()
    HLApartment3.Ipl.Interior.Remove()
    HLApartment4.Ipl.Interior.Remove()
    HLApartment5.Ipl.Interior.Remove()
    HLApartment6.Ipl.Interior.Remove()
    HLApartment7.Ipl.Interior.Remove()
    GunrunningYacht.Enable(false)
end)

I'm trying to figure out how to disable some apartments and the yacht with bob74_ipl.

Have a nice day!

custom_ipl.zip

TheIndra55 commented 6 months ago

This code should work, especially for the yacht. Not sure if you can easily remove the interiors since they are already always streamed.

alexwilliamlex commented 6 months ago

Hello @TheIndra55 Unfortunately, even the yoat doesn't work. I haven't touched bob74_ipl, maybe I need to add something to it?

TheIndra55 commented 6 months ago

Code works for me, are you sure you are looking at the right yacht and not running the code too early?

alexwilliamlex commented 6 months ago

So apparently it works, but not on all IPLs. Like apartments, I don't really understand

TheIndra55 commented 2 months ago

The interiors are already loaded by the game, so you can't request or unload them. Honestly unsure why that method even exists.