mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 23:50:29 +01:00
Added condition for IsValidForCollection that the vehicle's engine is on. Added loop checking for vehicle driver after a driver has to be created
This commit is contained in:
parent
b3ca91e7a7
commit
77bf3750bb
1 changed files with 5 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ namespace SceneManager
|
|||
|
||||
private static bool IsValidForCollection(this Vehicle v)
|
||||
{
|
||||
if(v && v.Speed > 1 && v.IsOnAllWheels && v != Game.LocalPlayer.Character.CurrentVehicle && v != Game.LocalPlayer.Character.LastVehicle && (v.IsCar || v.IsBike || v.IsBicycle || v.IsQuadBike || (v.HasSiren && !v.IsSirenOn)) && !collectedVehicles.Any(cv => cv.Vehicle == v))
|
||||
if(v && v.Speed > 1 && v.IsOnAllWheels && v.IsEngineOn && v != Game.LocalPlayer.Character.CurrentVehicle && v != Game.LocalPlayer.Character.LastVehicle && (v.IsCar || v.IsBike || v.IsBicycle || v.IsQuadBike || (v.HasSiren && !v.IsSirenOn)) && !collectedVehicles.Any(cv => cv.Vehicle == v))
|
||||
{
|
||||
if(v.HasDriver && !v.Driver.IsAlive)
|
||||
{
|
||||
|
|
@ -72,6 +72,10 @@ namespace SceneManager
|
|||
if (!v.HasDriver)
|
||||
{
|
||||
v.CreateRandomDriver();
|
||||
while (!v.HasDriver)
|
||||
{
|
||||
GameFiber.Yield();
|
||||
}
|
||||
var driverBlip = v.Driver.AttachBlip();
|
||||
driverBlip.Color = Color.Green;
|
||||
driverBlip.Scale = 0.25f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue