OPX//77
opx_infinityConcepts

Server authority

Last updated on

The server decides; a client only asks. How opx_infinity treats network events, staff powers, money and positions so that a modified client cannot cheat.

The server decides and the client asks. Anything arriving on an opx:net: event comes from a machine the player owns and may have modified; the server re-checks it before believing it. Follow the same rules in any module you write.

The rules

RuleHow the framework does it
Identity comes from the connection.A RegisterNetEvent handler reads source, set by the platform. A player id, citizen id or plate in the payload never says who is asking.
Re-derive, do not accept."Buy this at that dealer": the server re-checks the distance across the ground, the routing bucket, that the dealer sells that row and that the money is there (dealership).
Staff powers are ACL rights, checked on the server.Staff commands are registered restricted, so the host checks command.<name> before the handler runs. The admin module re-checks with Open77.acl.isAllowed when a staff action arrives another way. Hiding a menu row is never the check.
Shared world things are created by the server.Vehicles, showroom cars and other persistent entities come from server code. A client-only preview stays on the client.
Money first, then the side effect, refund on failure.A purchase charges first, because the vehicles contract can refund but cannot un-create. A failed registration after payment is refunded and logged.
Rate limits are comfort, not security.OPX.Cooling limits how often one player repeats one operation. Ownership checks are the security boundary.
A refusal names a code, not a reason.OPX.Refuse tells the client which request failed and a stable code, nothing more.

Client hints

Some modules compute an answer on the client too (e.g. whether a job may use an elevator floor) to grey out a row. That is a hint: the server runs the same check again (the shared OPX.JobGate code) and its answer counts.

Audit

Actions an operator may have to account for (money, character changes, staff actions) are written with OPX.Audit as one greppable line in the server journal:

[audit] event=... severity=... citizen=... user=... player=... message="..." data=...

Text from a client is stripped of control characters and cut to a safe length first, so a player cannot forge a log line.

On this page