On_LootUse

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,095
4,813
113
At your house.
github.com
Method:
On_LootUse

Argument(s):
1: LootStartEvent lse

Examples:

JavaScript:

function On_LootUse(LootStartEvent) {
// If Entity is a Chest, not a backpack, and Player is not an Admin
if (LootStartEvent.IsObject && !LootStartEvent.Player.Admin) {
LootStartEvent.Cancel();
}
}
Python:

def On_LootUse(self, LootStartEvent):
# If Entity is a Chest, not a backpack, and Player is not an Admin
if LootStartEvent.IsObject and not LootStartEvent.Player.Admin:
LootStartEvent.Cancel()
Code:
    function On_LootUse(LootStartEvent)
-- If Entity is a Chest, not a backpack, and Player is not an Admin
if LootStartEvent.IsObject and not LootStartEvent.Player.Admin then
LootStartEvent:Cancel()
end
end