Refresh PunkteSystem
This commit is contained in:
@@ -398,7 +398,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
string targetname = NAPI.Player.GetPlayerName(target);
|
||||
if (target.GetUser().DriverLicenseVehicle == false && target.GetUser().DriverLicenseBike == false)
|
||||
{
|
||||
if (amount > 0 && amount < 9)
|
||||
if (amount > -9 && amount < 9)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
@@ -408,7 +408,16 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
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);
|
||||
if (target.GetUser().Points >= 8)
|
||||
if(target.GetUser().Points < 0)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
User target2 = target.GetUser(dbContext);
|
||||
target2.Points = 0;
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
}
|
||||
else 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~Dir wird ~r~Auo- ~w~und ~r~Motorradführerschein ~w~entzogen.", true);
|
||||
|
||||
Reference in New Issue
Block a user