Skip to content

Commands & Export

πŸ’¬ Commands#

The script includes a variety of built-in commands for administrative control, player interaction, and minigame access.

πŸ§‘β€βš–οΈ Jail Commands#

  • /jailmenu
    Opens the jail management interface for authorized users. This menu allows you to jail nearby players, set durations, assign tasks, and review player details.
text
<figure><img src="../../.gitbook/assets/image (85).png" alt=""><figcaption></figcaption></figure>
  • /jailList
    Displays a full list of all current inmates along with their jail time, tasks completed, and escape status. Only accessible by authorized staff.
text
<figure><img src="../../.gitbook/assets/image (84).png" alt=""><figcaption></figcaption></figure>

πŸ€ Basketball Command#

  • /basket (or your configured command name)
    Spawns a basketball in the yard if the player is inside a valid basketball zone. The command respects a maximum spawn limit defined in the config.

    After spawning the ball, players are prompted with controls for:

    • Picking up the ball
    • Changing dribble style
    • Shooting the ball
    • Detaching the ball
    text
    <figure><img src="../../.gitbook/assets/image (86).png" alt=""><figcaption></figcaption></figure>
    

🎲 Dice Game Commands#

  • /dicesend [id] [amount]
    Sends a dice game request to a nearby player with the specified bet amount.
  • /diceaccept
    Accepts an incoming dice game request.
  • /dicedeny
    Rejects an incoming dice game request.
text
<figure><img src="../../.gitbook/assets/image (87).png" alt=""><figcaption></figcaption></figure>

Export: JailPlayer#

Send players to jail from any external resource (MDT, policejob, etc.).

Usage (Server-Side)#

lua
exports['frkn-prison']:JailPlayer(copSource, targetSource, jailTime, reason)

Parameters#

ParameterTypeDescription
copSourcenumberServer ID of the officer sending the player to jail
targetSourcenumberServer ID of the player being jailed
jailTimenumberJail duration in minutes
reasonstringReason for imprisonment

Example#

lua
-- Jail a player for 30 minutes
exports['frkn-prison']:JailPlayer(source, targetPlayerId, 30, "Armed Robbery")

What It Does#

  • Teleports the player to prison
  • Saves and clears the player's inventory
  • Assigns prison tasks (Dish Washing, Exercise, Cleaning)
  • Creates a database record
  • Automatically releases the player and restores inventory when time is up