Backpacks only drop in pvpSuggestion

Is there a Rule or a way to make it so backpacks dont drop when player is killed by a npc only dropped when killed pvp by another player? Thank you!

I can consider this.

My advice previously has been that people should develop an addon plugin for use cases that involve changing drop on death conditions. It wouldn't be very much code, just need to hook the death event and call the Backpacks API to drop the backpack if all the criteria are met.

if you could look into it that would be awesome! have been trying myself havent had any luck yet:/

Merged post

do you have any more tips to help me trying to set it up like you mentiond but havent gotten anywhere:/

In the Backpacks documentation, there's an API method called API_DropBackpack. You can find an example in the RaidableBases code. Basically you just need to hook OnEntityDeath/OnEntityKill for the BasePlayer type, then check the HitInfo (2nd parameter, for OnEntityDeath) to check who initiated the damage, then either call the Backpacks method or not. Also, disable drop on death in the Backpacks config since it will be handled by the addon plugin.

thankyou!