vGear v1.2
Simple gear on (re)spawn/button press
Update 17-12-2018
I will no longer be maintaining/supporting this resource. The GitHub repo has been archived. Fork it if you want to update it yourself.
This is a VERY simple resource that gives players some pre-defined (configurable) gear when they (re)spawn (configurable) or press a button (configurable).
Features:
- Give weapons (completely configurable)
- Give weapon components (flashlight, surpressor, extended clips etc… completely configurable)
- Enable/Disable manual gear equip button
- Customize manual gear equip button bind
- Customize “gear equipped” message.
- Enable/Disable gear equipment on player (re)spawn
- Enable/Disable cleaning player clothes when equipping the gear
- Enable/Disable giving max armor to player when equipping the gear
- Enable/Disable healing the player when equipping the gear
- Custom command to equip gear
- Enable/Disable custom command
Default configuration
spoiler
local GiveLoadoutOnRespawn = false -- should players receive the gear when they (re)spawn? (default: false)
local EnableManualButton = true -- Should players be able to use the ManualLoadoutButton (default F7) to get the gear? (default: true)
local ManualLoadoutButton = 168 -- The button to be pressed to receive the loadout (default: 168 (F7))
local ClearPlayerClothes = true -- Should the player's clothes be cleaned? (remove blood etc.) (default: true)
local HealPlayer = true -- Should the player be healed (max health) (default: true)
local GiveMaxArmor = true -- Should the player receive full body armor? (default: true)
local ReceivedLoadoutMessage = '^1Gear equipped, enjoy!' -- the message the player receives after getting the gear.
local LoadoutCommand = "loadout" -- The command that equips the loadout. (Default: "loadout")
local EnableCommand = false -- Should the command be enabled? (true = yes, false = no) (default: false)
-- note for the LoadoutCommand: don't add a / because that's already added in the code!
-- https://wiki.fivem.net/wiki/Weapons
-- {weaponHash, amountOfAmmoToGive} Too much ammo might crash the game, be careful!
local spawnLoadoutList = {
{0x34A67B97, 1}, -- Jerry Can
{0x8BB05FD7, 1}, -- Flashlight
{0x678B81B1, 1}, -- Nightstick
{0x060EC506, 1}, -- Fire Extinguisher
{0x3656C8C1, 1}, -- Stun Gun
{0x5EF9FEC4, 200}, -- Combat Pistol
{0x83BF0278, 200}, -- Carbine Rifle
}
-- https://wiki.fivem.net/wiki/Weapon_Components
-- {weaponHashToApplyComponentTo, weaponComponentHash} Any extras/components that need to be attached to certain weapons? Enter them below
local spawnLoadoutExtrasList = {
{0x5EF9FEC4, 0x359B7AAE}, -- Combat Pistol Flashlight
{0x5EF9FEC4, 0xD67B4F2D}, -- Combat Pistol Extended Clip
{0x83BF0278, 0x7BC4CDDC}, -- Carbine Rifle Flashlight
{0x83BF0278, 0x91109691}, -- Carbine Rifle Extended Clip
{0x83BF0278, 0xC164F53}, -- Carbine Rifle Grip
{0x83BF0278, 0xA0D89C42}, -- Carbine Rifle Scope
}
To download punch here.
Current version:
- v1.2 (Added custom command)
Old versions:
- v1.1
- v1.0 (no longer available)