[PAID] vsWeaponLevel
Description
The vsWeaponLevel system offers your roleplay server a realistic weapon system.
Players should not be able to handle a weapon perfectly the first time they use it.
They have to train with the weapon at the shooting ranges you create to level up their weapons.
You can create as many levels as you like.
With each level the handling and recoil of the weapon improves.
So be one of the few roleplay servers with a realistic weapon system!
Features:
- Weapon Level System
- Weapon recoil system
- Shooting range system
- Create unlimited shooting ranges
- Create unlimited weapon levels
Get this Script at our Store for just 14.99 € !
Showcase
Config
Config = {}
Config.Debug = false -- Disable This!!!
Config.ESX = true -- select your esx version (true = old esx version)
Config.SpawnDistance = 3.0
Config.MarkerSize = {x = 1.5, y = 1.5, z = 1.5}
Config.BlipName = "Weapon Instructor"
Config.Sprite = 175
Config.Display = 2
Config.Scale = 0.8
Config.Colour = 2
function ShowNotification(text)
ESX.ShowNotification(text)
end
Config.ArmoryStores = {
WeaponStorePDM = {
coords = vector3(13.5052, -1097.2141, 29.8347),
txtPos = vector3(13.4211, -1097.2135, 30.7),
heading = 164.0607,
model = "mp_m_weapexp_01",
id = 1,
},
WeaponStoreSouth = {
coords = vector3(821.5058, -2163.8176, 29.6567),
txtPos = vector3(821.5058, -2163.8176, 30.6567),
heading = 356,
model = "mp_m_weapexp_01",
id = 2,
},
}
Config.TrainingModel = "s_m_y_mime" -- The NPC Model you shoot https://docs.fivem.net/docs/game-references/ped-models/
Config.Locales = {
["EnterShootingRange"] = "Press [E] to train your Skill!",
["KillsEarnedXP"] = "You successfully killed %d objects, you earned %d XP for it.",
["ShowKillHelpScreenText"] = "You killed: %d of %d, you have %.1f seconds left",
["TimeExceeded"] = "Time exceeded! You took too long.",
["AllreadyIngame"] = "You are allready in the Range!",
["MaxLevel"] = "Because you are the highest Level you didn't earned any XP!",
["SwitchedWeapon"] = "You are not allowed to use a different Weapon!",
["NotEnoughMoney"] = "You dont have enough money to enter the range!",
["StartingRange"] = "You paid %d$ to enter the range",
}
Config.MaxLevel = 5
Config.WeaponLevels = {
[416676503] = { -- HandGuns
[1] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.8, intensity = 0.1 },
[2] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.6, intensity = 0.08 },
[3] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.4, intensity = 0.05 },
[4] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.2, intensity = 0.03 },
[5] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.1, intensity = 0.01 },
},
[-957766203] = { -- SMG
[1] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.8, intensity = 0.18 },
[2] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.6, intensity = 0.15},
[3] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.4, intensity = 0.10},
[4] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.2, intensity = 0.08},
[5] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.1, intensity = 0.05},
},
[860033945] = { -- Shotgun
[1] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.8, intensity = 0.2 },
[2] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.7, intensity = 0.16 },
[3] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.65, intensity = 0.14 },
[4] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.6, intensity = 0.12 },
[5] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.3, intensity = 0.08 },
},
[970310034] = { -- Assault Rifle
[1] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.8, intensity = 0.12 },
[2] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.7, intensity = 0.10 },
[3] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.6, intensity = 0.09 },
[4] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.5, intensity = 0.07 },
[5] = { version = 'MEDIUM_EXPLOSION_SHAKE', recoil = 0.35, intensity = 0.06 },
},
[1159398588] = { -- Light Machine Gun
[1] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.5, intensity = 0.18 },
[2] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.4, intensity = 0.16},
[3] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.35, intensity = 0.14},
[4] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.3, intensity = 0.12},
[5] = { version = 'SMALL_EXPLOSION_SHAKE', recoil = 0.2, intensity = 0.05},
},
[-1212426201] = { -- Sniper
[1] = { version = 'LARGE_EXPLOSION_SHAKE', recoil = 1.0, intensity = 0.3 },
[2] = { version = 'LARGE_EXPLOSION_SHAKE', recoil = 0.7, intensity = 0.13 },
[3] = { version = 'LARGE_EXPLOSION_SHAKE', recoil = 0.6, intensity = 0.11 },
[4] = { version = 'LARGE_EXPLOSION_SHAKE', recoil = 0.5, intensity = 0.09 },
[5] = { version = 'LARGE_EXPLOSION_SHAKE', recoil = 0.4, intensity = 0.05 },
},
}
Config.NeededXP = {
[416676503] = {
[1] = {trainCost = 100, neededXP = 200}, -- 10x for Level 2
[2] = {trainCost = 200, neededXP = 600}, -- 30x for Level 3
[3] = {trainCost = 300, neededXP = 1500}, -- 150x for Level 4
[4] = {trainCost = 400, neededXP = 2500}, -- 100x for Level 5 (Hard)
-- After this Level 5 / Config.MaxLevel
[5] = {trainCost = 0, neededXP = 9999},
}, -- Handgun
[-957766203] = {
[1] = {trainCost = 100, neededXP = 200},
[2] = {trainCost = 200, neededXP = 600},
[3] = {trainCost = 300, neededXP = 1500},
[4] = {trainCost = 400, neededXP = 2500},
-- After this Level 5 / Config.MaxLevel
[5] = {trainCost = 0, neededXP = 9999},
}, -- Submachine Gun
[860033945] = {
[1] = {trainCost = 100, neededXP = 200},
[2] = {trainCost = 200, neededXP = 600},
[3] = {trainCost = 300, neededXP = 1500},
[4] = {trainCost = 400, neededXP = 2500},
-- After this Level 5 / Config.MaxLevel
[5] = {trainCost = 0, neededXP = 9999},
}, -- Shotgun
[970310034] = {
[1] = {trainCost = 100, neededXP = 200},
[2] = {trainCost = 200, neededXP = 600},
[3] = {trainCost = 300, neededXP = 1500},
[4] = {trainCost = 400, neededXP = 2500},
-- After this Level 5 / Config.MaxLevel
[5] = {trainCost = 0, neededXP = 9999},
}, -- Assault Rifle
[1159398588] = {
[1] = {trainCost = 100, neededXP = 200},
[2] = {trainCost = 200, neededXP = 600},
[3] = {trainCost = 300, neededXP = 1500},
[4] = {trainCost = 400, neededXP = 2500},
-- After this Level 5 / Config.MaxLevel
[5] = {trainCost = 0, neededXP = 9999},
}, -- Light Machine Gun
[-1212426201] = {
[1] = {trainCost = 100, neededXP = 200},
[2] = {trainCost = 200, neededXP = 600},
[3] = {trainCost = 300, neededXP = 1500},
[4] = {trainCost = 400, neededXP = 2500},
-- After this Level 5 / Config.MaxLevel
[5] = {trainCost = 0, neededXP = 9999},
}, -- Sniper
}
Config.PracticeTasks = {
[416676503] = { -- Handgun
[1] = {weapon = "WEAPON_COMBATPISTOL", needKills = 20, timeToKill = 2, timeForKills = 25, addXP = 20}, -- CombatPistol
[2] = {weapon = "WEAPON_APPISTOL", needKills = 20, timeToKill = 3, timeForKills = 20, addXP = 20}, -- AP Pistol
[3] = {weapon = "WEAPON_HEAVYPISTOL", needKills = 10, timeToKill = 1, timeForKills = 20, addXP = 10},-- Heavy Pistol
[4] = {weapon = "weapon_pistol_mk2", needKills = 25, timeToKill = 2, timeForKills = 30, addXP = 25},-- SNS Pistol Mk II
[5] = {weapon = "weapon_pistol_mk2", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 0},-- Pistol Mk II
},
[-957766203] = { -- SMG
[1] = {weapon = "weapon_smg", needKills = 10, timeToKill = 2, timeForKills = 17, addXP = 10},
[2] = {weapon = "weapon_smg_mk2", needKills = 20, timeToKill = 2, timeForKills = 25, addXP = 20},
[3] = {weapon = "weapon_assaultsmg", needKills = 10, timeToKill = 1, timeForKills = 20, addXP = 10},
[4] = {weapon = "weapon_combatpdw", needKills = 25, timeToKill = 2, timeForKills = 30, addXP = 25},
[5] = {weapon = "weapon_machinepistol", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 0},
}, -- Shotgun
[860033945] = {
[1] = {weapon = "weapon_pumpshotgun", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 10},
[2] = {weapon = "weapon_sawnoffshotgun", needKills = 10, timeToKill = 2, timeForKills = 22, addXP = 10},
[3] = {weapon = "weapon_assaultshotgun", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 15},
[4] = {weapon = "weapon_bullpupshotgun", needKills = 20 , timeToKill = 3, timeForKills = 30, addXP = 20},
[5] = {weapon = "weapon_heavyshotgun", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 0},
}, -- Assault Rifle
[970310034] = {
[1] = {weapon = "weapon_assaultrifle", needKills = 10, timeToKill = 2, timeForKills = 17, addXP = 10},
[2] = {weapon = "weapon_carbinerifle", needKills = 20, timeToKill = 2, timeForKills = 25, addXP = 20},
[3] = {weapon = "weapon_carbinerifle_mk2", needKills = 10, timeToKill = 1, timeForKills = 20, addXP = 10},
[4] = {weapon = "weapon_specialcarbine", needKills = 25, timeToKill = 2, timeForKills = 30, addXP = 25},
[5] = {weapon = "weapon_assaultrifle", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 0},
}, -- Light Machine Gun
[1159398588] = {
[1] = {weapon = "weapon_mg", needKills = 10, timeToKill = 2, timeForKills = 17, addXP = 10},
[2] = {weapon = "weapon_combatmg", needKills = 20, timeToKill = 2, timeForKills = 25, addXP = 20},
[3] = {weapon = "weapon_combatmg_mk2", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 80},
[4] = {weapon = "weapon_gusenberg", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 80},
[5] = {weapon = "weapon_gusenberg", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 0},
}, -- Sniper
[-1212426201] = {
[1] = {weapon = "weapon_sniperrifle", needKills = 10, timeToKill = 5, timeForKills = 25, addXP = 15},
[2] = {weapon = "weapon_heavysniper", needKills = 10, timeToKill = 4, timeForKills = 20, addXP = 20},
[3] = {weapon = "weapon_marksmanrifle", needKills = 10, timeToKill = 4, timeForKills = 18, addXP = 20},
[4] = {weapon = "weapon_sniperrifle", needKills = 10, timeToKill = 2, timeForKills = 20, addXP = 20},
[5] = {weapon = "weapon_sniperrifle", needKills = 10, timeToKill = 2, timeForKills = 15, addXP = 0},
}, -- Sniper
}
Config.SpawnCoords = {
[1] = {
{ x = 18.6349, y = -1075.6503, z = 29.7970, heading = 155.0607 },
{ x = 21.2300, y = -1080.5420, z = 29.7970, heading = 162.7372 },
{ x = 18.9792, y = -1082.7452, z = 29.7981, heading = 158.1568 },
{ x = 15.2697, y = -1090.8531, z = 29.7980, heading = 114.9778 },
{ x = 12.4202, y = -1091.0951, z = 29.7970, heading = 146.9039 },
{ x = 13.0738, y = -1086.4203, z = 29.7970, heading = 167.1453 },
{ x = 15.6001, y = -1083.4034, z = 29.7970, heading = 180.6670 },
{ x = 21.1563, y = -1079.3721, z = 29.7970, heading = 184.1642 },
{ x = 23.3779, y = -1077.8513, z = 29.7970, heading = 170.5842 },
{ x = 23.0387, y = -1073.6199, z = 29.7970, heading = 154.0821 },
{ x = 20.1846, y = -1074.3867, z = 29.7970, heading = 148.5763 },
{ x = 18.6046, y = -1071.0854, z = 29.7970, heading = 174.4680 },
{ x = 26.7876, y = -1073.6212, z = 29.7976, heading = 173.9891 },
},
[2] = {
{ x = 817.1430, y = -2172.8330, z = 29.6180, heading = 0.9895 },
{ x = 818.9539, y = -2170.4177, z = 29.6639, heading = 326.9233 },
{ x = 826.5889, y = -2168.5750, z = 29.6190, heading = 336.9417 },
{ x = 824.0486, y = -2172.3445, z = 29.6266, heading = 120.5459 },
{ x = 824.3030, y = -2178.9082, z = 29.6193, heading = 240.5508 },
{ x = 825.4547, y = -2183.0859, z = 29.6211, heading = 101.2726 },
{ x = 821.9552, y = -2181.2375, z = 29.6296, heading = 66.5013 },
{ x = 818.0636, y = -2184.2344, z = 29.6573, heading = 183.5794 },
{ x = 820.0837, y = -2189.8823, z = 29.6206, heading = 208.9715 },
{ x = 824.9965, y = -2188.7112, z = 29.6267, heading = 329.9187 },
{ x = 821.5027, y = -2184.4788, z = 29.7519, heading = 24.1283 },
},
}
Optimization
-
IDLE: 0.00ms
-
RUNNING: 0.00ms
Further Information
SHOP: vsWeaponLevel
This resource is using the FiveM Asset Escrow system
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 1400 |
Requirements | ESX |
Support | Yes |