-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase6.lua
71 lines (69 loc) · 5.43 KB
/
base6.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
local objects =
{
createObject(10828,1459.0000000,1796.7002000,22.1000000,0.0000000,0.0000000,0.0000000,1), --object(drydock1_sfse,1), (1,1),
createObject(10828,1479.5996000,1796.7998000,22.1000000,0.0000000,0.0000000,0.0000000,1), --object(drydock1_sfse,1), (2,1),
createObject(10828,1443.0996000,1746.7002000,22.1000000,0.0000000,0.0000000,90.0000000,1), --object(drydock1_sfse,1), (5,1),
createObject(10828,1480.7998000,1731.4004000,22.1000000,0.0000000,0.0000000,1.9950000,1), --object(drydock1_sfse,1), (7,1),
createObject(10828,1496.0000000,1780.5000000,22.1000000,0.0000000,0.0000000,270.0000000,1), --object(drydock1_sfse,1), (8,1),
createObject(10828,1496.0000000,1748.2002000,22.1000000,0.0000000,0.0000000,270.0000000,1), --object(drydock1_sfse,1), (9,1),
createObject(10828,1443.0000000,1780.5996000,22.1000000,0.0000000,0.0000000,90.0000000,1), --object(drydock1_sfse,1), (15,1),
createObject(10828,1459.7002000,1730.7002000,22.1000000,0.0000000,0.0000000,2.0000000,1), --object(drydock1_sfse,1), (25,1),
createObject(18284,1449.5000000,1741.6000000,13.0000000,0.0000000,0.0000000,0.0000000,1), --object(cw_tscanopy,1), (1,1),
createObject(18284,1449.5000000,1758.0000000,13.0200000,0.0000000,0.0000000,0.0000000,1), --object(cw_tscanopy,1), (2,1),
createObject(14524,1493.2998000,1736.0000000,10.6000000,0.0000000,0.0000000,0.0000000,1), --object(im_couchsa,1), (1,1),
createObject(1742,1495.0000000,1742.7002000,10.1000000,0.0000000,0.0000000,270.0000000,1), --object(med_bookshelf,1), (1,1),
createObject(1814,1489.7998000,1741.0996000,10.1000000,0.0000000,0.0000000,270.0000000,1), --object(coffee_med_1,1), (1,1),
createObject(1792,1490.4004000,1740.7002000,10.6000000,0.0000000,0.0000000,272.0000000,1), --object(swank_tv_1,1), (1,1),
createObject(1808,1494.9004000,1741.5000000,10.1000000,0.0000000,0.0000000,270.0000000,1), --object(cj_watercooler2,1), (1,1),
createObject(2099,1495.0000000,1740.5996000,10.1000000,0.0000000,0.0000000,267.9950000,1), --object(med_hi_fi_1,1), (1,1),
createObject(2964,1490.0000000,1746.2002000,10.1000000,0.0000000,0.0000000,0.0000000,1), --object(k_pooltablesm,1), (1,1),
createObject(16151,1487.4000000,1733.3000000,10.4000000,0.0000000,0.0000000,270.0000000,1), --object(ufo_bar,1), (1,1),
createObject(1714,1494.1000000,1733.3000000,10.1000000,0.0000000,0.0000000,217.9960000,1), --object(kb_swivelchair1,1), (1,1),
createObject(2184,1493.9000000,1735.3000000,10.1000000,0.0000000,0.0000000,223.9950000,1), --object(med_office6_desk_2,1), (1,1),
createObject(14826,1469.0000000,1735.5996000,10.8000000,0.0000000,0.0000000,0.0000000,1), --object(int_kbsgarage2,1), (1,1),
createObject(1009,1464.3000000,1734.5000000,10.4000000,0.0000000,0.0000000,0.0000000,1), --object(nto_b_s,1), (1,1),
createObject(1153,1470.9000000,1732.8000000,13.1000000,0.0000000,0.0000000,0.0000000,1), --object(fbmp_a_f,1), (1,1),
createObject(1179,1468.3000000,1732.9000000,13.0000000,0.0000000,0.0000000,0.0000000,1), --object(fbmp_lr_rem1,1), (1,1),
createObject(4866,1394.0000000,1754.3000000,10.1000000,0.0000000,0.0000000,0.0000000,1), --object(lasrnway1_las,1), (1,1),
createObject(18284,1449.7000000,1774.5000000,13.0500000,0.0000000,0.0000000,0.0000000,1), --object(cw_tscanopy,1), (3,1),
createObject(18284,1449.7000000,1791.0000000,13.0300000,0.0000000,0.0000000,0.0000000,1), --object(cw_tscanopy,1), (4,1),
createObject(3934,1487.7000000,1752.7000000,10.1000000,0.0000000,0.0000000,0.0000000,1), --object(helipad01,1), (2,1),
createObject(3934,1487.8000000,1773.6000000,10.1000000,0.0000000,0.0000000,0.0000000,1), --object(helipad01,1), (3,1),
createObject(3934,1469.7000000,1774.0000000,10.1000000,0.0000000,0.0000000,0.0000000,1), --object(helipad01,1), (4,1),
createObject(3934,1469.0000000,1753.0000000,10.1000000,0.0000000,0.0000000,0.0000000,1), --object(helipad01,1), (5,1),
createObject(3934,1479.7000000,1763.3000000,10.1000000,0.0000000,0.0000000,0.0000000,1), --object(helipad01,1), (6,1),
createObject(5130,1459.2000000,1763.0000000,13.1000000,0.0000000,0.0000000,314.0000000,1), --object(imcompstrs02,1), (1,1),
createObject(1508,1486.8000000,1795.7800000,11.8000000,0.0000000,0.0000000,92.0000000,1), --object(dyn_garage_door,1), (1,1),
createObject(16773,1476.2000000,1795.7001000,14.1000000,0.0000000,0.0000000,0.0000000,1), --object(door_savhangr1,1), (1,1),
createObject(4866,1348.8000000,1754.8000000,24.7000000,0.0000000,180.0000000,0.0000000,1), --object(lasrnway1_las,1), (2,1),
}
local col = createColSphere(1484.8677978516,1780.7467041016,10.8125,60)
local function watchChanges( )
if getElementDimension( getLocalPlayer( ) ) > 0 and getElementDimension( getLocalPlayer( ) ) ~= getElementDimension( objects[1] ) and getElementInterior( getLocalPlayer( ) ) == getElementInterior( objects[1] ) then
for key, value in pairs( objects ) do
setElementDimension( value, getElementDimension( getLocalPlayer( ) ) )
end
elseif getElementDimension( getLocalPlayer( ) ) == 0 and getElementDimension( objects[1] ) ~= 65535 then
for key, value in pairs( objects ) do
setElementDimension( value, 65535 )
end
end
end
addEventHandler( "onClientColShapeHit", col,
function( element )
if element == getLocalPlayer( ) then
addEventHandler( "onClientRender", root, watchChanges )
end
end
)
addEventHandler( "onClientColShapeLeave", col,
function( element )
if element == getLocalPlayer( ) then
removeEventHandler( "onClientRender", root, watchChanges )
end
end
)
-- Put them standby for now.
for key, value in pairs( objects ) do
setElementDimension( value, 65535 )
end