Page cover

πŸ“ƒUsage

Everything you need to understand how to use the script.

Manual Export Function

exports["petris-lootbags"]:DropPlayerLootBag(playerId, bypass)

The bypass parameter should be a boolean value. If true, it bypasses the whitelisted/blacklisted areas & IsPlayerLootable open function restrictions.

Blacklisted Items Configuration

BlacklistedItems = {
        ["Items"] = {
            "id_card", 
            "driver_license",
        },
        ["Money"] = {
            "bank",
        },
        ["Weapons"] = {
            "WEAPON_STUNGUN",
        }
    },

You can put any items/money types and weapons in your blacklisted inventory items list.

Whitelisted/Blacklisted Areas Configuration

Firstly, you must select how the location restriction system will work. In ["System"] value, change between whitelisted and blacklisted values. Then, you will add your own blacklisted/whitelisted locations just like the examples above.

Define Lootable Players

There is already a built-in check which checks if the player is staff. So, when the player is a server's staff the loot bag will not spawn upon his death. You can add your own restrictions there, freely.

Allow/Block Players From Collecting

There is already a built-in check which checks if the player is working for the ambulance. You can freely remove or change this restriction as was added as an example.

Last updated