[RSG] Prison Wagon

Prison Wagon

Prison Wagon

Requirements : RSG / ox_lib
Core : RSG v2

TEBEX LINK = Mack-Scripts · Welcome
DISCORD LINK = Discord

This is a prison wagon system for RSG core. It allows players, likely law enforcement characters, to place other players into a prison wagon and transport them. The script provides functionality to:

  1. Lock up nearby players in specific seats of a prison wagon
  2. Release players from the prison wagon
  3. Prevent locked-up players from escaping the wagon (by disabling controls and freezing their position)

Dependencies

The script relies on several frameworks and resources:

  1. RSG-Core: A core framework for RedM, providing player management and utility functions
  2. RSG-Target: A targeting system that allows players to interact with specific entities
  3. OX Library: Provides menu functionality

How It’s Used

For Law Enforcement Players:

  1. The player approaches a prison wagon (model: ‘wagonPrison01x’)
  2. Using the targeting system, they see an option “Prison Wagon Controls”
  3. Clicking this option opens a menu with choices:
  • “Lock Up Nearest Player” - Places a nearby player in the wagon
  • “Release Nearest Player” - Frees a player from the wagon
  1. When locking up a player, they can choose:
  • Left Seat
  • Right Seat

For Prisoners:

  1. When locked up, the prisoner:
  • Gets placed in the selected seat of the wagon
  • Can’t move or escape (controls are disabled)
  • Receives a notification that they’ve been locked up
  1. When released:
  • They’re teleported behind the officer
  • Regain control of their character
  • Receive a notification that they’ve been released

Technical Implementation:

  1. Target Integration: The script uses rsg-target to make the prison wagon interactive
  2. Seat Management: Properly handles seating positions in the wagon
  3. Control Disabling: Uses a thread to constantly disable controls for prisoners
  4. Network Synchronization: Properly handles network IDs for the wagon between clients
  5. Event-based Communication: Uses client and server events to coordinate actions between players

Configuration Options

The config.lua file allows server owners to customize:

  1. Target distance for interaction
  2. The wagon model to use
  3. Position offsets for prisoner placement
  4. Optional job restrictions (can limit to sheriff/law enforcement roles)
  5. Customizable notification messages

This script would be particularly useful for role-playing servers where law enforcement and criminal activities are simulated, allowing for realistic prisoner transport scenarios.

e0d9beb20e3e1414be61a2f0f585a9eeb5ae51bf.png 3775beff3519789e569d5baec19f4def66f36fee.png

0437e48c2a5c11b9c6236a64c40b6c4e19c4f699.png 85701604012e60929582aadcb64812058946c9ed.png b3873e6fc1a1dc2f497c2a39ebee518bf6c187e8.png 87e840cf10727d2ffef79ce45917c6bdfe5dc17f.png 676692a3a0c2477960e84463822984b91f1f02b0.png

Code is accessible No
Subscription-based No
Lines (approximately) 200
Requirements RSG ox_lib
Support Yes