v5.0.1 mayor
Society-paid shops, weapon unloading, extra carry weight and a security fix
15cambios

Society-paid shops, weapon unloading, extra carry weight and a security fix
15cambios

[02] Versión
Shops can now be paid from the buyer's job society, weapons can be unloaded back into ammo, admins and scripts can give a character extra carry weight, spoiled items can throw themselves away, and a new decals clothing slot is in. Clothing saves again on ESX, throwables work as expected, QBCore cash no longer gets decimals, and a server event that let a modified client change its cash is closed.
qs_inventory_extra_weight table is created on its own the first time the resource starts.decals, was added to shared/items.lua. If you keep your own shared/items.lua, copy the decals entry into it (its image ships in web/).Society-paid shops. In /inventorycreator → Shops, set Players pay with to Society. The money then comes from the society account of the buyer's job, and only the jobs in the shop's Access list can buy there.
Extra carry weight. /inventoryextraweight [id] [kg] (no kg shows the current value, 0 removes it). Scripts can use SetPlayerExtraWeight, AddPlayerExtraWeight and GetPlayerExtraWeight (grams, by server id or identifier).
New update checker. The server console now shows your version, the latest one, how urgent the update is and what changed.
Replace every file in the resource, except what you edited yourself:
fxmanifest.lua — new version. server/version.lua was removed and replaced by server/updater.lua.server/custom/framework/esx.lua and qb.lua — new society money functions, and the QB admin check. If you edited them, copy your changes onto the new files.client/custom/clothing/esx.lua and qb.lua, client/custom/misc/ (OpenInventory.lua, SellingItems.lua, UseWeapon.lua, commands.lua), client/custom/target/qb.lua changed.server/custom/misc/ (AddItem.lua, OpenInventory.lua, RemoveItem.lua, SellingItems.lua, SetInventoryData.lua) changed.shared/items.lua — the new decals item. shared/data/clothing.lua — the new decals slot.server/modules/extraweight.lua and server/modules/society.lua — new files.sql/esx.sql and sql/qb.sql — the new table, for reference.locales/ — every language changed. Re-apply any translation you edited.web/ — replace the whole folder.The updateCash event could be triggered from any client. It now only answers the server.
A shop set to pay with Society takes the money from the society account of the buyer's job. Only the jobs in its Access list can buy there.
The new Unload button puts the loaded rounds back in the inventory as its ammo item.
/inventoryextraweight [id] [kg] for admins, and SetPlayerExtraWeight / AddPlayerExtraWeight / GetPlayerExtraWeight exports for scripts. It is saved per character.
An option in /inventoryconfig → Items removes items marked "Delete when broken" once their quality reaches 0, with a configurable check interval. Off by default: they are then only removed on use, as before.
Badges, logos and patches now have their own slot and item in the clothing menu.
Two new options in /inventoryconfig. Off, none of them opens and nothing can be sold or bought there.
Shows your version, the latest one, the update type, its urgency and a short changelog.
Clothing changes were not being saved on ESX.
Grenades, molotovs and the like now work as expected.
Prices with decimals left QBCore cash with decimals. Payouts are now rounded.
The permission check could refuse real admins on QBCore.
Opening the wheel no longer moves the camera.
Shops created from other resources now keep their configuration.
It printed an error in the server console.