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:
- Lock up nearby players in specific seats of a prison wagon
- Release players from the prison wagon
- Prevent locked-up players from escaping the wagon (by disabling controls and freezing their position)
Dependencies
The script relies on several frameworks and resources:
- RSG-Core: A core framework for RedM, providing player management and utility functions
- RSG-Target: A targeting system that allows players to interact with specific entities
- OX Library: Provides menu functionality
How It’s Used
For Law Enforcement Players:
- The player approaches a prison wagon (model: ‘wagonPrison01x’)
- Using the targeting system, they see an option “Prison Wagon Controls”
- 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
- When locking up a player, they can choose:
- Left Seat
- Right Seat
For Prisoners:
- 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
- When released:
- They’re teleported behind the officer
- Regain control of their character
- Receive a notification that they’ve been released
Technical Implementation:
- Target Integration: The script uses
rsg-target
to make the prison wagon interactive - Seat Management: Properly handles seating positions in the wagon
- Control Disabling: Uses a thread to constantly disable controls for prisoners
- Network Synchronization: Properly handles network IDs for the wagon between clients
- Event-based Communication: Uses client and server events to coordinate actions between players
Configuration Options
The config.lua
file allows server owners to customize:
- Target distance for interaction
- The wagon model to use
- Position offsets for prisoner placement
- Optional job restrictions (can limit to sheriff/law enforcement roles)
- 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.
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 200 |
Requirements | RSG ox_lib |
Support | Yes |