Skip to content

Bikers: Meth lab

Bob74 edited this page Jan 19, 2019 · 4 revisions

Getting the main object to interact with the interior:

BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()

Coordinates

This interior can be found at:

X Y Z
1009.5 -3196.6 -38.99682

Object structure

BikerMethLab
  +-- interiorId
  +-- Ipl
  |   +-- Interior
  |      +-- ipl
  |      +-- Load()
  |      +-- Remove()
  +-- Style
  |   +-- none
  |   +-- empty
  |   +-- basic
  |   +-- upgrade
  |   +-- Set(style, refresh)
  |   +-- Clear(refresh)
  +-- Security
  |   +-- none
  |   +-- upgrade
  |   +-- Set(security, refresh)
  |   +-- Clear(refresh)
  +-- Details
  |   +-- production
  |   +-- Enable(details, state, refresh)
  +-- LoadDefault()

Interior Ipls

Loading Ipls related files in game:

BikerMethLab.Ipl.Interior.Load()

Removing Ipls from game:

BikerMethLab.Ipl.Interior.Remove()

Style

Setting the meth lab tanks and machinery:

BikerMethLab.Style.Set(style, refresh)
Parameter Description Valid values
style Empty lab BikerMethLab.Style.none
Basic tanks and stuff BikerMethLab.Style.basic
Upgraded tanks and stuff BikerMethLab.Style.upgrade
refresh Refresh the whole interior true or false

Security

Setting the security:

BikerMethLab.Security.Set(security, refresh)
Parameter Description Valid values
security None BikerMethLab.Security.none
Upgraded BikerMethLab.Security.upgrade
refresh Refresh the whole interior true or false

Details

Enable or disable some interior related details:

BikerMethLab.Details.Enable(details, state, refresh)
Parameter Description Valid values
details Meth bags BikerMethLab.Details.production
state Enabled or disabled true or false
refresh Refresh the whole interior true or false

Default values set by bob74_ipl

LoadDefault = function()
    BikerMethLab.Ipl.Interior.Load()
    BikerMethLab.Style.Set(BikerMethLab.Style.empty)
    BikerMethLab.Security.Set(BikerMethLab.Security.none)
    BikerMethLab.Details.Enable(BikerMethLab.Details.production, false)
    RefreshInterior(BikerMethLab.interiorId)
end

Example: How to use in your own resources

You can handle and customize the interiors in your own resources using the exported functions:

Citizen.CreateThread(function()
    -- Getting the object to interact with
    BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()

    -- Setting the style
    BikerMethLab.Style.Set(BikerMethLab.Style.basic)
    
    -- Setting the security
    BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)

    -- Enabling product packages
    BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
        
    -- Refreshing the interior to the see the result
    RefreshInterior(BikerMethLab.interiorId)
end)
Clone this wiki locally