FiveM Forum: https://forum.cfx.re/t/release…saved-in-database/4793783
Discord: https://discord.gg/5hHSBRHvJE
Description
- If you are using a clip Item it adds Ammunition to your Weapon.
- If you are using a component Item it adds this Component to your Weapon
- With the Item attachment_remover you can remove the components from your weapon
- If Config.CheckMaxAmmo = true then the Player can't get more then Config.MaxAmmo = 250 bullets.
- Item use by pressing a Hotkey
- You can add you own clips and components [explained in server_items.lua]
Config
Code
Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
Config.Debug = true
Config.getSharedObject = 'esx:getSharedObject'
----------------------------------------------------------------
Config.Menu = 'NativeUI' -- Set to 'ESX' if you want ESX Menu || Set to 'NativeUI' if you want NativeUI
Config.AntiWeaponPunch = true -- Set false if you don't want to use this
Config.SavePlayer = {
enable = true,
version = '1.2' -- Set to '1.2' or 'legacy'
-- !!! If you set 'version' to 'legacy' then please read the Readme.md !!!
}
Config.checkMaxAmmo = {
enable = true, -- If set to false the Player can get more than Config.MaxAmmo bullets
maxAmmo = 250 -- Set the max. Ammo in Weapon
}
Config.Hotkey = {
enable = true, -- Set to false if you dont want to use ammo Item by pressing a Key
key = 45, -- default: 45 = R // https://docs.fivem.net/docs/game-references/controls/
category = {
enable = true, -- Set false if you want to use the weaclip item instead of category items like pistolclip
item = 'weaclip' -- Set the item that you want to use
}
}
Config.Animation = true -- Set false if you dont want the animation
Config.ProgressBar = {
enable = true, -- Set false if you dont want the progressbar
time = 2, -- In seconds
}
----------------------------------------------------------------
-- !!! This function is clientside !!!
Config.progressbar = function(time, msg)
exports['pogressBar']:drawBar(time, msg) -- (https://forum.cfx.re/t/release-pogress-bar-progress-bar-standalone-smooth-animation/838951)
end
----------------------------------------------------------------
-- !!! This function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
Config.Notification = function(src, type, xPlayer, message) -- xPlayer = ESX.GetPlayerFromId(src)
if type == 'client' then -- clientside
ESX.ShowNotification(message) -- replace this with your Notify
elseif type == 'server' then -- serverside
xPlayer.showNotification(message) -- replace this with your Notify
end
end
---------------------------------------------------
Config.WeaponAmmoClips = { -- Will give this many bullets to player
-- Items are used for all types of weapons
['weaclip'] = 30,
['weabox'] = 150,
-- Items are used for only that kind of weapon type
['pistolclip'] = 12,
['smgclip'] = 30,
['shotgunclip'] = 25,
['rifleclip'] = 25,
['mgclip'] = 50,
['sniperclip'] = 15,
['throwableclip'] = 5,
-- CUSTOM ITEMS // Add them in server_items.lua
['polweaclip'] = 30, -- All Weapontypes
['polweabox'] = 150, -- All Weapontypes
}
----------------------------------------------------------------
-- Set true if you like to remove item when used
Config.Removeables = {
-- Weapon Clips
['weaclip'] = true,
['weabox'] = true,
['pistolclip'] = true,
['smgclip'] = true,
['shotgunclip'] = true,
['rifleclip'] = true,
['mgclip'] = true,
['sniperclip'] = true,
['throwableclip'] = true,
-- Weapon Attachments
Attachments = true,
Attachment_Remover = false, -- recommended set to false
-- Weapon Tints
Color = true,
-- CUSTOM ITEMS // Add them in server_items.lua
['polweaclip'] = true,
['polweabox'] = true,
}
Alles anzeigen
Requirements
- ESX 1.2 (v1-final) or ESX Legacy
Optional
- NativeUI