Phone app
MrNewbVehicleKeysPhone: a Keys app for LB Phone.
MrNewbVehicleKeysPhone adds a Keys app to LB Phone. Players see the keys they hold and use their vehicle from the phone. It only calls MrNewbVehicleKeys exports and callbacks and does not change that resource.
Requirements
lb-phone,ox_lib,Newb_BridgeandMrNewbVehicleKeys, with the server artifact and OneSync- MrNewbVehicleKeys at keys API level 3 or newer (the
GetApiVersionexport). On start the phone app prints a console line when the level is too old, whenlb-phoneor MrNewbVehicleKeys is not running, or when its web build is missing - Item-based keys, only for the Scan and Eject actions
Install
Start it after ox_lib, lb-phone and MrNewbVehicleKeys:
ensure ox_lib
ensure lb-phone
ensure MrNewbVehicleKeys
ensure MrNewbVehicleKeysPhoneRestarting MrNewbVehicleKeys stops this resource too, so start it again afterwards. The app registers itself in LB Phone. There is nothing to set up in game.
What it does
| Action | How |
|---|---|
| Lock / unlock | Same path as the in-world fob: animation, lights, lock sound and notification. Tries once more if the first request is refused. Works from range through the server when the car is not nearby |
| Trunk, hood, alarm, dance, self-park, summon, auto-pilot | Matching MrNewbVehicleKeys exports. Trunk and hood only show when the car has one, and show whether it is open. Which other buttons show depends on the key type. Smart keys show their fob modules, basic keys get lock, unlock and trunk |
| Toggle engine | Starts or stops based on the engine's real state. Hidden when ignition (insert) mode is on |
| Locate | Marks the vehicle on the map |
| Scan / eject | Scans a key onto the phone or takes it off |
The app keeps its lock and engine state up to date while it is open. A short walkthrough shows the first time a character opens it.
Remote engine toggles share a 2 second cooldown, so a second tap inside that window is refused.
Settings
configs/config.lua is the only setting file. It holds the names of the two resources it talks to (only change them if you renamed the folders), how close a car must be to count as nearby in the app (60 m), whether keys can be scanned onto the phone, and the app's own name and description in LB Phone.
