Separate permission for corpses and containersNo Thanks

i want to add extra on this plugin 

private const string PermLootProtection = "godmode.lootprotection";
private const string PermLootProtectionCorpse = "godmode.lootprotectioncorpse";
private const string PermLootProtectionContainer = "godmode.lootprotectioncontainer";

What i do wrong on code?

        private object CanLootEntity(BasePlayer looter, DroppedItemContainer container) {
            if (looter == null || container == null) return null;
            var targetId = container.playerSteamID.ToString();
            if (!targetId.IsSteamId()) return null;
            if (IsGod(targetId) && permission.UserHasPermission(targetId, PermLootProtectionContainer) && !permission.UserHasPermission(looter.UserIDString, PermLootPlayers)) {
                Print(looter, Lang("NoLooting", looter.UserIDString));
                return false;
            }
            return null;
        }

        private object CanLootEntity(BasePlayer looter, LootableCorpse corpse) {
            if (looter == null || corpse == null) return null;
            var targetId = corpse.playerSteamID.ToString();
            if (!targetId.IsSteamId()) return null;
            if (IsGod(targetId) && permission.UserHasPermission(targetId, PermLootProtectionCorpse) && !permission.UserHasPermission(looter.UserIDString, PermLootPlayers)) {
                Print(looter, Lang("NoLooting", looter.UserIDString));
                return false;
            }
            return null;
        }

Replace those two hooks with this.

Thank you for your fast reply.

How can i make this corpse and container not be looted with godmode off what i wanted to make on your plugin is that who have permission on PermLootProtectionCorpse and PermLootProtectionContainer to not be able to be looted by other players and if they have PermLootPlayers can loot.

 if (IsGod(targetId) && permission.UserHasPermission(targetId, PermLootProtectionCorpse) && !permission.UserHasPermission(looter.UserIDString, PermLootPlayers))


if (IsGod(targetId) && permission.UserHasPermission(targetId, PermLootProtectionContainer) && !permission.UserHasPermission(looter.UserIDString, PermLootPlayers)) {

Prevent players with PermLootPlayers from looting godmode players with PermLootProtectionCorpse / PermLootProtectionContainer?
I think you need to understand what this code means so that you can code it.

 
Locked automatically