PixelCraft Official Docs
  • Welcome
  • Information
    • Discord Roles
    • How to update your asset
    • FiveM Asset Escrow System
  • Assets and Guides
    • PC-Crafting-V2
      • Installation
      • Configuration
        • Inventory System
        • Core Framework
        • Language
        • EXP Enabled
        • Whitelisting Players
        • Whitelisted Admins
        • Weapon Damage Multipliers
        • Weapon Parts Configuration
        • Crafting & Repair Experience
        • Crafting Locations
        • Database Setup
        • Custom Weapons
        • Crafting Recipes
        • Attachments
      • Troubleshooting
      • Commands
      • Support
    • PC-Security
      • Installation
      • Configuration
        • Job Routes
        • Level Thresholds
        • Level-Specific Configurations
        • Damage Threshold
        • Police Alert
        • Security Shop Items
        • Criminal Rewards
        • Blips
      • Support
Powered by GitBook
On this page
  1. Assets and Guides
  2. PC-Crafting-V2
  3. Configuration

Custom Weapons

PreviousDatabase SetupNextCrafting Recipes

Last updated 3 months ago

  • Purpose: Connects your custom weapon names to the available weapon models in the script

  • Make the custom weapon parts entry same as the weapon you are mapping it to:

    • Say, if you're mapping your custom weapon to weapon_pistol.glb: 
          ["weapon_pistol"] = {
              ["front_sight"] = { damageFrequency = 0.60 },
              ["recoil_spring_guide"] = { damageFrequency = 1.20 },
              ["hammer"] = { damageFrequency = 1.10 },
              ["rear_sight"] = { damageFrequency = 0.50 },
              ["barrel"] = { damageFrequency = 0.85 },
              ["slide"] = { damageFrequency = 0.50 },
              ["magazine"] = { damageFrequency = 0.40 },
              ["trigger"] = { damageFrequency = 1.05 },
          },
      You're entry for your custom weapon will be: 
          ["weapon_custom"] = {
              ["front_sight"] = { damageFrequency = 0.60 },
              ["recoil_spring_guide"] = { damageFrequency = 1.20 },
              ["hammer"] = { damageFrequency = 1.10 },
              ["rear_sight"] = { damageFrequency = 0.50 },
              ["barrel"] = { damageFrequency = 0.85 },
              ["slide"] = { damageFrequency = 0.50 },
              ["magazine"] = { damageFrequency = 0.40 },
              ["trigger"] = { damageFrequency = 1.05 },
          },
  • Structure:

    weaponModelMap = {
        -- Standard weapons
        WEAPON_PISTOL = 'weapon_pistol.glb',
        weapon_carbinerifle = 'weapon_carbinerifle.glb',
        
        -- Custom weapons using standard models
        weapon_custom = 'weapon_pistol.glb',

Adding custom parts is not supported, do not add any new parts to Config.Parts