diff --git a/resources/np-lost/client.lua b/resources/np-lost/client.lua index 2b79c5b6..c09a07c8 100644 --- a/resources/np-lost/client.lua +++ b/resources/np-lost/client.lua @@ -1,5 +1,5 @@ - -Citizen.CreateThread(function() - BikerClubhouse1.LoadDefault() -end) - + +Citizen.CreateThread(function() + BikerClubhouse1.LoadDefault() +end) + diff --git a/resources/np-lost/dlc_bikers/clubhouse1.lua b/resources/np-lost/dlc_bikers/clubhouse1.lua index 479d380c..388360d4 100644 --- a/resources/np-lost/dlc_bikers/clubhouse1.lua +++ b/resources/np-lost/dlc_bikers/clubhouse1.lua @@ -1,215 +1,215 @@ - --- Clubhouse1: 1107.04, -3157.399, -37.51859 - -exports('GetBikerClubhouse1Object', function() - return BikerClubhouse1 -end) - -BikerClubhouse1 = { - interiorId = GetInteriorAtCoords(114.9445, 3618.368, 39.68667), - Ipl = { - Interior = { - ipl = "bkr_biker_interior_placement_interior_0_biker_dlc_int_01_milo", - Load = function() EnableIpl(BikerClubhouse1.Ipl.Interior.ipl, true) end, - Remove = function() EnableIpl(BikerClubhouse1.Ipl.Interior.ipl, false) end - }, - }, - Walls = { - brick = "walls_01", plain = "walls_02", - Color = { - sable = 0, - yellowGray = 1, - red = 2, - brown = 3, - yellow = 4, - lightYellow = 5, - lightYellowGray = 6, - lightGray = 7, - orange = 8, - gray = 9 - }, - Set = function(walls, color, refresh) - if color == nil then color = 0 end - BikerClubhouse1.Walls.Clear(false) - SetIplPropState(BikerClubhouse1.interiorId, walls, true, refresh) - SetInteriorPropColor(BikerClubhouse1.interiorId, walls, color) - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Walls.brick, BikerClubhouse1.Walls.plain}, false, refresh) - end - }, - Furnitures = { - A = "furnishings_01", B = "furnishings_02", - Set = function(furn, color, refresh) - if color == nil then color = 0 end - BikerClubhouse1.Furnitures.Clear(false) - SetIplPropState(BikerClubhouse1.interiorId, furn, true, refresh) - SetInteriorPropColor(BikerClubhouse1.interiorId, furn, color) - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Furnitures.A, BikerClubhouse1.Furnitures.B}, false, refresh) - end - }, - Decoration = { - A = "decorative_01", B = "decorative_02", - Set = function(deco, refresh) - BikerClubhouse1.Decoration.Clear(false) - SetIplPropState(BikerClubhouse1.interiorId, deco, true, refresh) - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Decoration.A, BikerClubhouse1.Decoration.B}, false, refresh) - end - }, - Mural = { - none = "", rideFree = "mural_01", mods = "mural_02", brave = "mural_03", fist = "mural_04", - forest = "mural_05", mods2 = "mural_06", rideForever = "mural_07", heart = "mural_08", - route68 = "mural_09", - Set = function(mural, refresh) - BikerClubhouse1.Mural.Clear(false) - if mural ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, mural, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Mural.rideFree, BikerClubhouse1.Mural.mods, BikerClubhouse1.Mural.brave, BikerClubhouse1.Mural.fist, - BikerClubhouse1.Mural.forest, BikerClubhouse1.Mural.mods2, BikerClubhouse1.Mural.rideForever, BikerClubhouse1.Mural.heart, BikerClubhouse1.Mural.route68}, false, refresh) - end - }, - GunLocker = { - none = "", on = "gun_locker", off = "no_gun_locker", - Set = function(locker, refresh) - BikerClubhouse1.GunLocker.Clear(false) - if locker ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, locker, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.GunLocker.on, BikerClubhouse1.GunLocker.off}, false, refresh) - end - }, - ModBooth = { - none = "", on = "mod_booth", off = "no_mod_booth", - Set = function(mod, refresh) - BikerClubhouse1.ModBooth.Clear(false) - if mod ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, mod, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.ModBooth.on, BikerClubhouse1.ModBooth.off}, false, refresh) - end - }, - Meth = { - none = "", stage1 = "meth_stash1", stage2 = {"meth_stash1", "meth_stash2"}, stage3 = {"meth_stash1", "meth_stash2", "meth_stash3"}, - Set = function(stage, refresh) - BikerClubhouse1.Meth.Clear(false) - if stage ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Meth.stage1, BikerClubhouse1.Meth.stage2, BikerClubhouse1.Meth.stage3}, false, refresh) - end - }, - Cash = { - none = "", stage1 = "cash_stash1", stage2 = {"cash_stash1", "cash_stash2"}, stage3 = {"cash_stash1", "cash_stash2", "cash_stash3"}, - Set = function(stage, refresh) - BikerClubhouse1.Cash.Clear(false) - if stage ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Cash.stage1, BikerClubhouse1.Cash.stage2, BikerClubhouse1.Cash.stage3}, false, refresh) - end - }, - Weed = { - none = "", stage1 = "weed_stash1", stage2 = {"weed_stash1", "weed_stash2"}, stage3 = {"weed_stash1", "weed_stash2", "weed_stash3"}, - Set = function(stage, refresh) - BikerClubhouse1.Weed.Clear(false) - if stage ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Weed.stage1, BikerClubhouse1.Weed.stage2, BikerClubhouse1.Weed.stage3}, false, refresh) - end - }, - Coke = { - none = "", stage1 = "coke_stash1", stage2 = {"coke_stash1", "coke_stash2"}, stage3 = {"coke_stash1", "coke_stash2", "coke_stash3"}, - Set = function(stage, refresh) - BikerClubhouse1.Coke.Clear(false) - if stage ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Coke.stage1, BikerClubhouse1.Coke.stage2, BikerClubhouse1.Coke.stage3}, false, refresh) - end - }, - Counterfeit = { - none = "", stage1 = "counterfeit_stash1", stage2 = {"counterfeit_stash1", "counterfeit_stash2"}, stage3 = {"counterfeit_stash1", "counterfeit_stash2", "counterfeit_stash3"}, - Set = function(stage, refresh) - BikerClubhouse1.Counterfeit.Clear(false) - if stage ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Counterfeit.stage1, BikerClubhouse1.Counterfeit.stage2, BikerClubhouse1.Counterfeit.stage3}, false, refresh) - end - }, - Documents = { - none = "", stage1 = "id_stash1", stage2 = {"id_stash1", "id_stash2"}, stage3 = {"id_stash1", "id_stash2", "id_stash3"}, - Set = function(stage, refresh) - BikerClubhouse1.Documents.Clear(false) - if stage ~= "" then - SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) - else - if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end - end - end, - Clear = function(refresh) - SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Documents.stage1, BikerClubhouse1.Documents.stage2, BikerClubhouse1.Documents.stage3}, false, refresh) - end - }, - - LoadDefault = function() - BikerClubhouse1.Ipl.Interior.Load() - - BikerClubhouse1.Walls.Set(BikerClubhouse1.Walls.brick, BikerClubhouse1.Walls.Color.lightGray) - - BikerClubhouse1.Furnitures.Set(BikerClubhouse1.Furnitures.A, 3) - BikerClubhouse1.Decoration.Set(BikerClubhouse1.Decoration.A) - BikerClubhouse1.Mural.Set(BikerClubhouse1.Mural.rideForever) - - BikerClubhouse1.ModBooth.Set(BikerClubhouse1.ModBooth.on) - BikerClubhouse1.GunLocker.Set(BikerClubhouse1.GunLocker.on) - - BikerClubhouse1.Meth.Set(BikerClubhouse1.Meth.stage3) - BikerClubhouse1.Cash.Set(BikerClubhouse1.Cash.stage3) - BikerClubhouse1.Coke.Set(BikerClubhouse1.Coke.stage3) - BikerClubhouse1.Weed.Set(BikerClubhouse1.Weed.stage3) - BikerClubhouse1.Counterfeit.Set(BikerClubhouse1.Counterfeit.stage3) - BikerClubhouse1.Documents.Set(BikerClubhouse1.Documents.stage3) - - RefreshInterior(BikerClubhouse1.interiorId) - end -} - + +-- Clubhouse1: 1107.04, -3157.399, -37.51859 + +exports('GetBikerClubhouse1Object', function() + return BikerClubhouse1 +end) + +BikerClubhouse1 = { + interiorId = GetInteriorAtCoords(114.9445, 3618.368, 39.68667), + Ipl = { + Interior = { + ipl = "bkr_biker_interior_placement_interior_0_biker_dlc_int_01_milo", + Load = function() EnableIpl(BikerClubhouse1.Ipl.Interior.ipl, true) end, + Remove = function() EnableIpl(BikerClubhouse1.Ipl.Interior.ipl, false) end + }, + }, + Walls = { + brick = "walls_01", plain = "walls_02", + Color = { + sable = 0, + yellowGray = 1, + red = 2, + brown = 3, + yellow = 4, + lightYellow = 5, + lightYellowGray = 6, + lightGray = 7, + orange = 8, + gray = 9 + }, + Set = function(walls, color, refresh) + if color == nil then color = 0 end + BikerClubhouse1.Walls.Clear(false) + SetIplPropState(BikerClubhouse1.interiorId, walls, true, refresh) + SetInteriorPropColor(BikerClubhouse1.interiorId, walls, color) + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Walls.brick, BikerClubhouse1.Walls.plain}, false, refresh) + end + }, + Furnitures = { + A = "furnishings_01", B = "furnishings_02", + Set = function(furn, color, refresh) + if color == nil then color = 0 end + BikerClubhouse1.Furnitures.Clear(false) + SetIplPropState(BikerClubhouse1.interiorId, furn, true, refresh) + SetInteriorPropColor(BikerClubhouse1.interiorId, furn, color) + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Furnitures.A, BikerClubhouse1.Furnitures.B}, false, refresh) + end + }, + Decoration = { + A = "decorative_01", B = "decorative_02", + Set = function(deco, refresh) + BikerClubhouse1.Decoration.Clear(false) + SetIplPropState(BikerClubhouse1.interiorId, deco, true, refresh) + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Decoration.A, BikerClubhouse1.Decoration.B}, false, refresh) + end + }, + Mural = { + none = "", rideFree = "mural_01", mods = "mural_02", brave = "mural_03", fist = "mural_04", + forest = "mural_05", mods2 = "mural_06", rideForever = "mural_07", heart = "mural_08", + route68 = "mural_09", + Set = function(mural, refresh) + BikerClubhouse1.Mural.Clear(false) + if mural ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, mural, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Mural.rideFree, BikerClubhouse1.Mural.mods, BikerClubhouse1.Mural.brave, BikerClubhouse1.Mural.fist, + BikerClubhouse1.Mural.forest, BikerClubhouse1.Mural.mods2, BikerClubhouse1.Mural.rideForever, BikerClubhouse1.Mural.heart, BikerClubhouse1.Mural.route68}, false, refresh) + end + }, + GunLocker = { + none = "", on = "gun_locker", off = "no_gun_locker", + Set = function(locker, refresh) + BikerClubhouse1.GunLocker.Clear(false) + if locker ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, locker, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.GunLocker.on, BikerClubhouse1.GunLocker.off}, false, refresh) + end + }, + ModBooth = { + none = "", on = "mod_booth", off = "no_mod_booth", + Set = function(mod, refresh) + BikerClubhouse1.ModBooth.Clear(false) + if mod ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, mod, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.ModBooth.on, BikerClubhouse1.ModBooth.off}, false, refresh) + end + }, + Meth = { + none = "", stage1 = "meth_stash1", stage2 = {"meth_stash1", "meth_stash2"}, stage3 = {"meth_stash1", "meth_stash2", "meth_stash3"}, + Set = function(stage, refresh) + BikerClubhouse1.Meth.Clear(false) + if stage ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Meth.stage1, BikerClubhouse1.Meth.stage2, BikerClubhouse1.Meth.stage3}, false, refresh) + end + }, + Cash = { + none = "", stage1 = "cash_stash1", stage2 = {"cash_stash1", "cash_stash2"}, stage3 = {"cash_stash1", "cash_stash2", "cash_stash3"}, + Set = function(stage, refresh) + BikerClubhouse1.Cash.Clear(false) + if stage ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Cash.stage1, BikerClubhouse1.Cash.stage2, BikerClubhouse1.Cash.stage3}, false, refresh) + end + }, + Weed = { + none = "", stage1 = "weed_stash1", stage2 = {"weed_stash1", "weed_stash2"}, stage3 = {"weed_stash1", "weed_stash2", "weed_stash3"}, + Set = function(stage, refresh) + BikerClubhouse1.Weed.Clear(false) + if stage ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Weed.stage1, BikerClubhouse1.Weed.stage2, BikerClubhouse1.Weed.stage3}, false, refresh) + end + }, + Coke = { + none = "", stage1 = "coke_stash1", stage2 = {"coke_stash1", "coke_stash2"}, stage3 = {"coke_stash1", "coke_stash2", "coke_stash3"}, + Set = function(stage, refresh) + BikerClubhouse1.Coke.Clear(false) + if stage ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Coke.stage1, BikerClubhouse1.Coke.stage2, BikerClubhouse1.Coke.stage3}, false, refresh) + end + }, + Counterfeit = { + none = "", stage1 = "counterfeit_stash1", stage2 = {"counterfeit_stash1", "counterfeit_stash2"}, stage3 = {"counterfeit_stash1", "counterfeit_stash2", "counterfeit_stash3"}, + Set = function(stage, refresh) + BikerClubhouse1.Counterfeit.Clear(false) + if stage ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Counterfeit.stage1, BikerClubhouse1.Counterfeit.stage2, BikerClubhouse1.Counterfeit.stage3}, false, refresh) + end + }, + Documents = { + none = "", stage1 = "id_stash1", stage2 = {"id_stash1", "id_stash2"}, stage3 = {"id_stash1", "id_stash2", "id_stash3"}, + Set = function(stage, refresh) + BikerClubhouse1.Documents.Clear(false) + if stage ~= "" then + SetIplPropState(BikerClubhouse1.interiorId, stage, true, refresh) + else + if (refresh) then RefreshInterior(BikerClubhouse1.interiorId) end + end + end, + Clear = function(refresh) + SetIplPropState(BikerClubhouse1.interiorId, {BikerClubhouse1.Documents.stage1, BikerClubhouse1.Documents.stage2, BikerClubhouse1.Documents.stage3}, false, refresh) + end + }, + + LoadDefault = function() + BikerClubhouse1.Ipl.Interior.Load() + + BikerClubhouse1.Walls.Set(BikerClubhouse1.Walls.brick, BikerClubhouse1.Walls.Color.lightGray) + + BikerClubhouse1.Furnitures.Set(BikerClubhouse1.Furnitures.A, 3) + BikerClubhouse1.Decoration.Set(BikerClubhouse1.Decoration.A) + BikerClubhouse1.Mural.Set(BikerClubhouse1.Mural.rideForever) + + BikerClubhouse1.ModBooth.Set(BikerClubhouse1.ModBooth.on) + BikerClubhouse1.GunLocker.Set(BikerClubhouse1.GunLocker.on) + + BikerClubhouse1.Meth.Set(BikerClubhouse1.Meth.stage3) + BikerClubhouse1.Cash.Set(BikerClubhouse1.Cash.stage3) + BikerClubhouse1.Coke.Set(BikerClubhouse1.Coke.stage3) + BikerClubhouse1.Weed.Set(BikerClubhouse1.Weed.stage3) + BikerClubhouse1.Counterfeit.Set(BikerClubhouse1.Counterfeit.stage3) + BikerClubhouse1.Documents.Set(BikerClubhouse1.Documents.stage3) + + RefreshInterior(BikerClubhouse1.interiorId) + end +} + diff --git a/resources/np-lost/fxmanifest.lua b/resources/np-lost/fxmanifest.lua new file mode 100644 index 00000000..2f83b010 --- /dev/null +++ b/resources/np-lost/fxmanifest.lua @@ -0,0 +1,9 @@ +fx_version 'cerulean' +games {'gta5'} + +this_is_a_map 'yes' + +client_script "lib/common.lua" +client_script "client.lua" + +client_script "dlc_bikers/clubhouse1.lua" \ No newline at end of file diff --git a/resources/np-lost/lib/common.lua b/resources/np-lost/lib/common.lua index 4aabf400..9c45060b 100644 --- a/resources/np-lost/lib/common.lua +++ b/resources/np-lost/lib/common.lua @@ -1,201 +1,201 @@ - -exports('EnableIpl', function(ipl, activate) - EnableIpl(ipl, activate) -end) - -exports('GetPedheadshotTexture', function(ped) - return GetPedheadshotTexture(ped) -end) - --- Load or remove IPL(s) -function EnableIpl(ipl, activate) - if IsTable(ipl) then - for key, value in pairs(ipl) do - EnableIpl(value, activate) - end - else - if activate then - if not IsIplActive(ipl) then RequestIpl(ipl) end - else - if IsIplActive(ipl) then RemoveIpl(ipl) end - end - end -end - --- Enable or disable the specified props in an interior -function SetIplPropState(interiorId, props, state, refresh) - if refresh == nil then refresh = false end - if IsTable(interiorId) then - for key, value in pairs(interiorId) do - SetIplPropState(value, props, state, refresh) - end - else - if IsTable(props) then - for key, value in pairs(props) do - SetIplPropState(interiorId, value, state, refresh) - end - else - if state then - if not IsInteriorPropEnabled(interiorId, props) then EnableInteriorProp(interiorId, props) end - else - if IsInteriorPropEnabled(interiorId, props) then DisableInteriorProp(interiorId, props) end - end - end - if refresh == true then RefreshInterior(interiorId) end - end -end - -function CreateNamedRenderTargetForModel(name, model) - local handle = 0 - if not IsNamedRendertargetRegistered(name) then - RegisterNamedRendertarget(name, false) - end - if not IsNamedRendertargetLinked(model) then - LinkNamedRendertarget(model) - end - if IsNamedRendertargetRegistered(name) then - handle = GetNamedRendertargetRenderId(name) - end - - return handle -end - -function DrawEmptyRect(name, model) - local step = 250 - local timeout = 5 * 1000 - local currentTime = 0 - local renderId = CreateNamedRenderTargetForModel(name, model) - - while (not IsNamedRendertargetRegistered(name)) do - Citizen.Wait(step) - currentTime = currentTime + step - if (currentTime >= timeout) then return false end - end - if (IsNamedRendertargetRegistered(name)) then - SetTextRenderId(renderId) - SetUiLayer(4) - DrawRect(0.5, 0.5, 1.0, 1.0, 0, 0, 0, 0) - SetTextRenderId(GetDefaultScriptRendertargetRenderId()) - - ReleaseNamedRendertarget(0, name) - end - - return true -end - ---[[ - TO REMOVE -]]-- -function LoadEmptyScaleform(renderTarget, prop, scaleform, sfFunction) - local renderId = CreateNamedRenderTargetForModel(renderTarget, prop) - local gfxHandle = -1 - - SetTextRenderId(renderId) - SetTextRenderId(GetDefaultScriptRendertargetRenderId()) - - if (scaleform ~= nil) then - gfxHandle = RequestScaleformMovie(scaleform) - end - - if (sfFunction ~= nil) then - BeginScaleformMovieMethod(gfxHandle, sfFunction) - PushScaleformMovieMethodParameterInt(-1) - EndScaleformMovieMethod() - end -end - -function SetupScaleform(movieId, scaleformFunction, parameters) - BeginScaleformMovieMethod(movieId, scaleformFunction) - N_0x77fe3402004cd1b0(name) - if (IsTable(parameters)) then - for i = 0, Tablelength(parameters) - 1 do - local p = parameters["p" .. tostring(i)] - if (p.type == "bool") then - PushScaleformMovieMethodParameterBool(p.value) - elseif (p.type == "int") then - PushScaleformMovieMethodParameterInt(p.value) - elseif (p.type == "float") then - PushScaleformMovieMethodParameterFloat(p.value) - elseif (p.type == "string") then - PushScaleformMovieMethodParameterString(p.value) - elseif (p.type == "buttonName") then - PushScaleformMovieMethodParameterButtonName(p.value) - end - end - end - EndScaleformMovieMethod() - N_0x32f34ff7f617643b(movieId, 1) -end - -function LoadStreamedTextureDict(texturesDict) - local step = 1000 - local timeout = 5 * 1000 - local currentTime = 0 - - RequestStreamedTextureDict(texturesDict, 0) - while not HasStreamedTextureDictLoaded(texturesDict) do - Citizen.Wait(step) - currentTime = currentTime + step - if (currentTime >= timeout) then return false end - end - return true -end - -function LoadScaleform(scaleform) - local step = 1000 - local timeout = 5 * 1000 - local currentTime = 0 - local handle = RequestScaleformMovie(scaleform) - - while (not HasScaleformMovieLoaded(handle)) do - Citizen.Wait(step) - currentTime = currentTime + step - if (currentTime >= timeout) then return -1 end - end - - return handle -end - -function GetPedheadshot(ped) - local step = 1000 - local timeout = 5 * 1000 - local currentTime = 0 - local pedheadshot = RegisterPedheadshot(ped) - - while not IsPedheadshotReady(pedheadshot) do - Citizen.Wait(step) - currentTime = currentTime + step - if (currentTime >= timeout) then return -1 end - end - - return pedheadshot -end - -function GetPedheadshotTexture(ped) - local textureDict = nil - local pedheadshot = GetPedheadshot(ped) - - if (pedheadshot ~= -1) then - textureDict = GetPedheadshotTxdString(pedheadshot) - local IsTextureDictLoaded = LoadStreamedTextureDict(textureDict) - if (not IsTextureDictLoaded) then - Citizen.Trace("ERROR: BikerClubhouseDrawMembers - Textures dictionnary \"" .. tostring(textureDict) .. "\" cannot be loaded.") - end - else - Citizen.Trace("ERROR: BikerClubhouseDrawMembers - PedHeadShot not ready.") - end - - return textureDict -end - --- Check if a variable is a table -function IsTable(T) - return type(T) == 'table' -end --- Return the number of elements of the table -function Tablelength(T) - local count = 0 - for _ in pairs(T) do count = count + 1 end - return count -end - + +exports('EnableIpl', function(ipl, activate) + EnableIpl(ipl, activate) +end) + +exports('GetPedheadshotTexture', function(ped) + return GetPedheadshotTexture(ped) +end) + +-- Load or remove IPL(s) +function EnableIpl(ipl, activate) + if IsTable(ipl) then + for key, value in pairs(ipl) do + EnableIpl(value, activate) + end + else + if activate then + if not IsIplActive(ipl) then RequestIpl(ipl) end + else + if IsIplActive(ipl) then RemoveIpl(ipl) end + end + end +end + +-- Enable or disable the specified props in an interior +function SetIplPropState(interiorId, props, state, refresh) + if refresh == nil then refresh = false end + if IsTable(interiorId) then + for key, value in pairs(interiorId) do + SetIplPropState(value, props, state, refresh) + end + else + if IsTable(props) then + for key, value in pairs(props) do + SetIplPropState(interiorId, value, state, refresh) + end + else + if state then + if not IsInteriorPropEnabled(interiorId, props) then EnableInteriorProp(interiorId, props) end + else + if IsInteriorPropEnabled(interiorId, props) then DisableInteriorProp(interiorId, props) end + end + end + if refresh == true then RefreshInterior(interiorId) end + end +end + +function CreateNamedRenderTargetForModel(name, model) + local handle = 0 + if not IsNamedRendertargetRegistered(name) then + RegisterNamedRendertarget(name, false) + end + if not IsNamedRendertargetLinked(model) then + LinkNamedRendertarget(model) + end + if IsNamedRendertargetRegistered(name) then + handle = GetNamedRendertargetRenderId(name) + end + + return handle +end + +function DrawEmptyRect(name, model) + local step = 250 + local timeout = 5 * 1000 + local currentTime = 0 + local renderId = CreateNamedRenderTargetForModel(name, model) + + while (not IsNamedRendertargetRegistered(name)) do + Citizen.Wait(step) + currentTime = currentTime + step + if (currentTime >= timeout) then return false end + end + if (IsNamedRendertargetRegistered(name)) then + SetTextRenderId(renderId) + SetUiLayer(4) + DrawRect(0.5, 0.5, 1.0, 1.0, 0, 0, 0, 0) + SetTextRenderId(GetDefaultScriptRendertargetRenderId()) + + ReleaseNamedRendertarget(0, name) + end + + return true +end + +--[[ + TO REMOVE +]]-- +function LoadEmptyScaleform(renderTarget, prop, scaleform, sfFunction) + local renderId = CreateNamedRenderTargetForModel(renderTarget, prop) + local gfxHandle = -1 + + SetTextRenderId(renderId) + SetTextRenderId(GetDefaultScriptRendertargetRenderId()) + + if (scaleform ~= nil) then + gfxHandle = RequestScaleformMovie(scaleform) + end + + if (sfFunction ~= nil) then + BeginScaleformMovieMethod(gfxHandle, sfFunction) + PushScaleformMovieMethodParameterInt(-1) + EndScaleformMovieMethod() + end +end + +function SetupScaleform(movieId, scaleformFunction, parameters) + BeginScaleformMovieMethod(movieId, scaleformFunction) + N_0x77fe3402004cd1b0(name) + if (IsTable(parameters)) then + for i = 0, Tablelength(parameters) - 1 do + local p = parameters["p" .. tostring(i)] + if (p.type == "bool") then + PushScaleformMovieMethodParameterBool(p.value) + elseif (p.type == "int") then + PushScaleformMovieMethodParameterInt(p.value) + elseif (p.type == "float") then + PushScaleformMovieMethodParameterFloat(p.value) + elseif (p.type == "string") then + PushScaleformMovieMethodParameterString(p.value) + elseif (p.type == "buttonName") then + PushScaleformMovieMethodParameterButtonName(p.value) + end + end + end + EndScaleformMovieMethod() + N_0x32f34ff7f617643b(movieId, 1) +end + +function LoadStreamedTextureDict(texturesDict) + local step = 1000 + local timeout = 5 * 1000 + local currentTime = 0 + + RequestStreamedTextureDict(texturesDict, 0) + while not HasStreamedTextureDictLoaded(texturesDict) do + Citizen.Wait(step) + currentTime = currentTime + step + if (currentTime >= timeout) then return false end + end + return true +end + +function LoadScaleform(scaleform) + local step = 1000 + local timeout = 5 * 1000 + local currentTime = 0 + local handle = RequestScaleformMovie(scaleform) + + while (not HasScaleformMovieLoaded(handle)) do + Citizen.Wait(step) + currentTime = currentTime + step + if (currentTime >= timeout) then return -1 end + end + + return handle +end + +function GetPedheadshot(ped) + local step = 1000 + local timeout = 5 * 1000 + local currentTime = 0 + local pedheadshot = RegisterPedheadshot(ped) + + while not IsPedheadshotReady(pedheadshot) do + Citizen.Wait(step) + currentTime = currentTime + step + if (currentTime >= timeout) then return -1 end + end + + return pedheadshot +end + +function GetPedheadshotTexture(ped) + local textureDict = nil + local pedheadshot = GetPedheadshot(ped) + + if (pedheadshot ~= -1) then + textureDict = GetPedheadshotTxdString(pedheadshot) + local IsTextureDictLoaded = LoadStreamedTextureDict(textureDict) + if (not IsTextureDictLoaded) then + Citizen.Trace("ERROR: BikerClubhouseDrawMembers - Textures dictionnary \"" .. tostring(textureDict) .. "\" cannot be loaded.") + end + else + Citizen.Trace("ERROR: BikerClubhouseDrawMembers - PedHeadShot not ready.") + end + + return textureDict +end + +-- Check if a variable is a table +function IsTable(T) + return type(T) == 'table' +end +-- Return the number of elements of the table +function Tablelength(T) + local count = 0 + for _ in pairs(T) do count = count + 1 end + return count +end + diff --git a/resources/np-lost/stream/_manifest.ymf b/resources/np-lost/stream/_manifest.ymf new file mode 100644 index 00000000..5a783ea2 Binary files /dev/null and b/resources/np-lost/stream/_manifest.ymf differ diff --git a/resources/np-lost/stream/biker_dlc_new.ytyp b/resources/np-lost/stream/biker_dlc_new.ytyp new file mode 100644 index 00000000..7b4e0505 Binary files /dev/null and b/resources/np-lost/stream/biker_dlc_new.ytyp differ diff --git a/resources/np-lost/stream/bkr_biker_dlc_int_01.ybn b/resources/np-lost/stream/bkr_biker_dlc_int_01.ybn new file mode 100644 index 00000000..135fa411 Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_dlc_int_01.ybn differ diff --git a/resources/np-lost/stream/bkr_biker_dlc_int_01.ytyp b/resources/np-lost/stream/bkr_biker_dlc_int_01.ytyp new file mode 100644 index 00000000..f53bb9fa Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_dlc_int_01.ytyp differ diff --git a/resources/np-lost/stream/bkr_biker_dlc_int_room.ytyp b/resources/np-lost/stream/bkr_biker_dlc_int_room.ytyp new file mode 100644 index 00000000..ce6ec528 Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_dlc_int_room.ytyp differ diff --git a/resources/np-lost/stream/bkr_biker_dlc_int_room_milo_.ymap b/resources/np-lost/stream/bkr_biker_dlc_int_room_milo_.ymap new file mode 100644 index 00000000..492fb668 Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_dlc_int_room_milo_.ymap differ diff --git a/resources/np-lost/stream/bkr_biker_front_stairs.ydr b/resources/np-lost/stream/bkr_biker_front_stairs.ydr new file mode 100644 index 00000000..780f0134 Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_front_stairs.ydr differ diff --git a/resources/np-lost/stream/bkr_biker_hq_stab_city.ymap b/resources/np-lost/stream/bkr_biker_hq_stab_city.ymap new file mode 100644 index 00000000..912e4e45 Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_hq_stab_city.ymap differ diff --git a/resources/np-lost/stream/bkr_biker_int01_shell.ydr b/resources/np-lost/stream/bkr_biker_int01_shell.ydr new file mode 100644 index 00000000..53818cc1 Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_int01_shell.ydr differ diff --git a/resources/np-lost/stream/bkr_biker_interior_placement_interior_0_biker_dlc_int_01_np_milo_.ymap b/resources/np-lost/stream/bkr_biker_interior_placement_interior_0_biker_dlc_int_01_np_milo_.ymap new file mode 100644 index 00000000..96fd8b4e Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_interior_placement_interior_0_biker_dlc_int_01_np_milo_.ymap differ diff --git a/resources/np-lost/stream/bkr_biker_ramp.ydr b/resources/np-lost/stream/bkr_biker_ramp.ydr new file mode 100644 index 00000000..54f193f3 Binary files /dev/null and b/resources/np-lost/stream/bkr_biker_ramp.ydr differ diff --git a/resources/np-lost/stream/bkr_bkr01_entcables01.ydr b/resources/np-lost/stream/bkr_bkr01_entcables01.ydr new file mode 100644 index 00000000..205d4654 Binary files /dev/null and b/resources/np-lost/stream/bkr_bkr01_entcables01.ydr differ diff --git a/resources/np-lost/stream/bkr_flag01.ydr b/resources/np-lost/stream/bkr_flag01.ydr new file mode 100644 index 00000000..c9e1ccbc Binary files /dev/null and b/resources/np-lost/stream/bkr_flag01.ydr differ diff --git a/resources/np-lost/stream/bkr_int01_cm3dirtfloor.ydr b/resources/np-lost/stream/bkr_int01_cm3dirtfloor.ydr new file mode 100644 index 00000000..1f03fda9 Binary files /dev/null and b/resources/np-lost/stream/bkr_int01_cm3dirtfloor.ydr differ diff --git a/resources/np-lost/stream/bkr_int01_plancables01.ydr b/resources/np-lost/stream/bkr_int01_plancables01.ydr new file mode 100644 index 00000000..2f21241c Binary files /dev/null and b/resources/np-lost/stream/bkr_int01_plancables01.ydr differ diff --git a/resources/np-lost/stream/bkr_int01_posters_front1.ydr b/resources/np-lost/stream/bkr_int01_posters_front1.ydr new file mode 100644 index 00000000..cb409f5a Binary files /dev/null and b/resources/np-lost/stream/bkr_int01_posters_front1.ydr differ diff --git a/resources/np-lost/stream/bkr_int_01_plan_walls01.ydr b/resources/np-lost/stream/bkr_int_01_plan_walls01.ydr new file mode 100644 index 00000000..5bb82bf3 Binary files /dev/null and b/resources/np-lost/stream/bkr_int_01_plan_walls01.ydr differ diff --git a/resources/np-lost/stream/bkr_prop_memorial_wall_01a.ydr b/resources/np-lost/stream/bkr_prop_memorial_wall_01a.ydr new file mode 100644 index 00000000..4a49e42d Binary files /dev/null and b/resources/np-lost/stream/bkr_prop_memorial_wall_01a.ydr differ diff --git a/resources/np-lost/stream/bkr_prop_rt_clubhouse_table.ydr b/resources/np-lost/stream/bkr_prop_rt_clubhouse_table.ydr new file mode 100644 index 00000000..2bc19c12 Binary files /dev/null and b/resources/np-lost/stream/bkr_prop_rt_clubhouse_table.ydr differ diff --git a/resources/np-lost/stream/bkr_prop_rt_memorial_active_01.ydr b/resources/np-lost/stream/bkr_prop_rt_memorial_active_01.ydr new file mode 100644 index 00000000..303c14de Binary files /dev/null and b/resources/np-lost/stream/bkr_prop_rt_memorial_active_01.ydr differ diff --git a/resources/np-lost/stream/bkr_prop_rt_memorial_active_02.ydr b/resources/np-lost/stream/bkr_prop_rt_memorial_active_02.ydr new file mode 100644 index 00000000..14f30f0f Binary files /dev/null and b/resources/np-lost/stream/bkr_prop_rt_memorial_active_02.ydr differ diff --git a/resources/np-lost/stream/bkr_prop_rt_memorial_active_03.ydr b/resources/np-lost/stream/bkr_prop_rt_memorial_active_03.ydr new file mode 100644 index 00000000..dfb811f2 Binary files /dev/null and b/resources/np-lost/stream/bkr_prop_rt_memorial_active_03.ydr differ diff --git a/resources/np-lost/stream/bkr_prop_rt_memorial_president.ydr b/resources/np-lost/stream/bkr_prop_rt_memorial_president.ydr new file mode 100644 index 00000000..342e837b Binary files /dev/null and b/resources/np-lost/stream/bkr_prop_rt_memorial_president.ydr differ diff --git a/resources/np-lost/stream/bkr_prop_rt_memorial_vice_pres.ydr b/resources/np-lost/stream/bkr_prop_rt_memorial_vice_pres.ydr new file mode 100644 index 00000000..54355022 Binary files /dev/null and b/resources/np-lost/stream/bkr_prop_rt_memorial_vice_pres.ydr differ diff --git a/resources/np-lost/stream/bkr_rec_walls01.ydr b/resources/np-lost/stream/bkr_rec_walls01.ydr new file mode 100644 index 00000000..d67959ed Binary files /dev/null and b/resources/np-lost/stream/bkr_rec_walls01.ydr differ diff --git a/resources/np-lost/stream/bkr_recdecs01.ydr b/resources/np-lost/stream/bkr_recdecs01.ydr new file mode 100644 index 00000000..91b6a1b0 Binary files /dev/null and b/resources/np-lost/stream/bkr_recdecs01.ydr differ diff --git a/resources/np-lost/stream/cs2_03_barn03_new.ydr b/resources/np-lost/stream/cs2_03_barn03_new.ydr new file mode 100644 index 00000000..17e2d211 Binary files /dev/null and b/resources/np-lost/stream/cs2_03_barn03_new.ydr differ diff --git a/resources/np-lost/stream/cs2_03_barn03_new_details.ydr b/resources/np-lost/stream/cs2_03_barn03_new_details.ydr new file mode 100644 index 00000000..e6d466cc Binary files /dev/null and b/resources/np-lost/stream/cs2_03_barn03_new_details.ydr differ diff --git a/resources/np-lost/stream/cs3_04_trailer_2_slod_children.ydd b/resources/np-lost/stream/cs3_04_trailer_2_slod_children.ydd new file mode 100644 index 00000000..3e73eeea Binary files /dev/null and b/resources/np-lost/stream/cs3_04_trailer_2_slod_children.ydd differ diff --git a/resources/np-lost/stream/cs3_lod_10_slod2_children.ydd b/resources/np-lost/stream/cs3_lod_10_slod2_children.ydd new file mode 100644 index 00000000..36a9a37d Binary files /dev/null and b/resources/np-lost/stream/cs3_lod_10_slod2_children.ydd differ diff --git a/resources/np-lost/stream/door_lod_lost.ydr b/resources/np-lost/stream/door_lod_lost.ydr new file mode 100644 index 00000000..ad201320 Binary files /dev/null and b/resources/np-lost/stream/door_lod_lost.ydr differ diff --git a/resources/np-lost/stream/hei_cs3_04.ymap b/resources/np-lost/stream/hei_cs3_04.ymap new file mode 100644 index 00000000..bc5ba76b Binary files /dev/null and b/resources/np-lost/stream/hei_cs3_04.ymap differ diff --git a/resources/np-lost/stream/hei_cs3_04_1.ybn b/resources/np-lost/stream/hei_cs3_04_1.ybn new file mode 100644 index 00000000..22802d02 Binary files /dev/null and b/resources/np-lost/stream/hei_cs3_04_1.ybn differ diff --git a/resources/np-lost/stream/hei_cs3_04_2.ybn b/resources/np-lost/stream/hei_cs3_04_2.ybn new file mode 100644 index 00000000..bc5af0ef Binary files /dev/null and b/resources/np-lost/stream/hei_cs3_04_2.ybn differ diff --git a/resources/np-lost/stream/hei_cs3_04_4.ybn b/resources/np-lost/stream/hei_cs3_04_4.ybn new file mode 100644 index 00000000..5ff58405 Binary files /dev/null and b/resources/np-lost/stream/hei_cs3_04_4.ybn differ diff --git a/resources/np-lost/stream/hei_cs3_04_critical_0.ymap b/resources/np-lost/stream/hei_cs3_04_critical_0.ymap new file mode 100644 index 00000000..b3263787 Binary files /dev/null and b/resources/np-lost/stream/hei_cs3_04_critical_0.ymap differ diff --git a/resources/np-lost/stream/hei_cs3_04_long_0.ymap b/resources/np-lost/stream/hei_cs3_04_long_0.ymap new file mode 100644 index 00000000..bbbf7fbf Binary files /dev/null and b/resources/np-lost/stream/hei_cs3_04_long_0.ymap differ diff --git a/resources/np-lost/stream/hei_cs3_04_strm_5.ymap b/resources/np-lost/stream/hei_cs3_04_strm_5.ymap new file mode 100644 index 00000000..d1e13b9d Binary files /dev/null and b/resources/np-lost/stream/hei_cs3_04_strm_5.ymap differ diff --git a/resources/np-lost/stream/v_biker_room.ybn b/resources/np-lost/stream/v_biker_room.ybn new file mode 100644 index 00000000..61c433af Binary files /dev/null and b/resources/np-lost/stream/v_biker_room.ybn differ diff --git a/resources/np-lost/stream/v_ilev_carmod3door_lod.ydr b/resources/np-lost/stream/v_ilev_carmod3door_lod.ydr new file mode 100644 index 00000000..38dc9c03 Binary files /dev/null and b/resources/np-lost/stream/v_ilev_carmod3door_lod.ydr differ