CanLootEntity
Called when a player tries to loot a WorldItem
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void CanLootEntity( BasePlayer player, WorldItem instance )
{
Puts( "CanLootEntity works!" );
}
Location
- WorldItem::RPC_OpenLoot(BaseEntity/RPCMessage rpc)
csharp
//---
}
if (!this.CanOpenInSafeZone(player))
{
return;
}
if (Interface.CallHook("CanLootEntity", player, this) != null)
{
return;
}
if (player.inventory.loot.StartLootingEntity(this, true))
{
//---