private void CheckPickup(BasePlayer player, BaseVehicle entity) { if (entity == null) { return; } if (entity.OwnerID != player.userID) { Message(player, "Pickup Ownership"); return; } foreach (var value in skins) { if (value.Value == entity.PrefabName) { if (permission.UserHasPermission(player.UserIDString, permPickup)) { entity.Kill(); GiveItem(player, value.Key); } return; } } }
private void CheckPickup(BasePlayer player, BaseVehicle entity) { if (entity == null) { return; } if (entity.OwnerID != player.userID) { Message(player, "Pickup Ownership"); return; } var container = entity.GetFuelSystem()?.GetFuelContainer(); if (container != null && container.IsValid() && container.IsLocked() == false && container.inventory.IsLocked() == false) { Message(player, "Fuel"); return; } foreach (var value in skins) { if (value.Value == entity.PrefabName) { if (permission.UserHasPermission(player.UserIDString, permPickup)) { entity.Kill(); GiveItem(player, value.Key); } return; } } }