delete vehicle trailer on vdestroy

This commit is contained in:
hydrant
2019-05-13 12:16:52 +02:00
parent 1080f2bd1e
commit 501c9ba0e7
2 changed files with 2 additions and 1 deletions

View File

@@ -954,6 +954,7 @@ namespace ReallifeGamemode.Server.Commands
} }
VehicleManager.DeleteVehicle(targetVeh); VehicleManager.DeleteVehicle(targetVeh);
targetVeh.Trailer?.Delete();
} }
[Command("vlivery", "~m~Benutzung: ~s~/vlivery [Livery]")] [Command("vlivery", "~m~Benutzung: ~s~/vlivery [Livery]")]

View File

@@ -115,7 +115,7 @@ namespace ReallifeGamemode.Server.Events
}; };
string faction = u.FactionLeader ? u.Faction.Name : null; string faction = u.FactionLeader ? u.Faction.Name : null;
string group = u.Group?.Name ?? null; string group = u.Group != null && u.GroupRank >= GroupRank.MANAGER ? u.Group.Name : null;
bool factionInvite = player.HasData("accept_faction_invite"); bool factionInvite = player.HasData("accept_faction_invite");
bool groupInvite = player.HasData("accept_group_invite"); bool groupInvite = player.HasData("accept_group_invite");