π§© vorp_weaponsv2 next to Weapon Customization β
Built from the official 2.3 source. Two files change so it runs alongside Weapon Customization.
Keep this resource. It is VORP's ammo system, and removing it is what leaves ammo boxes doing nothing and ammo that never runs out.
Customers can get a copy with both edits already made from our Discord. The edits are small, so you can also make them yourself.
Before you start β
The line numbers below are for vorp_weaponsv2 version 2.3, the version line at the bottom of its fxmanifest.lua. If your copy is another version the numbers can differ, so find the text instead: search the file for the first words of the block.
Get the original from VORP: github.com/VORPCORE/vorp_weaponsv2. Keep a copy of both files before you edit them.
1. server/server.lua: delete lines 12 to 23 β
Search for syn_weapons:weaponused. The block starts on line 12, right after the end) on line 10 and the empty line 11, and it ends on line 22. Line 23 is an empty line, and line 24 is the next block, vorp_weapons:checkmoney.
Here are lines 9 to 24 as they are now:
end
end)
RegisterServerEvent("syn_weapons:weaponused", function(data)
local _source = source
local id = data.id
local hash = data.hash
MySQL.query('SELECT comps, used2 FROM loadout WHERE id = @id ', { id = id }, function(result)
if result[1] then
local components = json.decode(result[1].comps)
TriggerClientEvent("vorp_weapons:givecomp", _source, components, id, hash)
end
end)
end)
RegisterServerEvent("vorp_weapons:checkmoney", function(sum)Delete lines 12 to 23, the block and the empty line after it. Afterwards the same place reads:
end
end)
RegisterServerEvent("vorp_weapons:checkmoney", function(sum)vorp_inventory fires syn_weapons:weaponused every time a weapon leaves the satchel. This handler read that weapon's saved parts and applied them to the ped. A ped registration is by weapon model, so it landed on every gun of that model, and over anything another script had fitted to the weapon object. With both running as shipped, guns come out visibly wrong.
Nothing else sends vorp_weapons:givecomp, so that handler was the whole path. The ammo registration is further down the same file and stays untouched.
2. config/config.lua: empty the two station tables β
Search for customizationLocations. It starts on line 36 and ends on line 45. The next table, craftinglocation, starts on line 47 and ends on line 54.
Here are lines 34 to 55 as they are now:
customizationanimation = "WORLD_HUMAN_WRITE_NOTEBOOK", -- animations for customizations
customizationLocations = {
Valentine = {
Pos = { x = -277.22, y = 778.922, z = 119.50 }, -- location weapon customization station
Pos2 = { x = -276.47, y = 778.922, z = 119.80 }, -- location spawned weapon 3d model
},
Rhodes = {
Pos = { x = 1327.09, y = -1321.91, z = 77.88 }, -- location weapon customization station
Pos2 = { x = 1326.09, y = -1321.91, z = 78.28 }, -- location spawned weapon 3d model
},
},
craftinglocation = {
Valentine = {
Pos = { x = -277.0, y = 780.689, z = 119.68 }, -- location weapon crafting station
},
Rhodes = {
Pos = { x = 1329.68, y = -1320.9, z = 77.88 }, -- location weapon crafting station
},
},Replace lines 36 to 45 with one line, and lines 47 to 54 with one line. Afterwards the same place reads:
customizationanimation = "WORLD_HUMAN_WRITE_NOTEBOOK", -- animations for customizations
customizationLocations = {},
craftinglocation = {},If you want its station back later, paste the original blocks back, and move their coordinates somewhere else entirely.
Its counter stood on the same spot as ours. Both put a station at the gunsmith, which is one place in the game: measured, 0.24 m apart in Valentine and 0.80 m in Rhodes, well inside the prompt range, so a player was offered both at once. Each table is read in one place only, the loop that draws that prompt, so an empty one draws nothing.
client/client.lua is not changed. The ZOO_CHANGES.txt file inside the copy repeats all of this.
How you can tell it worked β
Weapon Customization reports at start whether vorp_weaponsv2 is running with that handler removed, and warns in red when it is the original.
