Refresh TicketSystem

This commit is contained in:
Mac_Slash
2020-04-11 16:06:11 +02:00
parent e0104bb9b2
commit 1713bd8616
4 changed files with 14 additions and 6 deletions

View File

@@ -372,10 +372,10 @@ namespace ReallifeGamemode.Server.Managers
}
}
[RemoteEvent("CLIENT:InteractionMenu_LSPD_Ticket3")]
public void InteractionMenu_LSPD_Ticket3(Player player, string jsonNameOrId, string jsoAmount, string jsonReason)
public void InteractionMenu_LSPD_Ticket3(Player player, string jsonNameOrId, string stringAmount, string jsonReason)
{
string nameOrId = (string)JsonConvert.DeserializeObject(jsonNameOrId);
int amount = Int32.Parse((string)JsonConvert.DeserializeObject(jsoAmount));
int amount = Int32.Parse(stringAmount);
string reason = (string)JsonConvert.DeserializeObject(jsonReason);
Player target = PlayerService.GetPlayerByNameOrId(nameOrId);
string playername = NAPI.Player.GetPlayerName(player);
@@ -397,8 +397,8 @@ namespace ReallifeGamemode.Server.Managers
target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ein Ticket in Höhe von ~y~{amount}$ ~w~gestellt.", true);
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Strafticket im Interaktionsmenü annehmen.", true);
target.SetData("ticket_boolean", true);
NAPI.Data.SetEntityData(target, "ticket_amount", amount);
NAPI.Data.SetEntityData(target, "ticket_player", player);
target.SetData<int>("ticket_amount", amount);
target.SetData<Player>("ticket_player", player);
}
else
{