Musiker15 / msk_backpack

[ESX] Multiple Backpack Item
MIT License
13 stars 7 forks source link
backpack esx fivem lua plugin

Not longer Supported

msk_backpack

[ESX] Multiple Backpack Items

Description

Commands

Only if Config.BagInventory = 'secondary'!

Exports

You can use the exports clientside AND serverside

-- Returns the itemName saved in database or nil if the player don't has a Bag
local hasBag = exports.msk_backpack:hasBag(player)

Example

exports.msk_backpack:hasBag({source = playerId})
exports.msk_backpack:hasBag({identifier = playerIdentifier})
exports.msk_backpack:hasBag({player = xPlayer})

Requirements

Optional

Chezza Inventory only necessary if Config.BagInventory = 'secondary'!

Support for esx_ambulancejob

This removes the Backpack after death, resets the inventory space and removes all items inside

Go to `/client/main.lua` and search for `function RespawnPed(ped, coords, heading)`. Replace the function with this code: ```lua function RespawnPed(ped, coords, heading, isDied) SetEntityCoordsNoOffset(ped, coords.x, coords.y, coords.z, false, false, false) NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, heading, true, false) SetPlayerInvincible(ped, false) ClearPedBloodDamage(ped) TriggerServerEvent('esx:onPlayerSpawn') TriggerEvent('esx:onPlayerSpawn') TriggerEvent('playerSpawned') if isDied then TriggerServerEvent('msk_backpack:setDeathStatus', true) end end ``` Above this you find: `function RemoveItemsAfterRPDeath()`. Search for: `RespawnPed(PlayerPedId(), RespawnCoords, ClosestHospital.heading)` Replace it with this: `RespawnPed(PlayerPedId(), RespawnCoords, ClosestHospital.heading, true)`

My other Scripts

Paid

Free