Documentation

Phone App & Website

The Clamp Release phone app, the LS Parking Authority website and assistance requests.

Drivers who find their vehicle clamped can pay the clamps off and ask for help from their phone or a laptop. Both share one back end and the phone settings.

#Clamp Release App

The app is added automatically to the first supported phone that is running: sd-phone, lb-phone, or yseries, yphone or yflip-phone.

It lists the clamped vehicles within phone.searchRadius (30 metres) and each of their clamps with its release fee. Tap a clamp twice to pay it. A paid clamp drops off beside the vehicle. The notice's contact numbers are listed with the vehicle.

To register the app with another phone, edit client/unlocked/phone.lua and server/unlocked/phone.lua, and add the phone to both phone lists. Turn the app off with phone.enabled = false.

With phone.allowPayment on and a supported phone running, clamps are paid only in the app. The clamp notice and the windscreen keypad then point players to the app instead of taking the fee. Set phone.allowPayment = false to keep payment at the clamp.

Wheel clamps can only be paid in the app when notice.allowPayment is on, and windscreen clamps when windscreen.allowPayment is on. Both are charged the same fee from the same account as at the clamp.

#LS Parking Authority Website

With zyke_laptop started, the LS Parking Authority site is listed under government in the laptop's browser, at lsparking.gov by default. It does what the phone app does: lists the clamped vehicles nearby, pays their clamps off, requests assistance, and lists the requests responders can answer.

The website follows every phone setting except phone.enabled, so it works without a phone. Without a supported phone, the clamp notice and keypad keep taking payment as well. Turn the website off with laptop.site.enabled = false, and change its address with laptop.site.url. Its name and icon are set in shared/unlocked/laptop.lua.

The site comes back on its own when either resource restarts.

#Requesting Assistance

Next to a clamped vehicle, a driver can send an assistance request with an optional message. It reaches players on phone.assistance.jobs, on-duty police by default, and, with notifyFitter, whoever fitted a clamp on the vehicle while they are online.

Each of them gets a notification, a phone banner, a laptop notification while they use their laptop, and a map blip on the vehicle. The driver sending the request is never alerted themselves. When nobody else can respond, the request is refused and the driver is told to pay the fee.

Responders answer from the app or the website: respond, set a waypoint, or close the request. Only one responder can take a request. With zyke_towing started, responders also see the requests in its Tow Dispatch app.

A request closes when the driver cancels it or leaves, when the responder closes it, when the vehicle has no clamps left, or after expireMinutes (15 minutes). The driver can then send another after cooldownSeconds.

To send requests to your own dispatch resource, call it from OnClampAssistanceRequested in server/unlocked/phone.lua. To change who receives and answers requests, edit CanRespondToClampAssistance in server/unlocked/can_checks.lua.