private void ColAction(IColShape colShape, IEntity targetEntity, bool state) { if (colShape == null) { return; } if (!colShape.Exists) { return; } IPlayer client = targetEntity as IPlayer; if (client == null || !client.Exists) { return; } string colshapeName = colShape.GetColShapeName(); ulong colshapeId = colShape.GetColShapeId(); if (colshapeName == "Cardealer" && state == true) { ulong vehprice = colShape.GetColshapeCarDealerVehPrice(); string vehname = colShape.GetColshapeCarDealerVehName(); HUDHandler.SendNotification(client, 1, 2500, $"Name: {vehname}<br>Preis: {vehprice}$"); return; } else if (colshapeName == "DoorShape" && state) { var doorData = ServerDoors.ServerDoors_.FirstOrDefault(x => x.id == (int)colshapeId); if (doorData == null) { return; } client.EmitLocked("Client:DoorManager:ManageDoor", doorData.hash, new Position(doorData.posX, doorData.posY, doorData.posZ), (bool)doorData.state); } }