CY-DevWorks Discord Support
Login
Back to CY-DevWorks
πŸ“œ CY-Lawbook

Features & Details

🀠 The Immersive Lawbook for Your Western Server!

A beautifully designed IC Lawbook as inventory item with authentic Western design, integrated penalty calculator, and full Sheriff mode.


✨ Features

πŸ“š For All Citizens

  • Item-based – Lawbook as actual inventory item
  • Authentic Western-Book Design – Leather binding, paper texture & gold accents
  • Dynamic Lawbook with categories (Accordion-Style)
  • Live Search – Filter laws by term or paragraph
  • Favorites System – Mark important laws & find them quickly

🌟 Sheriff Mode (for Law Enforcement)

  • Penalty Calculator – Automatic calculation of fines & bounty
  • Modifiers – Armed, fleeing, confession, repeat offender, etc.
  • Private Notes – Personal notes for each law
  • Print Function – Print tickets as items
  • History & Statistics
  • Custom Laws – Create/delete laws in-game

πŸ”§ Technical

  • Discord Webhooks – Logging for tickets, created/deleted laws
  • Fully Configurable – All laws, categories & penalties in config
  • MySQL Storage – Favorites, notes & custom laws persistent
  • Exports – Easy integration with other scripts
  • Open Source Config & HTML – Design & laws fully customizable

πŸ“¦ Dependencies

  • VORP Core
  • VORP Inventory
  • oxmysql

βš™οΈ Configuration

All settings in a simple config.lua:

-- Item System

Config.UseItem = true -- Item required?

Config.ItemName = "lawbook" -- Item name

-- Animation

Config.UseAnimation = true

Config.AnimationProp = "p_newspaper03x"

-- Tickets

Config.EnablePrintTicket = true

Config.TicketItemName = "ticket"

Config.PrintCooldown = 30

-- Sheriff Jobs

Config.SheriffJobs = {

"sheriff", "deputy", "marshal", "judge", "lawyer"

}

-- Repeat Offender Multipliers

Config.RepeatOffenderMultiplier = {

[1] = 1.0, -- 1st offense: 100%

[2] = 1.25, -- 2nd offense: 125%

[3] = 1.5, -- 3rd offense: 150%

[4] = 2.0, -- 4th offense: 200%

[5] = 2.5 -- 5+ offenses: 250%

}
Fully predefined laws included – Ready to use or customize!


πŸ”Œ Exports

exports['cy-lawbook']:OpenLawbook()

exports['cy-lawbook']:CloseLawbook()

exports['cy-lawbook']:ToggleLawbook()

exports['cy-lawbook']:IsSheriff()

πŸ“ Admin Commands

Command

Description

/givelawbook [id]

Give item to player

/cylawbook_reload

Reload config

/cylawbook_stats

Show statistics


Developed with ❀️ by CY DevWorks

Copied