Price
$1.00[ESX][PAID] Weapon Components Script
A script by VS-Shop
Full Description
[ESX] Fivem Weapon Components Script
Enter your own item in the conig to create a Component for a specific weapon
Tebex - Script for $1.00
You can enter your own item in the config and the weapon to create your Component
Config = {}
-- [DE] Command Name zum zurücksetzen der Waffe
-- [EN] Command Name to reset the weapon
Config.CustomCommandName = 'reset'
-- [DE] Funktion zum Senden von Notifys
-- [EN] Function to send notifications
Config.noItemsEvent = {
eventName = 'ESX:Notify',
eventType = 'error',
eventDuration = 3000,
eventMessage = "Für diese Waffe wurden keine Gegenstände verwendet."
}
Config.noWeaponEvent = {
eventName = 'ESX:Notify',
eventType = 'error',
eventDuration = 3000,
eventMessage = "Keine Waffe ausgewählt."
}
-- [DE] Funktion zum Senden von Notifys
-- [EN] Function to send notifications
Config.SendWeaponModificationMessage = function(source, success, modificationName)
if success then
TriggerClientEvent('ESX:Notify', source, "info", 3000, "Deine Waffe hat jetzt " .. modificationName .. ".")
else
TriggerClientEvent('ESX:Notify', source, "error", 3000, "Für diese Waffe ist keine " .. modificationName .. " konfiguriert.")
end
end
-- [DE] Die Waffen und deren Komponenten hash
-- [EN] The weapons and their components hash
Config.WeaponSuppressors = {
[GetHashKey("WEAPON_PISTOL")] = "COMPONENT_AT_PI_SUPP_02",
[GetHashKey("WEAPON_PISTOL50")] = "COMPONENT_AT_PI_SUPP_02",
[GetHashKey("WEAPON_COMBATPISTOL")] = "COMPONENT_AT_PI_SUPP",
[GetHashKey("WEAPON_APPISTOL")] = "COMPONENT_AT_PI_SUPP",
[GetHashKey("WEAPON_ADVANCEDRIFLE")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_HEAVYPISTOL")] = "COMPONENT_AT_PI_SUPP",
[GetHashKey("WEAPON_SNSPISTOL_MK2")] = "COMPONENT_AT_PI_SUPP_02",
[GetHashKey("WEAPON_PISTOL_MK2")] = "COMPONENT_AT_PI_SUPP_02",
[GetHashKey("WEAPON_VINTAGEPISTOL")] = "COMPONENT_AT_PI_SUPP",
[GetHashKey("WEAPON_CERAMICPISTOL")] = "COMPONENT_CERAMICPISTOL_SUPP",
[GetHashKey("WEAPON_MICROSMG")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_SMG")] = "COMPONENT_AT_PI_SUPP",
[GetHashKey("WEAPON_ASSAULTSMG")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_SMG_MK2")] = "COMPONENT_AT_PI_SUPP",
[GetHashKey("WEAPON_MACHINEPISTOL")] = "COMPONENT_AT_PI_SUPP",
[GetHashKey("WEAPON_PUMPSHOTGUN")] = "COMPONENT_AT_SR_SUPP",
[GetHashKey("WEAPON_ASSAULTSHOTGUN")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_BULLPUPSHOTGUN")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_PUMPSHOTGUN_MK2")] = "COMPONENT_AT_SR_SUPP_03",
[GetHashKey("WEAPON_HEAVYSHOTGUN")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_COMBATSHOTGUN")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_ASSAULTRIFLE")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_CARBINERIFLE")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_BULLPUPRIFLE")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_BULLPUPRIFLE_MK2")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_SPECIALCARBINE_MK2")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_ASSAULTRIFLE_MK2")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_CARBINERIFLE_MK2")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_MILITARYRIFLE")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_SNIPERRIFLE")] = "COMPONENT_AT_AR_SUPP_02",
[GetHashKey("WEAPON_MARKSMANRIFLE_MK2")] = "COMPONENT_AT_AR_SUPP",
[GetHashKey("WEAPON_HEAVYSNIPER_MK2")] = "COMPONENT_AT_SR_SUPP_03",
[GetHashKey("WEAPON_MARKSMANRIFLE")] = "COMPONENT_AT_AR_SUPP",
itemName = "suppressor" -- [EN] The item name for all silencers
-- [DE] Der Gegenstandsnamen für alle Schalldämpfer
}
Config.WeaponExtendedClip = {
[GetHashKey("WEAPON_ADVANCEDRIFLE")] = "COMPONENT_ADVANCEDRIFLE_CLIP_02",
[GetHashKey("WEAPON_PISTOL")] = "COMPONENT_PISTOL_CLIP_02",
[GetHashKey("WEAPON_COMBATPISTOL")] = "COMPONENT_COMBATPISTOL_CLIP_02",
[GetHashKey("WEAPON_APPISTOL")] = "COMPONENT_APPISTOL_CLIP_02",
[GetHashKey("WEAPON_PISTOL50")] = "COMPONENT_PISTOL50_CLIP_02",
itemName = "extendedclip"
}
Config.WeaponFlashlight = {
[GetHashKey("WEAPON_ADVANCEDRIFLE")] = "COMPONENT_AT_AR_FLSH",
[GetHashKey("WEAPON_PISTOL")] = "COMPONENT_AT_PI_FLSH",
[GetHashKey("WEAPON_COMBATPISTOL")] = "COMPONENT_AT_PI_FLSH",
[GetHashKey("WEAPON_APPISTOL")] = "COMPONENT_AT_PI_FLSH",
[GetHashKey("WEAPON_PISTOL50")] = "COMPONENT_AT_PI_FLSH",
itemName = "flashlight"
}
Config.WeaponScope = {
[GetHashKey("WEAPON_ADVANCEDRIFLE")] = "COMPONENT_AT_SCOPE_SMALL",
itemName = "scope"
}
Config.WeaponCamo = {
[GetHashKey("WEAPON_ADVANCEDRIFLE")] = "COMPONENT_ADVANCEDRIFLE_VARMOD_LUXE",
[GetHashKey("WEAPON_PISTOL")] = "COMPONENT_PISTOL_VARMOD_LUXE",
itemName = "camo"
}
Config.WeaponGrip = {
[GetHashKey("weapon_specialcarbine")] = "COMPONENT_AT_AR_AFGRIP",
itemName = "weapongrip"
}
Config.WeaponDrumMagazine = {
[GetHashKey("weapon_specialcarbine")] = "COMPONENT_SPECIALCARBINE_CLIP_03",
[GetHashKey("weapon_smg")] = "COMPONENT_SMG_CLIP_03",
[GetHashKey("weapon_machinepistol")] = "COMPONENT_MACHINEPISTOL_CLIP_03",
[GetHashKey("weapon_heavyshotgunweapon_heavyshotgun")] = "COMPONENT_HEAVYSHOTGUN_CLIP_03",
itemName = "drummagazine"
}
-- [DE] Füge extra Komponente hinzu
-- [EN] Add extra components
-- Config.WeaponDrumMagazine = {Config.WeaponDrumMagazine = {
-- [GetHashKey("weapon_specialcarbine")] = "",
-- itemName = "drummagazine"
--}
Dependencies : ESX Legacy
Code is accessible | No |
Subscription-based | No |
Lines | 170 |
Requirements | ESX Legacy |
Support | Yes |
Community Reviews & Feedback
No approved reviews found for this script yet.