Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #39 from dexslab/master
Browse files Browse the repository at this point in the history
Revision fix, Null fix
  • Loading branch information
ejb1123 authored Feb 10, 2018
2 parents 63c76a4 + 2cfea10 commit 33e1c58
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
10 changes: 5 additions & 5 deletions server/ELS-Server/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("els-server")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("ELS Plus Server")]
[assembly: AssemblyDescription("Server side sync for ELS Plus")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("els-server")]
[assembly: AssemblyProduct("ELS Plus Server")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.3.1")]
[assembly: AssemblyFileVersion("0.1.3.1")]
[assembly: AssemblyVersion("0.2.0.1")]
[assembly: AssemblyFileVersion("0.2.0.1")]
8 changes: 4 additions & 4 deletions src/ELS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,19 @@ private void SetupExports()
{
SpawnCar(veh);
}));

}

internal async Task SpawnCar(string veh)
internal async Task<Vehicle> SpawnCar(string veh)
{
if (String.IsNullOrEmpty(veh))
{
Screen.ShowNotification("Vehicle not found please try again");
return;
return null;
}
if (!VCF.ELSVehicle.Exists(elscar => elscar.modelHash == Game.GenerateHash(veh)))
{
Screen.ShowNotification("Vehicle not ELS please try again");
return;
return null;
}
if (Game.PlayerPed.IsInVehicle())
{
Expand All @@ -226,6 +225,7 @@ internal async Task SpawnCar(string veh)
await polModel.Request(-1);
Vehicle _veh = await World.CreateVehicle(polModel, Game.PlayerPed.Position + new Vector3(0f,10f,0f));
Game.PlayerPed.SetIntoVehicle(_veh, VehicleSeat.Driver);
return _veh;
}

public static string CurrentResourceName()
Expand Down
4 changes: 3 additions & 1 deletion src/Light/Light.Loop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ public async void Ticker()

public async void ExternalTicker()
{
if (crsLights || prmLights || secLights || wrnLights || _extras.TDL.TurnedOn || _extras.SCL.TurnedOn && !_vehicle.IsEngineRunning)
if (crsLights || prmLights || secLights || wrnLights ||
(_extras.TDL != null && _extras.TDL.TurnedOn) || (_extras.SCL != null && _extras.SCL.TurnedOn)
&& !_vehicle.IsEngineRunning)
{
_vehicle.IsEngineRunning = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.3.1")]
[assembly: AssemblyFileVersion("0.1.3.1")]
[assembly: AssemblyVersion("0.2.0.1")]
[assembly: AssemblyFileVersion("0.2.0.1")]

0 comments on commit 33e1c58

Please sign in to comment.