Glitched Scripts
Advanced FlatbedsAdvanced Configuration

server/edit.lua

Owner-editable server hook: CanPlayerUseFlatbed.

Do not rename this global. Core server code calls it by name.

Job / duty examples: Integrations.

CanPlayerUseFlatbed

Every client request that writes truck state (gs-flatbeds:rampDir, rampPos, cargoNet, cableState, vehExtra, wheelDoor) is distance-checked, model-allowlisted, then passed here:

function CanPlayerUseFlatbed(source, truck)
    -- source  player server id
    -- truck   entity handle
    return true
end

Return true to allow. The bundled file allows everyone. Put job, duty, or ACE checks here. Returning false silently drops the request.

This is the server-side pair to client CanUseFlatbed. Keys stay on the client. Jobs stay on the server.

On this page