vagos gangwar BITTE TESTEN

This commit is contained in:
hydrant
2021-04-19 01:28:26 +02:00
parent ac91ceb1f3
commit 13d7af7ca8

View File

@@ -186,7 +186,13 @@ namespace ReallifeGamemode.Server.Gangwar
[RemoteEvent("SERVER:StartGangwar")] [RemoteEvent("SERVER:StartGangwar")]
public void RmtEvent_StartGangwar(Player client) public void RmtEvent_StartGangwar(Player client)
{ {
if (!client.GetUser().FactionLeader) User user = client.GetUser();
if(user == null || user.Faction == null)
{
return;
}
if (!user.FactionLeader)
return; return;
foreach (var turf in getTurfs()) foreach (var turf in getTurfs())
@@ -197,7 +203,7 @@ namespace ReallifeGamemode.Server.Gangwar
return; return;
} }
} }
if (client.GetUser().Faction.Name == "Ballas" || client.GetUser().Faction.Name == "Grove") if (user.Faction.GangOwned)
{ {
foreach (var turf in getTurfs()) foreach (var turf in getTurfs())
{ {
@@ -205,8 +211,11 @@ namespace ReallifeGamemode.Server.Gangwar
{ {
if (u == client) if (u == client)
{ {
if (turf.Owner != client.GetUser().Faction.Name) if (turf.Owner != user.Faction.Name)
turf.attack(client.GetUser().Faction.Name); {
turf.attack(user.Faction.Name);
break;
}
} }
} }
} }