Refresh PunkteSystem
This commit is contained in:
@@ -63,8 +63,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
/*TaskMenuLSPD = new UIMenuItem("");
|
/*TaskMenuLSPD = new UIMenuItem("");
|
||||||
TaskMenuLSPD.SetRightLabel("");
|
TaskMenuLSPD.SetRightLabel("");
|
||||||
factionInteractionMenu.AddItem(TaskMenuLSPD);*/ //weiteres
|
factionInteractionMenu.AddItem(TaskMenuLSPD);*/ //weiteres
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -113,6 +111,8 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
mp.events.add("CLIENT:InteractionMenu_LSPD_Ticket", (name) => {
|
mp.events.add("CLIENT:InteractionMenu_LSPD_Ticket", (name) => {
|
||||||
ticketName = name;
|
ticketName = name;
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
string targetname = NAPI.Player.GetPlayerName(target);
|
string targetname = NAPI.Player.GetPlayerName(target);
|
||||||
if (target.GetUser().DriverLicenseVehicle == false && target.GetUser().DriverLicenseBike == false)
|
if (target.GetUser().DriverLicenseVehicle == false && target.GetUser().DriverLicenseBike == false)
|
||||||
{
|
{
|
||||||
if (amount > 0 && amount < 9)
|
if (amount > -9 && amount < 9)
|
||||||
{
|
{
|
||||||
using (var dbContext = new DatabaseContext())
|
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~.");
|
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 < 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~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);
|
||||||
|
|||||||
Reference in New Issue
Block a user