Test: gangwar kill mstg
This commit is contained in:
@@ -80,11 +80,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
var playerInGangwar = player.HasData("inGangWar");
|
||||
var killerInGangwar = killer.HasData("inGangWar");
|
||||
|
||||
if (playerInGangwar && killerInGangwar)
|
||||
{
|
||||
killer.TriggerEvent("setGangwarKillMessage", "Du hast ~r~" + player.Name + " getötet");
|
||||
}
|
||||
|
||||
NAPI.Util.ConsoleOutput($"OnPlayerDeath - Player {player.Name} died - PlayerInGangwar = {playerInGangwar}, KillerInGangwar = {killerInGangwar}");
|
||||
if (playerInGangwar && killerInGangwar)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
@@ -56,7 +56,8 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
|
||||
if (killerInsideTurf && victimInsideTurf)
|
||||
{
|
||||
NAPI.Util.ConsoleOutput($"GangwarKill - Victim {victim.Name} - Killer and Victim are in Turf area");
|
||||
NAPI.Util.ConsoleOutput($"GangwarKill - Victim {victim.Name} - Killer and Victim are in Turf area");
|
||||
killer.TriggerEvent("gangWarKillNotification", victim.Name);
|
||||
foreach (var turf in getTurfs())
|
||||
{
|
||||
if (turf.getId() == victim.GetData<int>("inGangWar"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -31,6 +31,8 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
public Player[] playerInGangwar { get; set; }
|
||||
public int timerCount;
|
||||
|
||||
private const int GANGWAR_TOTAL_TIME = 900;
|
||||
|
||||
public Turf(int TurfID, string TurfName, int color, string Owner, int value, int maxValue, bool surplus)
|
||||
{
|
||||
this.TurfID = TurfID;
|
||||
@@ -142,7 +144,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
continue;
|
||||
}
|
||||
|
||||
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score, 900 - timerCount);
|
||||
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score, GANGWAR_TOTAL_TIME - timerCount);
|
||||
}
|
||||
/*if (this.Att_Score >= 200)
|
||||
{
|
||||
@@ -153,7 +155,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
this.takeOver(this.Owner);
|
||||
}*/
|
||||
timerCount += 1;
|
||||
if (timerCount >= 900) //change to 900 (seconds) before release for testing reasons change to whatever you like
|
||||
if (timerCount >= GANGWAR_TOTAL_TIME)
|
||||
{
|
||||
if (this.Att_Score > this.Def_Score)
|
||||
{
|
||||
@@ -312,6 +314,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
c.TriggerEvent("CLIENT:setAttackBlip", false, TurfID);
|
||||
c.ResetData("inGangWar");
|
||||
c.ResetData("GotInsideOfTurf");
|
||||
c.TriggerEvent("resetKillcounter");
|
||||
}
|
||||
this.playerInGangwar = null;
|
||||
this.status = "conquered";
|
||||
|
||||
Reference in New Issue
Block a user