numberplates aktualisiert

This commit is contained in:
Luke
2021-05-25 22:24:25 +00:00
parent f375e699c0
commit 7bd406cfa7

View File

@@ -1,4 +1,4 @@
using GTANetworkAPI; using GTANetworkAPI;
using ReallifeGamemode.Database.Entities; using ReallifeGamemode.Database.Entities;
using ReallifeGamemode.Server.Job; using ReallifeGamemode.Server.Job;
using ReallifeGamemode.Server.Managers; using ReallifeGamemode.Server.Managers;
@@ -47,16 +47,6 @@ namespace ReallifeGamemode.Server.Extensions
string numberplate = $"{veh.Id}"; string numberplate = $"{veh.Id}";
if (veh is FactionVehicle fV)
{
numberplate = $"F{string.Join(".", fV.GetOwners())} " + numberplate;
}
if (veh is UserVehicle uV)
{
numberplate = $"U{uV.UserId} " + numberplate;
}
if (veh is ShopVehicle sV) if (veh is ShopVehicle sV)
{ {
numberplate = "Shop"; numberplate = "Shop";
@@ -67,24 +57,6 @@ namespace ReallifeGamemode.Server.Extensions
newVeh.SetSharedData("shopVehicleTextLabel", label.Handle.Value); newVeh.SetSharedData("shopVehicleTextLabel", label.Handle.Value);
} }
if (veh is GroupVehicle gV)
{
numberplate = $"G{gV.GroupId} " + numberplate;
}
if (veh is JobVehicle jV)
{
numberplate = $"J{jV.JobId} " + numberplate;
}
if (veh is SchoolVehicle)
{
numberplate = "FS" + numberplate;
}
if (veh is NoobVehicle)
{
numberplate = "NV" + numberplate;
}
NAPI.Vehicle.SetVehicleNumberPlate(newVeh, numberplate); NAPI.Vehicle.SetVehicleNumberPlate(newVeh, numberplate);
veh.NumberPlate = numberplate; veh.NumberPlate = numberplate;