diverse fixes und improvments

This commit is contained in:
hydrant
2021-05-27 21:41:24 +02:00
parent 5884ee50d9
commit 1dea6bc28d
4 changed files with 29 additions and 28 deletions

View File

@@ -14,7 +14,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 201;
public override string Name => "Notfallkit";
public override string Description => "Fahrzeug reparieren";
public override int Gewicht => 1000;
public override int Gewicht => 5000;
public override string Einheit => "g";
public override uint Object => 875075437;
public override int Price => 2500;
@@ -55,12 +55,13 @@ namespace ReallifeGamemode.Server.Inventory.Items
using (var dbContext = new DatabaseContext())
{
Vector3 position = veh.Position;
float heading = veh.Heading;
player.SendNotification("Du hast ~g~" + Name + " ~s~verwendet", false);
ServerVehicle serverVehicle = veh.GetServerVehicle(dbContext);
serverVehicle.Spawn(veh).Position = position;
Vehicle newVeh = serverVehicle.Spawn(veh);
newVeh.Repair();
newVeh.Rotation = new Vector3(0, 0, serverVehicle.Heading);
newVeh.Position = position;
newVeh.Rotation = new Vector3(0, 0, heading);
return true;
}
}