v2.0.35 minor
A preview camera that glides instead of snapping, and a shop prompt that floats at the shop
4changes

A preview camera that glides instead of snapping, and a shop prompt that floats at the shop
4changes

[02] Release
Turning the character with the mouse and zooming with the wheel are now eased rather than instant, and the camera glides between body parts when the player changes category instead of jumping. The turn moved out of the interface into the game, so it runs at the game's framerate, and every part of it — turn speed, zoom step and limits, focus time, how much damping — is a config option you can turn off entirely. Shop prompts can now float in 3D at the shop itself instead of sitting fixed on one side of the screen. Also fixed: on ESX and qs-core, /reloadskin and /clearstuckprops refused every time, claiming the player was dead.
Config.SmoothCamera and Config.TextUIMode. If you keep your own config/main.lua the script still runs, but you will not get either feature until you copy them in — a missing Config.TextUIMode reads as the old 2D prompt, and a missing Config.SmoothCamera leaves the camera on its defaults.qs-textui started. Without it the setting is ignored and you get the on-screen prompt as before, so there is nothing to break if you do not run it.Config.SmoothCamera is where the feel of the preview lives:
Config.SmoothCamera = {
Enabled = true, -- false brings back instant turning and zoom
Damping = 0.14, -- how fast it catches up each frame (0.05 floaty, 1.0 instant)
TurnSpeed = 0.35, -- degrees the character turns per pixel dragged
ZoomStep = 3.0, -- FOV degrees per wheel notch
ZoomMin = 20.0, -- closest zoom
ZoomMax = 70.0, -- furthest zoom
FocusMs = 420, -- camera move between body parts, in ms
}
The damping is scaled by frame time, so the camera feels the same at 60 fps and at 144.
Config.TextUIMode takes '3d' or '2d'. In 3D mode the [E] - prefix from Config.ZonePrefix is stripped automatically, because qs-textui draws its own key badge and it would otherwise appear twice.
Replace every file in the resource, except what you edited yourself:
config/main.lua — changed. If you edited it, copy in the new Config.SmoothCamera block and Config.TextUIMode rather than overwriting your file.locales/ — unchanged. Keep yours.client/, custom/, game/, web/ — replace them.fxmanifest.lua — replace it.The new Config.SmoothCamera block sets turn speed, zoom step, the closest and furthest zoom, how long the camera takes to move between body parts, and how much damping to apply. Enabled = false brings back the instant turning and zoom exactly as before. The damping is scaled by frame time, so it feels the same at any framerate.
Config.TextUIMode = '3d' draws the shop's prompt in the world, above the shop itself, instead of fixed on one side of the screen. It needs qs-textui started and falls back to the on-screen prompt without it. '2d' keeps the old behaviour. In 3D mode the Config.ZonePrefix text is stripped, since qs-textui draws its own key badge.
Dragging to turn the character and scrolling to zoom were applied instantly, one step per input event, which read as snapping. Both are now eased towards where the player sent them, and the camera glides between body parts when the category changes instead of jumping. The turn also moved out of the interface and into the game, so it runs at the game's framerate rather than the browser's.
Both commands refused every time, telling a perfectly healthy player they were dead. The death check tested whether its result was not nil, and because qs-core and some other frameworks keep state.dead set to false while alive — and false is not nil — every living player counted as dead. It now checks the value is actually true. Affects ESX and qs-core, which uses the ESX adapter; QBCore and Qbox were never affected.