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

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

[02] Versión
Shops can now be paid from the buyer's job society, and shop tabs can be limited to certain jobs. Weapons can be unloaded back into ammo, admins and scripts can give a character extra carry weight, spoiled food can throw itself away, and a new decals clothing slot is in. Clothing saves again with esx_skin, a piece dragged onto a worn one is swapped instead of lost, throwables stay in hand until thrown, and a server event that let a modified client add money to itself 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 (from their minimum grade) can buy there. A society shop with no jobs in Access can't be used by anyone. Supported: esx_society (esx_addonaccount), qb-banking, Renewed-Banking and qb-management. For shops made with the CreateShop export, use account = 'society' with society = 'mechanic' or jobs = {{ name = 'mechanic', grade = 0 }}.
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 defaults. On servers that never changed these settings, the pause map now hides other players' blips, and One bullet per ammo item is off. Both can be changed in /inventoryconfig.
Replace every file in the resource, except what you edited yourself:
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/ (SellingItems.lua, UseWeapon.lua, commands.lua), client/custom/target/qb.lua changed.server/custom/misc/ (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.locales/ — every language changed. Re-apply any translation you edited.web/ — replace the whole folder.The server event that adds or removes cash from the cash item could be triggered by any client, for any player. It now only answers the inventory itself.
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, from their minimum grade, can buy there. Works with esx_society, qb-banking, Renewed-Banking and qb-management.
Each tab of a shop can be limited to some jobs or gangs, from a minimum grade. Everyone else doesn't see it and can't buy its products.
Unload in the weapon's item menu puts the loaded rounds back in the inventory as its ammo item. The server checks how many there really are.
/inventoryextraweight [id] [kg] for admins, and SetPlayerExtraWeight / AddPlayerExtraWeight / GetPlayerExtraWeight exports for scripts. It is saved per character and added on top of the skill bonus.
An option in /inventoryconfig → Items removes items marked delete once they have fully decayed, and tells the player. Off by default: they are then only removed on use, as before.
Badges, logos and patches now have their own slot and item, saved with the rest of the outfit.
Two new options in /inventoryconfig. Off, none of them opens and nothing can be sold or bought there, also from a window that was already open.
An option in /inventoryconfig leaves out the live blips other scripts put on other players, so nobody can follow them from the pause menu. On by default.
Only affects servers that never changed it in /inventoryconfig.
Nothing was saved with esx_skin, and watches and bracelets were stored one model off. The vest and decals are saved too now.
Dropping a piece onto a clothing slot already in use destroyed the dragged piece. The worn one now goes back to the inventory and the new one is put on; with no room, nothing changes.
Grenades, molotovs and the like dropped at the player's feet or vanished before they could be thrown, and the next one couldn't be taken out right after throwing.
Selling at a price with decimals left QBCore cash with decimals, which stuck the cash item. Payouts are rounded, and amounts saved with decimals are fixed when the inventory loads.
On some builds the permission check failed with an error and refused real admins. Each check now runs on its own.
Opening the wheel again and again tilted the camera down a little each time.
It printed an error in the server console. The Dupe Blocked lines now only show with debug on.