Pay / Überweisung erst ab 3 Spielstunden
This commit is contained in:
@@ -132,6 +132,11 @@ namespace ReallifeGamemode.Server.Bank
|
|||||||
|
|
||||||
using (var dbContext = new DatabaseContext())
|
using (var dbContext = new DatabaseContext())
|
||||||
{
|
{
|
||||||
|
if (player.GetUser().PlayedMinutes < 180)
|
||||||
|
{
|
||||||
|
player.SendNotification("~r~Du kannst Geld erst ab 3 Spielstunden vergeben");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (player.GetUser(dbContext) == target.GetUser(dbContext))
|
if (player.GetUser(dbContext) == target.GetUser(dbContext))
|
||||||
{
|
{
|
||||||
player.SendNotification($"~r~Du kannst dir selber kein Geld überweisen.");
|
player.SendNotification($"~r~Du kannst dir selber kein Geld überweisen.");
|
||||||
|
|||||||
@@ -752,6 +752,12 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
[RemoteEvent("CLIENT:InteractionMenu_Pay")]
|
[RemoteEvent("CLIENT:InteractionMenu_Pay")]
|
||||||
public void InteractionMenu_Pay(Player player, string jsonNameOrId, string stringAmount)
|
public void InteractionMenu_Pay(Player player, string jsonNameOrId, string stringAmount)
|
||||||
{
|
{
|
||||||
|
if (player.GetUser().PlayedMinutes < 180)
|
||||||
|
{
|
||||||
|
player.SendNotification("~r~Du kannst Geld erst ab 3 Spielstunden vergeben");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
string nameOrId = (string)JsonConvert.DeserializeObject(jsonNameOrId);
|
string nameOrId = (string)JsonConvert.DeserializeObject(jsonNameOrId);
|
||||||
int amount;
|
int amount;
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user