Driving School Job Items

3 min read

Items

The script uses a small set of ox_inventory items. Four are usable (their client.export drives the script's own logic), the rest are plain props. All item names are set in config.lua.

Item reference

ItemUsableRole
dmv_sheet_theory✅ exportblank theory paper (an enrolled candidate uses it to sit the exam)
dmv_sheet_theory_done✅ exportcompleted theory paper (an instructor uses it to mark)
dmv_eyetest_paper✅ exporteyesight form (an on-duty EMS or doctor fills it in; everyone else reads it)
cone✅ exportpractice cone (used to place a cone; picking one back up returns it)
dmv_theory_bookNotheory study book (handed out on enrolment)
dmv_licence_cardNoblank license card (consumed when a license is granted, if used)
driver_licenseNothe physical license (an ox_inventory default; carries the categories held)

ox_inventory

Add these to ox_inventory/data/items.lua. The four usable items must carry a client.export pointing at the resource, or "use" does nothing:

['dmv_sheet_theory'] = { label = 'Theory Paper (Blank)', weight = 10, stack = true, close = true,
    consume = 0, client = { export = 'vs-dmvjob.dmv_sheet_theory' } },
['dmv_sheet_theory_done'] = { label = 'Theory Paper (Completed)', weight = 10, stack = false, close = true,
    consume = 0, client = { export = 'vs-dmvjob.dmv_sheet_theory_done' } },
['dmv_eyetest_paper'] = { label = 'Eyesight Test Form', weight = 10, stack = false, close = true,
    consume = 0, client = { export = 'vs-dmvjob.dmv_eyetest_paper' } },
['cone'] = { label = 'Cone', weight = 50, stack = true, close = true,
    consume = 0, client = { export = 'vs-dmvjob.cone' } },
['dmv_theory_book'] = { label = 'Driving Theory Book', weight = 400, stack = false },
['dmv_licence_card'] = { label = 'Blank Licence Card', weight = 5, stack = true },

Every usable item needs consume = 0 and the matching client.export. Without them, using the theory paper, eyesight form, or cone silently does nothing.

The physical license: driver_license

The license card ox_inventory hands players is driver_license, an ox_inventory default you likely already have. It carries metadata with the categories held, which the script writes and reads directly. If your inventory does not define it, add it, or the card silently fails to issue while the license record itself is still granted.

Usable-item exports

ExportItemBehaviour
vs-dmvjob.dmv_sheet_theorydmv_sheet_theoryan enrolled candidate sits the theory exam; anyone else is told to enrol
vs-dmvjob.dmv_sheet_theory_donedmv_sheet_theory_donean on-duty instructor of the candidate's school marks it; everyone else reads it
vs-dmvjob.dmv_eyetest_paperdmv_eyetest_paperan on-duty EMS or doctor records a vision result; everyone else reads it
vs-dmvjob.coneconeopens the cone placer (placing one removes it from the inventory)

Item images

Give every item an image in ox_inventory/web/images/ (matching the item name) so it does not render as a blank box.

On a player-run school these items are consumable supplies: staff hand papers, books, and forms out of the school stash, and the owner restocks them for money from the tablet. See Running a school.