Gunrunning: Bunkers - Bob74/bob74_ipl GitHub Wiki
Getting the main object to interact with the interior:
GunrunningBunker = exports['bob74_ipl']:GetGunrunningBunkerObject()
Coordinates
This interior can be found at:
X | Y | Z | |
---|---|---|---|
Interior | 892.6384 | -3245.8664 | -98.2645 |
Desert | 848.6175 | 2996.567 | 45.81612 |
Smoke tree road | 2126.785 | 3335.04 | 48.21422 |
Scrapyard | 2493.654 | 3140.399 | 51.28789 |
Oil fields | 481.0465 | 2995.135 | 43.96672 |
Raton canyon | -391.3216 | 4363.728 | 58.65862 |
Grapeseed | 1823.961 | 4708.14 | 42.4991 |
Farmhouse | 1570.372 | 2254.549 | 78.89397 |
Paletto | -783.0755 | 5934.686 | 24.31475 |
Route 68 | 24.43542 | 2959.705 | 58.35517 |
Zancudo | -3058.714 | 3329.19 | 12.5844 |
Great ocean highway | -3180.466 | 1374.192 | 19.9597 |
Object structure
GunrunningBunker
+-- interiorId
+-- Ipl
| +-- Interior
| +-- ipl
| +-- Load()
| +-- Remove()
| +-- Exterior
| +-- ipl
| +-- Load()
| +-- Remove()
+-- Style
| +-- default
| +-- blue
| +-- yellow
| +-- Set(style, refresh)
| +-- Clear(refresh)
+-- Tier
| +-- default
| +-- upgrade
| +-- Set(tier, refresh)
| +-- Clear(refresh)
+-- Security
| +-- default
| +-- upgrade
| +-- Set(security, refresh)
| +-- Clear(refresh)
+-- Details
| +-- office
| +-- OfficeLocked
| +-- locker
| +-- rangeLights
| +-- rangeWall
| +-- rangeLocked
| +-- schematics
| +-- Enable(details, state, refresh)
+-- LoadDefault()
Interior Ipls
Loading Ipls related files in game:
GunrunningBunker.Ipl.Interior.Load()
Removing Ipls from game:
GunrunningBunker.Ipl.Interior.Remove()
Exterior Ipls
Loading Ipls related files in game:
GunrunningBunker.Ipl.Exterior.Load()
Removing Ipls from game:
GunrunningBunker.Ipl.Exterior.Remove()
Style
Setting the interior's style:
GunrunningBunker.Style.Set(style, refresh)
Parameter | Description | Valid values |
---|---|---|
style | Concrete interior | GunrunningBunker.Style.default |
Blue style | GunrunningBunker.Style.blue |
|
Yellow style | GunrunningBunker.Style.yellow |
|
refresh | Refresh the whole interior | true or false |
Tier
Setting the tier of the bunker (default or upgraded):
GunrunningBunker.Tier.Set(tier, refresh)
Parameter | Description | Valid values |
---|---|---|
tier | Default | GunrunningBunker.Tier.default |
Upgraded | GunrunningBunker.Tier.upgrade |
|
refresh | Refresh the whole interior | true or false |
Security
Setting the security level of the bunker (default or upgraded):
GunrunningBunker.Security.Set(security, refresh)
Parameter | Description | Valid values |
---|---|---|
security | No entry gate | GunrunningBunker.Security.noEntryGate |
Default | GunrunningBunker.Security.default |
|
Upgraded | GunrunningBunker.Security.upgrade |
|
refresh | Refresh the whole interior | true or false |
Details
Enable or disable some interior related details:
GunrunningBunker.Details.Enable(details, state, refresh)
Parameter | Description | Valid values |
---|---|---|
details | Office interior | GunrunningBunker.Details.office |
Metal door blocking access to the office | GunrunningBunker.Details.officeLocked |
|
Locker next to the office door | GunrunningBunker.Details.locker |
|
Lights next to the shooting range | GunrunningBunker.Details.rangeLights |
|
Wall blocking access to the shooting range | GunrunningBunker.Details.rangeWall |
|
Metal door blocking access to the shooting range | GunrunningBunker.Details.rangeLocked |
|
Gun schematic on the table and whiteboard | GunrunningBunker.Details.schematics |
|
state | Enabled or disabled | true or false |
refresh | Refresh the whole interior | true or false |
bob74_ipl
Default values set by LoadDefault = function()
GunrunningBunker.Ipl.Interior.Load()
GunrunningBunker.Ipl.Exterior.Load()
GunrunningBunker.Style.Set(GunrunningBunker.Style.default)
GunrunningBunker.Tier.Set(GunrunningBunker.Tier.default)
GunrunningBunker.Security.Set(GunrunningBunker.Security.default)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.office, true)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.officeLocked, false)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.locker, true)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.rangeLights, true)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.rangeWall, false)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.rangeLocked, false)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.schematics, false)
RefreshInterior(GunrunningBunker.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
GunrunningBunker = exports['bob74_ipl']:GetGunrunningBunkerObject()
-- Yellow style interior
GunrunningBunker.Style.Set(GunrunningBunker.Style.yellow)
-- Upgraded tier
GunrunningBunker.Tier.Set(GunrunningBunker.Tier.upgrade)
-- Upgraded security
GunrunningBunker.Security.Set(GunrunningBunker.Security.upgrade)
-- No office
GunrunningBunker.Details.Enable(GunrunningBunker.Details.office, false)
-- Office is blocked
GunrunningBunker.Details.Enable(GunrunningBunker.Details.officeLocked, true)
-- Locker next to the office door
GunrunningBunker.Details.Enable(GunrunningBunker.Details.locker, true)
-- No shooting range
GunrunningBunker.Details.Enable(GunrunningBunker.Details.rangeLights, false)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.rangeWall, true)
GunrunningBunker.Details.Enable(GunrunningBunker.Details.rangeLocked, true)
-- Schematics on the table
GunrunningBunker.Details.Enable(GunrunningBunker.Details.schematics, false)
-- Must be called in order to spawn or remove the props
RefreshInterior(GunrunningBunker.interiorId)
end)