add option to stop job, enable engine of job vehicle only when player is in job

This commit is contained in:
hydrant
2019-05-20 21:41:02 +02:00
parent 0409cd1611
commit 9dda9b195d
6 changed files with 75 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using GTANetworkAPI;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Job;
using ReallifeGamemode.Server.Managers;
using ReallifeGamemode.Server.Models;

View File

@@ -52,6 +52,14 @@ namespace ReallifeGamemode.Server.Events
return;
}
}
else if(sV is JobVehicle jV)
{
if(!jV.GetJob().GetUsersInJob().Contains(player) && !u.IsAdmin(AdminLevel.ADMIN3))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
return;
}
}
}
VehicleStreaming.SetEngineState(v, !state);
}