๐Ÿ“–Exports & Usage

Dynyx Prison includes a set of exports that let developers interact with the system from other scripts. These exports allow jail logic, sentence modification, community service, and UI actions to be t

๐Ÿ–ฅ๏ธ Server Exports

These exports should be used from server-side scripts only.


๐Ÿš™ GetAllRentalVehicles

Returns all active rental listings including live availability and rental status.

local vehicles = exports['dynyx_rentals']:GetAllRentalVehicles()

Returns table โ€” Array of listing objects, each containing:

  • id (number) Unique listing ID.

  • vehicle_model (string) The vehicle spawn name.

  • vehicle_name (string) Display name shown in the UI.

  • vehicle_type (string) Vehicle category.

  • vehicle_plate (string) License plate of the listed vehicle.

  • vehicle_color (string) Color name of the vehicle.

  • vehicle_image_url (string) URL of the vehicle thumbnail image.

  • description (string) Owner-written description of the listing.

  • rental_price (number) Base listing price.

  • hourly_price (number) Price charged per hour of rental.

  • owner_citizenid (string) Citizen ID of the player who listed the vehicle.

  • is_available (boolean) Whether the vehicle is currently available to rent.

  • is_rented (boolean) Whether the vehicle is currently out on an active rental.

  • rental_expires_at (string | nil) ISO timestamp of when the active rental expires. nil if not rented.

  • renter_citizenid (string | nil) Citizen ID of the current renter. nil if not rented.

Last updated