riot nicht abschließen

This commit is contained in:
hydrant
2021-06-01 23:02:30 +02:00
parent 2d9d5aa0b2
commit 0077cabced
3 changed files with 2249 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
using GTANetworkAPI;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ReallifeGamemode.Database.Migrations
{
public partial class LockRiot : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("UPDATE ServerVehicles SET Locked = '0' WHERE Model = " + (uint)VehicleHash.Riot);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View File

@@ -113,7 +113,7 @@ namespace ReallifeGamemode.Server.Events
} }
else if (sV is FactionVehicle fV) else if (sV is FactionVehicle fV)
{ {
if (!fV.GetOwners().Contains(u.FactionId ?? 0)) if (!fV.GetOwners().Contains(u.FactionId ?? 0) || sV.Model == VehicleHash.Riot)
{ {
return; return;
} }
@@ -181,7 +181,7 @@ namespace ReallifeGamemode.Server.Events
} }
else if (sV is FactionVehicle fV) else if (sV is FactionVehicle fV)
{ {
if (!fV.GetOwners().Contains(u.FactionId ?? 0)) if (!fV.GetOwners().Contains(u.FactionId ?? 0) || sV.Model == VehicleHash.Riot)
{ {
return; return;
} }