Add Keine Punkte Vergabe ohne FS und keine Minus Punkte

This commit is contained in:
Mac_Slash
2020-04-09 22:00:45 +02:00
parent ac64661c26
commit ee302d76b1

View File

@@ -396,6 +396,10 @@ namespace ReallifeGamemode.Server.Managers
Player target = PlayerService.GetPlayerByNameOrId(nameOrId); Player target = PlayerService.GetPlayerByNameOrId(nameOrId);
string playername = NAPI.Player.GetPlayerName(player); string playername = NAPI.Player.GetPlayerName(player);
string targetname = NAPI.Player.GetPlayerName(target); string targetname = NAPI.Player.GetPlayerName(target);
if (target.GetUser().DriverLicenseVehicle == false && target.GetUser().DriverLicenseBike == false)
{
if (amount > 0 && amount < 9)
{
using (var dbContext = new DatabaseContext()) using (var dbContext = new DatabaseContext())
{ {
User target2 = target.GetUser(dbContext); User target2 = target.GetUser(dbContext);
@@ -404,7 +408,7 @@ namespace ReallifeGamemode.Server.Managers
} }
player.SendNotification($"~w~Du hast ~y~{targetname} ~b~{amount} ~w~Strafpunkte gegeben. Grund: ~g~{reason}~w~."); player.SendNotification($"~w~Du hast ~y~{targetname} ~b~{amount} ~w~Strafpunkte gegeben. Grund: ~g~{reason}~w~.");
target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben.", true); target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben.", true);
if(target.GetUser().Points >= 8) if (target.GetUser().Points >= 8)
{ {
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~r~8/8 ~x~Strafpunkten.", true); target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~r~8/8 ~x~Strafpunkten.", true);
target.SendNotification($"~w~Dir wird ~r~Auo- ~w~und ~r~Motorradführerschein ~w~entzogen.", true); target.SendNotification($"~w~Dir wird ~r~Auo- ~w~und ~r~Motorradführerschein ~w~entzogen.", true);
@@ -423,6 +427,16 @@ namespace ReallifeGamemode.Server.Managers
} }
} }
else
{
player.SendNotification("~r~Du kannst nur zwischen 1 und 8 Punkte verteilen!");
}
}
else
{
player.SendNotification("~r~Spieler hat weder Auto- noch Motorradführerschein!");
}
}
#endregion #endregion
#region Spielerinteraktionen PFEILTASTE-LINKS #region Spielerinteraktionen PFEILTASTE-LINKS
[RemoteEvent("openTradeInventory")] [RemoteEvent("openTradeInventory")]