[Release] [Paid] Dynamic IPL's Loader

Dynamic IPL's Loader (ipls)

Version 0.5.1
Uses Escrow

Using PolyZone and it’s circle/sphere zone, as a dependency, to achieve easy request and removal of ipls.


Dependencies:
PolyZone
mapmanager


Tebex

Tebex Link - Store Offline for now


Example for adding a few ipls’s, included in the script.

-- PDM
-- Added callback to load and unload glass - bool is provided within the called functions internally
AddIpl("shr_int", vector3(-42.72736, -1096.1821, 28.287489), 225, function(bool)
    local active = IsInteriorEntitySetActive(GetInteriorAtCoordsWithType(-38.62, -1099.01, 27.31, "v_carshowroom"), "csr_beforeMission")
    if bool then
        ActivateInteriorEntitySet(GetInteriorAtCoordsWithType(-38.62, -1099.01, 27.31, "v_carshowroom"), "csr_beforeMission")
        ActivateInteriorEntitySet(GetInteriorAtCoordsWithType(-38.62, -1099.01, 27.31, "v_carshowroom"), "shutter_open")
    elseif active then
        DeactivateInteriorEntitySet(GetInteriorAtCoordsWithType(-38.62, -1099.01, 27.31, "v_carshowroom"), "csr_beforeMission")
        DeactivateInteriorEntitySet(GetInteriorAtCoordsWithType(-38.62, -1099.01, 27.31, "v_carshowroom"), "shutter_open")
    end
end)

-- Vangellico
AddIpl("post_hiest_unload", vector3(-624.103, -232.23875, 40.259274))

Functions & Current Exports:

--- add ipl to auto zone itself on "onClientMapStart" event 
---@param name string "The name of the asset"
---@param coords vector3 "The position of the asset in word coordinates vector3()"
---@param radius number "Can be nil, defaults to 250 units, some LOD's might want to be higher, like 500+??"
---#param callback function "add props or other things within the loaded ipl"
function AddIpl(name, coords, radius, callback)

--- get an ipl list
---@param bool boolean "return = true: number of active ipls or false: array of active ipl names"
function GetActiveIpls(bool)

--- get an ipl list
---@param bool boolean "return = true: number of inactive ipls or false: array of inactive ipl names"
function GetInactiveIpls(bool)

--- get an ipl list
---@param bool boolean "return = true: number of inactive ipls  or false: array of inactive ipl names"
function GetZonedIpls(bool)

--- force load the ipl
---@param name string "the name of the ipl"
function ForceLoadIpl(name)

--- force unload the ipl
---@param name string "the name of the ipl"
function ForceUnloadIpl(name)

--- force set a zone for the ipl
---@param name string "the name of the ipl"
function ForceZoneIpl(name)


If your a map maker, its as simple as adding it as a config option and use the export.

As noted above.


Demo Video

Link Here



Current Commands:

if conf.commands then
    RegisterCommand('iplload', function(source, args, rawCommand)
        ForceLoadIpl(args[1])
    end, false)

    RegisterCommand('iplunload', function(source, args, rawCommand)
        ForceUnloadIpl(args[1])
    end, false)

    RegisterCommand('iplzone', function(source, args, rawCommand)
        ForceZoneIpl(args[1])
    end, false)
end


Current features:

Prints loaded and unloaded ipls with simple config file for debugging.

(Mainly for map makers)
Commands to force load, unload and zone an ipl.
Note: iplzone reloads it and it behaves like a normal zone unloading and loading as needed.

Interior Prop loading functions, :white_check_mark:
(Use the callback)

Additional Exports exposing internal lists, :white_check_mark:



Upcoming features:

Adding IPLs via command that are not in the add.lua on "onClientMapStart" event.

Community requests.



Current issues:

Uses "onClientMapStart" to built its tables. So if your testing, after you restart the resource, re-join the server.
If you don’t use mapmanager then make an event using the same name as above.



Last note:

Please feel free to post the IPL’s you use to make it easier for others to add.



Known Bugs:

None? Let me know

Please fund my coffee addiction.

“Paid” … “v0.1.0” :sweat_smile:

2 Likes

This is pathetic. Cheaper to quit coffee.

2 Likes

What is even the point of this crap? GTAV already does that on its own I think.

4 Likes

Just taking a quote from the commenter above you;

So :man_shrugging:

1 Like

My version numbering is for my knowing of where the post is up to or in need of an update.

I thank you three for your posts, I know this is a “what the” moment from the post, but I am also jumping on the “lets test the escrow and paid systems” bandwagon.

It’s $2AUD for a year, I’m sure you’ve seen worse things than this, so please move on.

Updated, Please see amended OP for force loading and unloading of ipls.

so wait this is escrow when this is mentioned i understand that theres time needed for dev work but this is just a blatant moneygrab man? and the argument is that its only two dollars a year? dude wtf

2 Likes

I thank you for the post, resulting in more exposure to this thread.

:man_shrugging:

Updated to 0.3.2

Corrected rezoning areas after removal, was just a typo.
Added additional exports.

Changed price based on feedback to $5 once off.
:man_shrugging:

Definitely, a neat idea to reduce the ammount of interiors loaded and such. I did something similar a long time ago for loading player houses and such.

Anyways I tried to pm you on discord. I’m trying to find out if I have to make zones with polyzones myself I’m pretty sure I just have to make them myself but just want to make sure.

1 Like

As long as you use the AddIpl(name, coords, radius, callback) function or export, it adds the ipl and sets the zone around it, as you enter the radius, it will load the ipl.

So you don’t need to make any zones, it will do it for you.

I’ve had pretty great results with teleporting into coordinates with it being loaded near instantly on teleport, but I assume some potato pc’s will let the player drop through. Have yet to see it reported though.

Alright i figured that out lastnight with the vehicle shop ipl after I had to use the command to loadzone. it does not seems to load them on player join which is weird. Any idea what could be causing this?

edit: So after some actual testing. none of the zones are functional until you use the iplzone command and individually load each zone the first time. and then after a restart you will have to iplzone every one again before they will work

Odd.

Did you load the resource prior to joining the server or were you in the server then started it?

Also from the op.

Uses "onClientMapStart" to built its tables. So if your testing, after you restart the resource, re-join the server.

If you don’t use mapmanager then make an event using the same name as above.

Is the add.lua within the resource empty?

The add.lua has all the example stuff that you had already provided i haven’t touched any of it yet.

And I ensure the resource on server startup.

I’ll double check it on a fresh server in a moment then.

But as it loads, it should work out of the box. I’ll double check the version on the keymaster as well.

I just reuploaded it to the keymaster. Can you try again for me with it?

Might have been an older one on there still. My apologies.

The fxmanifest should be version 0.5.1 or similar.

That might be it cause it seems that I have 0.2.0

Alright, so it seems to be fixed partially. with the new update the pdm ipl loads but none of the others load.

Edit: after more testing and restarting the server a few times. it still seems to be bugged. it won’t load any other zone unless I use the command iplzone and then if the restarts the only ipl that will load and unload after the restart is the last zone I loaded.

Yeah. Something is definitely not right there.

Can you please delete the cached ipls folder on the server, restart and try again?

It works fine on my end.
No other ipl resources running atm?

Im out for the day but feel free to keep posting what you try. Ill review once home and able.