LogoLogo
StoreDiscord
  • Kyros FiveM Store Documentation
  • KYROS WEAPON PACKS
    • Weapon Install Guides
  • Scripts
    • Ped Menu
      • How To Install
      • How To Add Peds
    • Kyros Damage
      • How To Install
      • Configure
      • Change Logs
    • Kyros Recoil
      • How To Install
      • Configure
      • Change Logs
    • Kyros Repair Bench
      • How To Install
      • Commands
      • Configure
      • Change Logs
    • Kyros Ammo Indicator
      • How To Install
      • Commands
      • Change Logs
    • Kyros Jamming
      • How To Install
      • Change Logs
  • Other
    • ⚠️Common Issues
    • 🔐FiveM Asset Escrow System
Powered by GitBook
On this page
  • KYROS Weapon Repair Script Documentation
  • Overview
  • Installation
  • Configuration (config.lua)
  • How to Add Custom Weapons
  1. Scripts
  2. Kyros Repair Bench

Configure

This page shows you how to add your own custom weapons to the damage config.


KYROS Weapon Repair Script Documentation

Overview

The KYROS Weapon Repair Script provides an easy-to-use solution for repairing weapons within a FiveM server using the ox_inventory system. The script features a customizable configuration, progress bar/circle repair animations, language support, and options for various repair mechanics, such as requiring a weapon repair kit.


Installation

  1. Download and Extract the Script

    • Download the KYROS weapon repair script and extract it into your FiveM resources folder.

  2. Add to Server Configuration

    • Add start kyros-repair in your server.cfg to start the script.

  3. Ensure Dependencies

    • Make sure you have the following resources:

      • ox_inventory

      • ox_lib

      • Optional: esx if using esx notification system.


Configuration (config.lua)

The config.lua file allows you to configure various aspects of the weapon repair system.

General Settings

  • requireditem: Item needed for repairs. Default is 'money'.

  • requireditemamount: Amount of the required item for repairs. Default is 1000.

  • repairtime: Time taken to repair the weapon (in milliseconds). Default is 5000.

  • repairItem: The item required to repair the weapon. Default is 'gunrepairkit'.

  • requireGunRepairKit: Whether a gun repair kit is required for repairs. Default is true.

  • progressType: Choose between 'bar' or 'circle' for the repair progress display.

  • progressPosition: Position of the progress circle. Use 'middle' or 'bottom' (only if progressType == 'circle').

  • targetUI: UI for target interaction, choose between 'ox_target' and 'text_ui'.

  • notificationSystem: Choose between 'esx' and 'ox' notification systems.

Language Settings

  • languages: Configures the text displayed for each language supported by the script.

    • English (en) and Spanish (es) are included by default.

    • Add new languages as needed.

  • currentLanguage: Set the default language for the script (e.g., 'en' for English, 'es' for Spanish).

Weapon Specific Requirements

  • require: Defines specific repair requirements for certain weapons. You can set the required item, amount, and repair time for specific weapons:

    ['WEAPON_PISTOL'] = { requireditem = 'money', requireditemamount = 1200, repairtime = 8000 }

Locations

Define the repair locations in the locations table. Each location has the following properties:

  • coords: The coordinates of the repair bench.

  • heading: The heading of the repair bench.

  • spawnprop: Whether the repair bench prop should spawn.

  • free: Whether repairs at this location are free.

Example:

{   
    coords = vector3(-922.4052, -2989.9075, 18.8454),
    heading = 239.3186,
    spawnprop = true,
    free = false
}

How to Add Custom Weapons

  1. Edit the Config File: Add specific weapons and their repair requirements in the require section.

    ['WEAPON_SMG'] = { requireditem = 'black_money', requireditemamount = 2000, repairtime = 10000 }
  2. Add More Languages: Update the languages table to add support for additional languages.

    ['fr'] = {
        repairingWeapon = 'Réparation de l\'arme',
        missingItems = 'Articles manquants',
        ...
    }

PreviousCommandsNextChange Logs

Last updated 8 months ago