The Sandy Shores Illegal Garage blends a car wash, gas station, and an underground hacker garage into a roleplay-ready crime front. Perfect for secret operations, casual stops, or police busts.
-- Returns: true (open/up), false (closed/down), or nil (unknown)
local isUp = exports['prompt_sandy_illegal_garage']:getLiftState('prompt_sandy_is_lift')
-- Returns: true if animating, false otherwise
local busy = exports['prompt_sandy_illegal_garage']:isLiftBusy('prompt_sandy_is_lift')
-- state: true = open/up, false = close/down
exports['prompt_sandy_illegal_garage']:setLiftState('prompt_sandy_is_lift', true)
```<div data-gb-custom-block data-tag="hint" data-style='warning'>`setLiftState` does not check if the prop is busy. You should check `isLiftBusy` first to avoid overlapping animations.</div></div><div data-gb-custom-block data-tag="tab" data-title='Server'>#### getLiftState
Returns the current state of a prop from the server.
```lua
-- Returns: true (open/up), false (closed/down), or nil (unknown)
local isUp = exports['prompt_sandy_illegal_garage']:getLiftState('prompt_sandy_is_lift')
-- Returns: true if animating, false otherwise
local busy = exports['prompt_sandy_illegal_garage']:isLiftBusy('prompt_sandy_is_lift')
```</div></div>### Events<div data-gb-custom-block data-tag="tabs"><div data-gb-custom-block data-tag="tab" data-title='Client'>#### liftStateChanged
Fires when a prop animation **starts**.
```lua
AddEventHandler('prompt_sandy_illegal_garage:liftStateChanged', function(propName, state)
-- propName: string (e.g. "prompt_sandy_is_lift")
-- state: true = opening/going up, false = closing/going down
print(propName .. ' is now ' .. (state and 'OPENING' or 'CLOSING'))
end)
AddEventHandler('prompt_sandy_illegal_garage:liftAnimationComplete', function(propName, state)
-- propName: string (e.g. "prompt_sandy_is_lift")
-- state: true = now open/up, false = now closed/down
print(propName .. ' animation complete, now ' .. (state and 'UP' or 'DOWN'))
end)
```</div><div data-gb-custom-block data-tag="tab" data-title='Server'>#### liftStateChanged
Fires when a prop's state is updated in GlobalState.
```lua
AddEventHandler('prompt_sandy_illegal_garage:liftStateChanged', function(propName, state)
-- propName: string (e.g. "prompt_sandy_is_lift")
-- state: true = open/up, false = closed/down
print(propName .. ' state changed to ' .. (state and 'UP' or 'DOWN'))
end)
```</div></div>
### Full Example
```lua
-- Client-side: react to lift going up, then do something when animation finishes
AddEventHandler('prompt_sandy_illegal_garage:liftStateChanged', function(propName, state)
if propName == 'prompt_sandy_is_lift' and state then
print('Lift is going up!')
end
end)
AddEventHandler('prompt_sandy_illegal_garage:liftAnimationComplete', function(propName, state)
if propName == 'prompt_sandy_is_lift' and state then
print('Lift is fully up, do something now')
end
end)
-- Programmatically raise the lift (with busy check)
local busy = exports['prompt_sandy_illegal_garage']:isLiftBusy('prompt_sandy_is_lift')
local isUp = exports['prompt_sandy_illegal_garage']:getLiftState('prompt_sandy_is_lift')
if not busy and not isUp then
exports['prompt_sandy_illegal_garage']:setLiftState('prompt_sandy_is_lift', true)
end
INSERT INTO `ox_doorlock` (`id`, `name`, `data`) VALUES
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station E-1', '{"heading":32,"coords":{"x":2012.722900390625,"y":3791.4658203125,"z":32.87763214111328},"doors":false,"maxDistance":2,"model":-1793984540,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station E-2', '{"heading":0,"coords":{"x":2002.6920166015626,"y":3791.26904296875,"z":33.40999984741211},"doors":false,"maxDistance":2,"model":957340662,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station 2-1', '{"heading":300,"coords":{"x":1996.93115234375,"y":3783.171875,"z":35.30082321166992},"doors":false,"maxDistance":2,"model":747286790,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station 2-2', '{"heading":298,"coords":{"x":2000.0584716796876,"y":3782.98046875,"z":35.31220245361328},"doors":false,"maxDistance":2,"model":108110432,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station 0-1', '{"coords":{"x":1984.8240966796876,"y":3787.3486328125,"z":27.36436462402343},"doors":[{"coords":{"x":1984.34375,"y":3788.1806640625,"z":27.36436462402343},"heading":120,"model":1972289202},{"coords":{"x":1985.304443359375,"y":3786.516845703125,"z":27.36436462402343},"heading":300,"model":1972289202}],"maxDistance":2,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station 1-1', '{"heading":181,"coords":{"x":1988.239990234375,"y":3789.796630859375,"z":31.21485519409179},"doors":false,"maxDistance":2,"model":871083343,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station E-3', '{"heading":31,"coords":{"x":1982.0697021484376,"y":3767.3984375,"z":32.60374450683594},"doors":false,"maxDistance":2,"model":-1677161358,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station E-4', '{"heading":121,"coords":{"x":1983.0889892578126,"y":3774.855224609375,"z":32.62191772460937},"doors":false,"maxDistance":2,"model":-1677161358,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station E-5', '{"heading":31,"coords":{"x":1972.7923583984376,"y":3761.8232421875,"z":32.58348846435547},"doors":false,"maxDistance":2,"model":-1603870487,"state":1}'),
(DEFAULT, 'Sandy Illegal Garage & Carwash & Gas Station E-6', '{"heading":211,"coords":{"x":1967.503173828125,"y":3766.66064453125,"z":32.58348846435547},"doors":false,"maxDistance":2,"model":-1603870487,"state":1}');