gw score die 3

This commit is contained in:
CroniX
2020-06-22 20:26:45 +02:00
parent 6ae4adc468
commit 3ce7612008

View File

@@ -40,7 +40,7 @@ namespace ReallifeGamemode.Server.Gangwar
this.maxValue = maxValue;
this.surplus = surplus;
this.Attacker = null;
this.Att_Score = 0;
this.Att_Score = 1;
this.Def_Score = 0;
this.status = "normal";
this.timer = null;
@@ -154,44 +154,44 @@ namespace ReallifeGamemode.Server.Gangwar
{
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score);
}
if (this.Def_Score >= 5)
if (this.Att_Score >= 5)
{
this.takeOver(this.Attacker);
}
else if (this.Att_Score >= 5)
else if (this.Def_Score >= 5)
{
this.takeOver(this.Owner);
}
timerCount += 1;
if (timerCount >= 900) //change to 900 (seconds) before release for testing reasons change to whatever you like
{
if (this.Def_Score > this.Att_Score)
if (this.Att_Score > this.Def_Score)
{
foreach (Player gangwarPlayer in this.playerInGangwar)
{
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 5, 5);
}
this.takeOver(this.Owner);
this.Att_Score = 5;
}
else if (this.Def_Score < this.Att_Score)
{
foreach (Player gangwarPlayer in this.playerInGangwar)
{
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 5, 5);
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0);
}
this.takeOver(this.Attacker);
this.Def_Score = 5;
this.Def_Score = 0;
}
else if (this.Att_Score < this.Def_Score)
{
foreach (Player gangwarPlayer in this.playerInGangwar)
{
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0);
}
this.takeOver(this.Owner);
this.Att_Score = 0;
return;
}
else if (this.Def_Score == this.Att_Score)
{
foreach (Player gangwarPlayer in this.playerInGangwar)
{
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 5, 5);
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0);
}
this.takeOver(this.Attacker);
this.Def_Score = 5;
this.takeOver(this.Owner);
this.Def_Score = 0;
return;
}