Solved OnLootUse

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
577
618
63
What is the way to do this?

C#:
            if (lootstartevent.Entity.Name.Contains("crate"))
            {
                Server.GetServer().BroadcastFrom("INFO", lootstartevent.Player.Name + "  IS LOOTING SupplyCrate");
                return;
            }
Thanks!!
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,098
4,863
113
At your house.
github.com
What is the way to do this?

C#:
            if (lootstartevent.Entity.Name.Contains("crate"))
            {
                Server.GetServer().BroadcastFrom("INFO", lootstartevent.Player.Name + "  IS LOOTING SupplyCrate");
                return;
            }
Thanks!!
Try printing out the name:

Server.GetServer().Broadcast(lootstartevent.Entity.Name);

I don't know the entity's name, but It should work once you see It's name.