public void On_LootingPlayer(PlayerLootEvent ple) { SetHookWorking("On_LootingPlayer"); Broadcast(ple.Target.Name + " is being looted by " + ple.Looter.Name); }
/// <summary> /// Called from <c>PlayerLoot.StartLootingItem(BasePlayer)</c> . /// </summary> public static void On_LootingPlayer(PlayerLoot playerLoot) { BasePlayer looter = playerLoot.GetComponent<BasePlayer>(); var ple = new PlayerLootEvent(playerLoot, Server.GetPlayer(looter), Server.GetPlayer(playerLoot.entitySource as BasePlayer)); OnNext("On_LootingPlayer", ple); if (ple.Cancel) { playerLoot.Clear(); looter.SendConsoleCommand("chat.add", 0, String.Format("{0}: {1}", Server.server_message_name.ColorText("fa5"), ple.cancelReason)); } }
public void OnLootingPlayer(PlayerLootEvent le) { this.Invoke("On_LootingPlayer", le); }