the framework code is all OPENSOURCE so if you your framework is not here you can still make it work by editing the OPENSOURCE
DEFAULT OPTIONS:- ESX
- QB
The script will choose it automatically
2 - Extra items setup
Config.explosionItems = { ["weapon_stickybomb"] = { damage =7500.0, -- damage to the prop delay =5-- time to explode (seconds) }, ["weapon_grenade"] = { damage =4000.0, delay =5 },} -- if you want to use items for raiding Config.fuelItem ="petrol" ------- choose here the item you want o use as FuelConfig.needCodeLockItem = "codelock" ---- here you can choose an item to be the code lock item, if you keep this as false code lock item will not be necessary
3 - Choosing Target script
The script will choose it automatically
4 - Progress Bar
the Progress Bar code is all OPENSOURCE so if you your progress bar is not here you can still make it work by editing the OPENSOURCE
DEFAULT OPTIONS:- mythic_progbar
- progress bar from QB-CORE
- ox_lib
- esx_progressbar
Config.UseProgressBar =trueorfalse
Progress bar configuration: (example)
The script comes with a lot of progress bar configs for different situations here is just one example, the progress CONFIG is based on mythic_progbar system for progress
MORE INFO HERE: https://github.com/HalCroves/mythic_progbar
Config.ProgressBars = { ["prop_upgrade"] = { ------ the progress bar name (see examples in main_unlocked) duration =5000, ---- duration of the progress bar label ="Upgrading..", ----- label of the progress bar animation = { task ='WORLD_HUMAN_HAMMERING' ---- if you want to use a task animDict =nil, -- if you want to use anim anim =nil, -- if you want to use anim flags =nil, ---- if you want to use flags prop =nil---- if you want to use prop on hand } },},
5 - Tutorial
the tutorial code is all OPENSOURCE
Config.showTutorial =trueorfalse
6 - Blackout and Lights
As this script is usually used in Survival servers, usually people that own this servers use to activate blackout mode, making the lights in the game stop working, by setting this option to true you will make the script simulate light via script, so you can still use lights inside your base with Blackout ON
Config.usingBlackout =true
7 - Routing Buckets
If you want to use Routing Buckets or "dimensions" in your server activate this
Config.explosionItems = { ["weapon_stickybomb"] = { damage =7500.0, -- damage to the prop delay =5-- time to explode (seconds) }, ["weapon_grenade"] = { damage =4000.0, delay =5 },} -- if you want to use items for raiding Config.weaponsDamage = { [`weapon_rpg`] =20000.0} -- if you want to use weapons for raiding you can use this, to choose the damage they give to props
9 - Disable Building Zones
As you probably have zones in your server you don't want people to build in you can setup those zones here:
Config.disableBuildingBlips = { label ="No build Zones", color =1, alpha =128, scale =1.0, sprite =364, shortRange =true} ----------- if you don't want blips just do (Config.disableBuildingBlips = false)Config.disableBuilding = { {coords =vector3(215.578, -1135.859, 29.29675),radius =400.0}, {coords =vector3(111.30, -150.859, 31.0),radius =200.0}} ----------- zones to disable building
10 - Refresh times
Config.refreshTime =300000------ ms (300000ms = 5min)Config.refreshTimeLifeRemove =2.5------ life removed every Config.refreshTime ms (FLOAT VALUE)Config.refreshTimeFuelRemove =1------ fuel removed every Config.refreshTime ms (if ON) (INT VALUE)
11 - Claim Props Type
This Props have two functions:- If you repair them you will repair the all base at once- If you put them on the ground you will Claim for you and your crew a radius of Config.claimPropType[type].radious
Config.claimPropType = { ["foundations"] = {radious =9.0}, ["bigwall"] = {radious =9.0},} ----- props that claim an area, if repaired they repair the all base
12 - How Props Work
EXAMPLE OF A SIMPLE BASE PROP:
["model_doorway_wood"] = { ---- item name item ="model_doorway_wood", --- item name life =10000.0, --- how much health this prop has type ="walls", --- what Type it has subtype ="doorway", --- what subtype it has upgrade =GetHashKey("model_doorway_metal"), ---- what prop you can upgrade this props to crafting = { {name ="wood",count =20}, {name ="nail",count =5}, -- this items will be the items that you will get multiplied by health percentage when removing the prop from the map
-- Will be the items that the scipt will ask you if you want to upgrade another prop to this one-- will be the items you will need to have to be able to fix the props multiplied by (100% - health percentage) } }, ["model_doorway_metal"] = { item ="model_doorway_metal", life =20000.0, type ="walls", subtype ="doorway", crafting = { {name ="metalscrap",count =20} }},
EXAMPLE OF GENERAL PROP WITH FUNCTIONS:
--------- CONFIG PART ---------------------------------------["bkr_prop_biker_campbed_01"] = { item ="bkr_prop_biker_campbed_01", life =10000.0, type ="beds", noFoundationNeed =true, --- if the prop can be put on the map without foundation subtype ="findGroud", ---- this subtype will make the prop stick to the ground position TriggerEvent = { type ="client", --- the event type this prop will call if interact event ="hrs_base_building:Regen", ---- the event this prop wil call if you interact args = {"hrs_base_entity","bed",'health_regen_bed',90}, --- the arguments that will be sent entityAsArg ="hrs_base_entity" --- in the arguments, this word will be replaced by the Entity }, crafting = { {name ="wood",count =20} }, workAsPillar =false, -- if true the prop will be considered as a pillar, usually used for walls needsEletricity =false, -- if you want this prop to need or not eletricty to work disableIteract =false, -- if you want this prop to be interacteable or not noPermission = false, ------ if true, you will be able to interact with this prop even if you are not its owner or part of the owner crew
mapProp = false, ---- if true you can interact with all props with this model that are around the map (like Ymap props)
},------- EVENT EXAMPLE ---------------------AddEventHandler('hrs_base_building:Regen', function(testEnt,type,anim,headingchange)local testEntcoords =GetEntityCoords(testEnt)local heading =GetEntityHeading(testEnt)local pedCoords =GetEntityCoords(PlayerPedId())local myPed =PlayerPedId()local isEmpty =truefor k,v inipairs(GetActivePlayers()) doif myPed ~=GetPlayerPed(v) thenif#(testEntcoords -GetEntityCoords(GetPlayerPed(v))) <1.2then isEmpty =falsebreakendendendif isEmpty thenFreezeEntityPosition(myPed,true)SetEntityCoords(myPed,testEntcoords.x,testEntcoords.y,testEntcoords.z)SetEntityHeading(myPed,heading + headingchange)ifprogressBar(anim) thenSetEntityHealth(myPed,GetEntityMaxHealth(myPed))ShowNotification("Life Regenerated") endSetEntityCoords(myPed,pedCoords.x,pedCoords.y,pedCoords.z)FreezeEntityPosition(myPed,false)elseShowNotification("There is someone else sleeping")endend)
EXAMPLE OF GENERATOR PROP:
['prop_generator_01a'] = { item ="prop_generator_01a", life =20000.0, fuelTank =10.0, ------- how much fuel you can put inside off the generator type ="generator", subtype ="findGroud", crafting = { {name ="metalscrap",count =20} }},
EXAMPLE STORAGES
["prop_box_wood01a"] = { weight =50000, ---- how much weight the storage has item ="prop_box_wood01a", life =10000.0, type ="storages", subtype ="findGroud", slots =50, --- how much slots it has crafting = { {name ="wood",count =20} }},
EXAMPLE LAMPS
['prop_worklight_01a'] = { item ="prop_worklight_01a", life =20000.0, type ="light", subtype ="findGroud", noFoundationNeed =true, zChange =1.80, -------- height of the light position fChange =0.10, -------- front vector change crafting = { {name ="metalscrap",count =5} }},