Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop
This commit is contained in:
@@ -72,7 +72,7 @@ export default function carDealer(globalData: IGlobalData) {
|
||||
priceItem.SetRightLabel("~g~$~s~ " + moneyFormat(price));
|
||||
break;
|
||||
case 'Fraktion':
|
||||
priceItem.SetRightLabel("~g~$~s~ " + moneyFormat(price * 3));
|
||||
priceItem.SetRightLabel("~g~$~s~ " + moneyFormat(price * 1.5));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,9 +137,11 @@ export default function bankMenuHandle(globalData: IGlobalData) {
|
||||
|
||||
|
||||
mp.events.add('removeFactionBankmenu', () => {
|
||||
if (globalData.InMenu && factionBankmenu) {
|
||||
mp.gui.cursor.show(false, false);
|
||||
factionBankmenu.Close(true);
|
||||
globalData.InMenu = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
-1716589765,
|
||||
-2084633992,
|
||||
-1075685676,
|
||||
-1786099057
|
||||
-1786099057,
|
||||
-1074790547
|
||||
]
|
||||
|
||||
mp.events.add("playerJoin", () => {
|
||||
@@ -151,6 +152,7 @@
|
||||
checkWeaponhash() {
|
||||
let h = this.weapon;
|
||||
if (allowedWeaponHashes.indexOf(h) === -1) {
|
||||
mp.gui.chat.push("unallowed weapon: " + h);
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 501.551 501.551" style="enable-background:new 0 0 501.551 501.551;" xml:space="preserve">
|
||||
<path style="fill:#FFD15C;" d="M439.902,436.767c-111.804,21.943-266.449,21.943-378.253,0
|
||||
c-19.853-124.343-19.853-247.641,0-371.984c111.804-21.943,266.449-21.943,378.253,0
|
||||
C459.755,189.127,459.755,312.424,439.902,436.767z"/>
|
||||
<g>
|
||||
<polygon style="fill:#F8B64C;" points="451.396,486.922 451.396,486.922 451.396,486.922 439.902,436.767 61.649,436.767
|
||||
50.155,486.922 50.155,486.922 50.155,486.922 50.155,486.922 50.155,486.922 64.784,501.551 79.412,486.922 79.412,486.922
|
||||
92.996,501.551 107.625,486.922 107.625,486.922 122.253,501.551 135.837,486.922 135.837,486.922 150.465,501.551
|
||||
165.094,486.922 165.094,486.922 179.722,501.551 193.306,486.922 193.306,486.922 207.935,501.551 222.563,486.922
|
||||
222.563,486.922 236.147,501.551 250.776,486.922 250.776,486.922 265.404,501.551 278.988,486.922 278.988,486.922
|
||||
293.616,501.551 308.245,486.922 308.245,486.922 321.829,501.551 336.457,486.922 336.457,486.922 351.086,501.551
|
||||
365.714,486.922 365.714,486.922 379.298,501.551 393.927,486.922 393.927,486.922 408.555,501.551 422.139,486.922
|
||||
422.139,486.922 436.767,501.551 451.396,486.922 "/>
|
||||
<polygon style="fill:#F8B64C;" points="436.767,0 422.139,14.629 408.555,0 393.927,14.629 379.298,0 365.714,14.629 351.086,0
|
||||
336.457,14.629 321.829,0 308.245,14.629 293.616,0 278.988,14.629 265.404,0 250.776,14.629 236.147,0 222.563,14.629 207.935,0
|
||||
193.306,14.629 179.722,0 165.094,14.629 150.465,0 135.837,14.629 122.253,0 107.625,14.629 92.996,0 79.412,14.629 64.784,0
|
||||
50.155,14.629 61.649,64.784 439.902,64.784 451.396,14.629 "/>
|
||||
</g>
|
||||
<ellipse transform="matrix(-0.4695 -0.8829 0.8829 -0.4695 147.1146 589.9061)" style="fill:#FF7058;" cx="250.773" cy="250.758" rx="100.307" ry="152.551"/>
|
||||
<g>
|
||||
<path style="fill:#F8B64C;" d="M382.433,364.669c-4.18,0-7.314-3.135-7.314-7.314c0-25.078,20.898-45.975,45.976-45.975
|
||||
c4.18,0,7.314,3.135,7.314,7.314s-3.135,7.314-7.314,7.314c-16.718,0-30.302,13.584-30.302,30.302
|
||||
C389.747,360.49,386.612,364.669,382.433,364.669z"/>
|
||||
<path style="fill:#F8B64C;" d="M374.073,143.151c-4.18,0-7.314-3.135-7.314-7.314c0-25.078,20.898-45.976,45.976-45.976
|
||||
c4.18,0,7.314,3.135,7.314,7.314c0,4.18-3.135,7.314-7.314,7.314c-16.718,0-30.302,13.584-30.302,30.302
|
||||
C381.388,140.016,378.253,143.151,374.073,143.151z"/>
|
||||
<path style="fill:#F8B64C;" d="M272.718,382.433c0-4.18,3.135-7.314,7.314-7.314c25.078,0,45.975,20.898,45.975,45.976
|
||||
c0,4.18-3.135,7.314-7.314,7.314c-4.18,0-7.314-3.135-7.314-7.314c0-16.718-13.584-30.302-30.302-30.302
|
||||
C275.853,390.792,272.718,386.612,272.718,382.433z"/>
|
||||
<path style="fill:#F8B64C;" d="M82.547,191.216c-4.18,0-7.314-3.135-7.314-7.314c0-25.078,20.898-45.976,45.976-45.976
|
||||
c4.18,0,7.314,3.135,7.314,7.314s-3.135,7.314-7.314,7.314c-16.718,0-30.302,13.584-30.302,30.302
|
||||
C89.861,187.037,86.727,191.216,82.547,191.216z"/>
|
||||
<path style="fill:#F8B64C;" d="M159.869,97.176c0-4.18,3.135-7.314,7.314-7.314c25.078,0,45.976,20.898,45.976,45.976
|
||||
c0,4.18-3.135,7.314-7.314,7.314c-4.18,0-7.314-3.135-7.314-7.314c0-16.718-13.584-30.302-30.302-30.302
|
||||
C163.004,105.535,159.869,101.355,159.869,97.176z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path style="fill:#FFFFFF;" d="M151.51,288.392l15.673,1.045c0,8.359-2.09,15.673-6.269,20.898
|
||||
c-4.18,5.224-9.404,8.359-17.763,10.449c-9.404,2.09-18.808,1.045-26.122-3.135c-8.359-5.224-13.584-12.539-16.718-24.033
|
||||
s-3.135-21.943,2.09-30.302c4.18-8.359,11.494-13.584,21.943-16.718c8.359-2.09,16.718-2.09,24.033,2.09
|
||||
c4.18,2.09,7.314,6.269,11.494,11.494l-14.629,6.269c-2.09-3.135-4.18-6.269-7.314-7.314c-3.135-1.045-7.314-2.09-10.449-1.045
|
||||
c-5.224,1.045-9.404,4.18-11.494,9.404c-2.09,5.224-2.09,11.494,0,19.853c2.09,9.404,6.269,15.673,10.449,17.763
|
||||
c4.18,3.135,9.404,4.18,14.629,2.09c4.18-1.045,7.314-3.135,9.404-6.269C150.465,297.796,151.51,293.616,151.51,288.392z"/>
|
||||
<path style="fill:#FFFFFF;" d="M184.947,307.2l-18.808-72.098l14.629-4.18l7.314,28.212l28.212-7.314l-7.314-28.212l14.629-4.18
|
||||
l19.853,72.098l-14.629,4.18l-8.359-31.347l-28.212,7.314l8.359,31.347L184.947,307.2z"/>
|
||||
<path style="fill:#FFFFFF;" d="M258.09,287.347l-19.853-72.098l14.629-4.18l19.853,72.098L258.09,287.347z"/>
|
||||
<path style="fill:#FFFFFF;" d="M286.302,280.033l-19.853-72.098l22.988-6.269c8.359-2.09,14.629-3.135,17.763-3.135
|
||||
c4.18,0,8.359,1.045,12.539,4.18c4.18,3.135,6.269,7.314,8.359,12.539c1.045,4.18,1.045,8.359,1.045,11.494
|
||||
c-1.045,3.135-2.09,6.269-4.18,8.359c-2.09,2.09-4.18,4.18-6.269,5.224c-3.135,2.09-8.359,3.135-14.629,5.224l-9.404,2.09
|
||||
l7.314,27.167L286.302,280.033z M284.212,216.294l5.224,20.898l8.359-2.09c5.224-1.045,9.404-3.135,11.494-4.18
|
||||
c2.09-1.045,3.135-3.135,3.135-5.225c1.045-2.09,1.045-4.18,0-6.269c-1.045-3.135-2.09-4.18-4.18-6.269
|
||||
c-2.09-1.045-4.18-2.09-6.269-2.09c-2.09,0-5.224,1.045-10.449,2.09L284.212,216.294z"/>
|
||||
<path style="fill:#FFFFFF;" d="M342.727,239.282l13.584-5.224c2.09,4.18,5.225,7.314,8.359,9.404c3.135,1.045,7.314,2.09,11.494,0
|
||||
c4.18-1.045,8.359-3.135,9.404-6.269c2.09-3.135,2.09-5.224,2.09-8.359c0-2.09-1.045-3.135-3.135-4.18c-1.045,0-2.09,0-5.225,0
|
||||
c-2.09,0-6.269,0-12.539,0c-8.359,0-14.629-1.045-18.808-3.135c-5.224-3.135-9.404-7.314-10.449-12.539
|
||||
c-1.045-4.18-1.045-7.314,0-11.494c1.045-4.18,3.135-7.314,7.314-9.404c3.135-3.135,8.359-5.225,13.584-6.269
|
||||
c9.404-2.09,16.718-2.09,21.943,0c5.224,3.135,9.404,7.314,11.494,13.584l-14.629,4.18c-2.09-3.135-4.18-6.269-6.269-7.314
|
||||
c-2.09-1.045-6.269-1.045-9.404,0c-4.18,1.045-7.314,3.135-9.404,5.224c-1.045,1.045-2.09,3.135-1.045,5.224
|
||||
c0,2.09,2.09,3.135,3.135,4.18c2.09,1.045,7.314,1.045,14.629,1.045s13.584,0,16.718,1.045c4.18,1.045,7.314,2.09,10.449,5.224
|
||||
c3.135,2.09,5.224,6.269,6.269,10.449c1.045,4.18,1.045,8.359,0,12.539c-1.045,4.18-4.18,7.314-7.314,10.449
|
||||
c-4.18,3.135-8.359,5.225-14.629,7.314c-9.404,2.09-16.718,2.09-22.988-1.045C351.086,252.865,345.861,247.641,342.727,239.282z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Finance;
|
||||
@@ -60,11 +61,14 @@ namespace ReallifeGamemode.Server.Bank
|
||||
{
|
||||
if (client.IsInVehicle || !client.IsLoggedIn() || client.GetUser().FactionId is null) return;
|
||||
|
||||
if (client.GetUser().FactionLeader == true)
|
||||
User user = client.GetUser();
|
||||
|
||||
if (user.FactionLeader == true)
|
||||
{
|
||||
client.TriggerEvent("showFactionBankMenuLeader", client.GetUser().Faction.BankAccount.Balance.ToString());
|
||||
client.TriggerEvent("showFactionBankMenuLeader", user.Faction.BankAccount.Balance.ToString());
|
||||
return;
|
||||
}
|
||||
client.TriggerEvent("showFactionBankMenu", client.GetUser().Faction.BankAccount.Balance.ToString());
|
||||
client.TriggerEvent("showFactionBankMenu", user.Faction.BankAccount.Balance.ToString());
|
||||
}
|
||||
|
||||
private static void EntityExitFactionBankColShape(ColShape colShape, Player client)
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
|
||||
#region Support
|
||||
|
||||
[Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~IP~s~, ~g~deathlogs~s~, ~g~LC~s~]", GreedyArg = true)]
|
||||
[Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~IP~s~, ~g~deathlogs~s~, ~g~LC~s~, ~g~Connect~s~]", GreedyArg = true)]
|
||||
public void CmdTog(Player player, string typ, string option1 = null, string option2 = null)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||
@@ -281,6 +281,18 @@ namespace ReallifeGamemode.Server.Commands
|
||||
player.SendNotification("~g~[Info]~w~ Leaderchat wird nun angezeigt.");
|
||||
}
|
||||
break;
|
||||
case "connect":
|
||||
if (player.HasData("togconnect"))
|
||||
{
|
||||
player.ResetData("togconnect");
|
||||
player.SendNotification("~g~[Info]~w~ Connect-Logs werden nun ausgeblendet.");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SetData("togconnect", true);
|
||||
player.SendNotification("~g~[Info]~w~ Connect-Logs werden nun angezeigt.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -479,7 +491,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
target.Kick();
|
||||
}, 2500);
|
||||
|
||||
ChatService.BroadcastAdmin("~y~SKICK: ~w~" + targetname + " wurde von " + player.GetUser().AdminLevel.GetName() + " " + adminPlayername + " gekickt: " + reason, AdminLevel.SUPPORTER);
|
||||
ChatService.BroadcastAdmin("~y~SKICK: ~w~" + target.Name + " wurde von " + player.GetUser().AdminLevel.GetName() + " " + adminPlayername + " gekickt: " + reason, AdminLevel.SUPPORTER);
|
||||
}
|
||||
|
||||
[Command("clearchat", "~m~Benutzung: ~s~/clearchat")]
|
||||
@@ -799,7 +811,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
target.Kick();
|
||||
}, 2500);
|
||||
|
||||
ChatService.Broadcast("~y~INFO: ~w~" + targetname + " wurde von " + player.GetUser().AdminLevel.GetName() + " " + adminPlayername + " gekickt: " + reason);
|
||||
ChatService.Broadcast("~y~INFO: ~w~" + target.Name + " wurde von " + player.GetUser().AdminLevel.GetName() + " " + adminPlayername + " gekickt: " + reason);
|
||||
}
|
||||
|
||||
[Command("warn", "~m~Benutzung: ~s~/warn [Player] [Grund]", GreedyArg = true)]
|
||||
|
||||
@@ -80,11 +80,16 @@ namespace ReallifeGamemode.Server.Events
|
||||
bool disableLightMode = currentTime > LightModeTimeFrom && currentTime < LightModeTimeTo;
|
||||
|
||||
player.TriggerEvent("SERVER:Login_ShowBrowser", registered, disableLightMode);
|
||||
string msg = "~m~*** " + player.Name + " [" + player.SocialClubName + "] [ID: " + player.Handle.Value + "] (" + player.Address + ")";
|
||||
if (player.HasData("togip"))
|
||||
string msg = "~m~*** " + player.Name + " [" + player.SocialClubName + "] [ID: " + player.Handle.Value + "]";
|
||||
string ipMsg = " (" + player.Address + ")";
|
||||
ChatService.BroadcastAdmin(msg, AdminLevel.SUPPORTER, getAddInfoMessage: admin =>
|
||||
{
|
||||
ChatService.SendMessage(player, msg);
|
||||
}
|
||||
return admin.HasData("togip") ? ipMsg : string.Empty;
|
||||
},
|
||||
shouldSendMessage: admin =>
|
||||
{
|
||||
return admin.HasData("togconnect");
|
||||
});
|
||||
}
|
||||
|
||||
private bool IsPlayerBanned(Player player)
|
||||
|
||||
@@ -11,5 +11,10 @@
|
||||
{
|
||||
return "$" + string.Format(Main.SERVER_CULTURE, "{0:C0}", money).Replace("€", "").Trim();
|
||||
}
|
||||
|
||||
public static string ToMoneyString(this double money)
|
||||
{
|
||||
return ((int)money).ToMoneyString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,11 +187,14 @@ namespace ReallifeGamemode.Server.Finance
|
||||
public static void Timer_Elapsed()
|
||||
{
|
||||
using var dbContext = new DatabaseContext();
|
||||
foreach (var player in NAPI.Pools.GetAllPlayers())
|
||||
foreach (var player in NAPI.Pools.GetAllPlayers().Where(p => p.IsLoggedIn()))
|
||||
{
|
||||
User user = player.GetUser(dbContext);
|
||||
if (player.IsLoggedIn())
|
||||
if(user == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
user.PlayedMinutes += 1;
|
||||
if (user.PaydayTimer <= 0)
|
||||
{
|
||||
@@ -203,7 +206,6 @@ namespace ReallifeGamemode.Server.Finance
|
||||
user.PaydayTimer -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
18
ReallifeGamemode.Server/Inventory/Items/AviateChips.cs
Normal file
18
ReallifeGamemode.Server/Inventory/Items/AviateChips.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
class AChips : FoodItem
|
||||
{
|
||||
public override int Id => 104;
|
||||
public override string Name => "Aviates Chips";
|
||||
public override string Description => "aviate liebt sie.";
|
||||
public override int Gewicht => 10;
|
||||
public override string Einheit => "g";
|
||||
public override int HpAmount => 10;
|
||||
public override uint Object => 2240524752;
|
||||
public override int Price => 20;
|
||||
}
|
||||
}
|
||||
@@ -421,9 +421,12 @@ namespace ReallifeGamemode.Server.Job
|
||||
_CHANGING_VEHICLE.Add(player);
|
||||
if (playerVehiclePair.ContainsKey(player))
|
||||
{
|
||||
Vehicle previousVehicle = null;
|
||||
if (playerVehiclePair[player] != null)
|
||||
playerVehiclePair[player].Delete();
|
||||
previousVehicle = playerVehiclePair[player];
|
||||
playerVehiclePair.Remove(player);
|
||||
|
||||
previousVehicle?.Delete();
|
||||
}
|
||||
playerVehiclePair.Add(player, vehicle);
|
||||
|
||||
@@ -556,7 +559,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
|
||||
public override void StartJobEndTimer(Player player)
|
||||
{
|
||||
if (!playerVehiclePair.ContainsKey(player) || _CHANGING_VEHICLE.Contains(player))
|
||||
if (!playerVehiclePair.ContainsKey(player) && _CHANGING_VEHICLE.Contains(player))
|
||||
{
|
||||
_CHANGING_VEHICLE.Remove(player);
|
||||
return;
|
||||
|
||||
@@ -233,13 +233,15 @@ namespace ReallifeGamemode.Server.Job
|
||||
_CHANGING_VEHICLE.Add(player);
|
||||
if (playerVehiclePair.ContainsKey(player))
|
||||
{
|
||||
Vehicle previousVehicle = null;
|
||||
if (playerVehiclePair[player] != null)
|
||||
playerVehiclePair[player].Delete();
|
||||
previousVehicle = playerVehiclePair[player];
|
||||
playerVehiclePair.Remove(player);
|
||||
|
||||
previousVehicle?.Delete();
|
||||
}
|
||||
playerVehiclePair.Add(player, vehicle);
|
||||
player.SetIntoVehicle(vehicle.Handle, 0);
|
||||
_CHANGING_VEHICLE.Remove(player);
|
||||
CheckPointHandle.StartCheckPointRoute(player, selectedRoute, 0, CHECKPOINT_MARKER_ID, 40, 10, true, "PILOT:InCheckpoint"); //6, 23, 25, 26, 27, 28
|
||||
}
|
||||
|
||||
@@ -286,7 +288,11 @@ namespace ReallifeGamemode.Server.Job
|
||||
public override void StartJobEndTimer(Player player)
|
||||
{
|
||||
if (!playerVehiclePair.ContainsKey(player) && _CHANGING_VEHICLE.Contains(player))
|
||||
{
|
||||
_CHANGING_VEHICLE.Remove(player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (JobManager.playerTimersJobVehicleRespawn.ContainsKey(player))
|
||||
{
|
||||
|
||||
@@ -172,8 +172,18 @@ namespace ReallifeGamemode.Server
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
var user = dbContext.Users.Where(u => u.BankAccountId == account.Id).Select(u => u.Name).FirstOrDefault();
|
||||
if (user == null) return;
|
||||
PlayerService.GetPlayerByNameOrId(user).TriggerEvent("updateMoney", account.Balance);
|
||||
if (user == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = PlayerService.GetPlayerByNameOrId(user);
|
||||
if(player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.TriggerEvent("updateMoney", account.Balance);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
public static List<BusinessBase> Businesses { get; private set; }
|
||||
|
||||
private const double FACTION_CAR_MULTIPLIER = 1.5;
|
||||
|
||||
public static void LoadBusinesses()
|
||||
{
|
||||
Businesses = new List<BusinessBase>();
|
||||
@@ -199,10 +201,10 @@ namespace ReallifeGamemode.Server.Managers
|
||||
else if (target == "Fraktion")
|
||||
{
|
||||
var faction = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == u.FactionId).First();
|
||||
TransactionResult result = BankManager.TransferMoney(faction, business, price * 3, "Auto gekauft", dbContext);
|
||||
TransactionResult result = BankManager.TransferMoney(faction, business, (int)(price * FACTION_CAR_MULTIPLIER), "Auto gekauft", dbContext);
|
||||
if (result == TransactionResult.SENDER_NOT_ENOUGH_MONEY)
|
||||
{
|
||||
player.SendNotification("~r~Die Fraktion hat nicht genug Geld: " + (price * 3).ToMoneyString());
|
||||
player.SendNotification("~r~Die Fraktion hat nicht genug Geld: " + (price * FACTION_CAR_MULTIPLIER).ToMoneyString());
|
||||
return;
|
||||
}
|
||||
player.SendChatMessage("~y~Deine Fraktion hat das Fahrzeug erfolgreich gekauft");
|
||||
|
||||
@@ -108,12 +108,14 @@ namespace ReallifeGamemode.Server.Services
|
||||
}
|
||||
}
|
||||
|
||||
string toSend = message;
|
||||
|
||||
if(getAddInfoMessage != null)
|
||||
{
|
||||
message += getAddInfoMessage(p);
|
||||
toSend += getAddInfoMessage(p);
|
||||
}
|
||||
|
||||
ChatService.SendMessage(p, message);
|
||||
ChatService.SendMessage(p, toSend);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
{
|
||||
public class WantedEscapeTimer
|
||||
{
|
||||
private const int WantedEscapeTime = 300000;
|
||||
|
||||
public static Dictionary<int, int> waTimer { get; set; } = new Dictionary<int, int>(); //zeit in ms
|
||||
/*
|
||||
public static void WantedTimer()
|
||||
@@ -31,7 +33,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
if (user.FactionId == 1 || user.FactionId == 3)
|
||||
return;
|
||||
|
||||
waTimer[user.Id] = 300000;
|
||||
waTimer[user.Id] = WantedEscapeTime;
|
||||
}
|
||||
|
||||
public static void Timer_Elapsed()
|
||||
@@ -77,9 +79,9 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
user.SetBlipAndNametagColor();
|
||||
}
|
||||
dbContext.SaveChanges();
|
||||
waTimer[user.Id] = WantedEscapeTime;
|
||||
}
|
||||
|
||||
if (!isNearCop)
|
||||
else if (!isNearCop)
|
||||
waTimer[user.Id] -= 2500;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user