@@ -2,9 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Log;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
|
||||
@@ -12,6 +14,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
class Rentcar : Script
|
||||
{
|
||||
private static readonly ILogger logger = LogManager.GetLogger<Rentcar>();
|
||||
//In Sekunden
|
||||
public static int PAY_TIMER = 180;
|
||||
|
||||
@@ -69,6 +72,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
User user = player.GetUser(dbContext);
|
||||
user.BankAccount.Balance -= mapPlayerRentcarBill[player.Name].Item2;
|
||||
logger.LogInformation("Player {0} cancelled a rent and payed {1} dollars", player.Name, mapPlayerRentcarBill[player.Name].Item2);
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
|
||||
@@ -105,9 +109,9 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
player.TriggerEvent("BN_Show", "Fahrzeug seit ~b~" + (int)(time / 60) + "~w~ Minuten gemietet (Gesamtkosten: ~g~$~s~" + bill + ").");
|
||||
mapPlayerRentcarBill[player.Name] = (mapPlayerRentcarBill[player.Name].Item1, bill);
|
||||
mapPlayerRentcarBill[player.Name] = (mapPlayerRentcarBill[player.Name].Item1, bill);
|
||||
}
|
||||
|
||||
[RemoteEvent("SERVER:rentcarBooked")]
|
||||
|
||||
Reference in New Issue
Block a user