
π§©Props
Adding More PROPS
Adding more props that bars can use is very simple via the
config.luafileTo add another prop that a shop can use you must pass the
shopNameas the key and then customize the values to suit your needsTo add another prop simply add your
shopNameas theykeyand then customize thevaluesto suit your server needs inConfig.Propsplease note some target interactions for props and require args passing with the targetto disable a prop if you are not using that location or that prop then change
Enabled= truetoEnabled = falsethis will then disable that specific prop and will not spawn it
Sometimes props can seem to not appear to spawn where you want them too.
There could be a couple of reasons for this:
The prop model you have used is incorrect or unrecognised
If using custom props ensure these are being streamed in your server correctly and prop names match
Some MLO collisions are scuffed meaning props fall through them due to the native
PlaceObjectOnGroundProperly()being used in this script.
In these cases consider using target zones instead to interact with the specific event you are wanting to use a prop for. You can pass the same data and args to the target table as you would with the props table
Config.Props = {
['Example Shop'] = {
{
Enabled = true,
Model = 'prop_cs_silver_tray',
Coords = vector4(378.68, -827.42, 30.28, 0.0),
Icon = 'fa-solid fa-box',
Label = 'Open Collection Tray',
Job = nil,
Distance = 3.0,
Event = 'lusty94_weedshops:client:OpenTray',
args = { shopName = "Example Shop", storageType = "CollectionTray" }, --[[ β
Make Sure To Pass shopName For storage and the storageType you define in Config.CoreSettings.Stashes]]
},
{
Enabled = true,
Model = 'xm_prop_x17_computer_01',
Coords = vector4(375.65, -824.39, 30.09, 180),
Icon = 'fa-solid fa-box',
Label = 'Open Management Menu',
Job = Config.CoreSettings.Jobs['Example Shop'].name,
Distance = 3.0,
Event = Config.CoreSettings.EventNames.BossMenu,
},
{
Enabled = true,
Model = 'prop_cctv_cont_02',
Coords = vector4(376.87, -824.59, 30.15, 180.0),
Icon = 'fa-solid fa-box',
Label = 'View CCTV',
Job = Config.CoreSettings.Jobs['Example Shop'].name,
Distance = 3.0,
Event = 'lusty94_weedshops:client:OpenCCTVMenu',
args = { shopName = "Example Shop" }, --[[ β
Make Sure To Pass shopName For CCTV MENU]]
},
},
}Some target locations for props and box zones will need argspassing with them for various events to determine which shopis accessing that function
β οΈ The ShopName args must match the ShopName key
Last updated