Skip to content

Commit

Permalink
Two callouts added. Bugs fixed (v1.4.5.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikel Miras committed Jun 15, 2021
1 parent dce0e52 commit 266723c
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MetroCallouts3/Api/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public static bool internetDisponible()
{
using (WebClient webClient = new WebClient())
{
using (webClient.OpenRead("https://metrocallouts3.000webhostapp.com/updatechecker/currentversion.html"))
using (webClient.OpenRead("https://mmodsgtav.es/MetroCallouts3/currentversion/"))
return true;
}
}
Expand Down
49 changes: 49 additions & 0 deletions MetroCallouts3/Callouts/accidente2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using LSPD_First_Response;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rage;
using System.Reflection;
using System.Drawing;
using System.Windows.Forms;
using MetroCallouts3;
using MetroCallouts3.Callouts;
using Rage.Native;
using LSPD_First_Response.Mod.API;
using LSPD_First_Response.Mod.Callouts;
using LSPD_First_Response.Engine.Scripting.Entities;

namespace MetroCallouts3.Callouts
{
public class accidente2 : Callout
{
public Vehicle victimVehicle1;
public Vector3 spawnVehicle;
public Vehicle victimVehicle2;
public Ped driver1;
public Ped driver2;
public Blip blipDriver1;
public Blip blipDriver2;
public bool wasCalloutAccepted;
public override bool OnBeforeCalloutDisplayed()
{
spawnVehicle = new Vector3(522.22f, -534.45f, 35.81f);
wasCalloutAccepted = false;
CalloutMessage = "Choque entre dos vehículos";
CalloutPosition = spawnVehicle;
ShowCalloutAreaBlipBeforeAccepting(spawnVehicle, 1f);
LSPD_First_Response.Mod.API.Functions.PlayScannerAudioUsingPosition("WE_HAVE ", spawnVehicle);
return base.OnBeforeCalloutDisplayed();
}
public override bool OnCalloutAccepted()
{
wasCalloutAccepted = true;
spawnVehicle = new Vector3(522.22f, -534.45f, 35.81f);
victimVehicle1 = new Vehicle("BLISTA", spawnVehicle, 100.64f);
spawnVehicle = new Vector3(533.76f, -528.85f, 35.37f);
victimVehicle2 = new Vehicle("ASEA", spawnVehicle, 309.81f);
return base.OnCalloutAccepted();
}
}
}
4 changes: 2 additions & 2 deletions MetroCallouts3/Callouts/asaltoapolicias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public override bool OnBeforeCalloutDisplayed()
{
done = false;
wascalloutaccepted = false;
discriminer2 = MetroCallouts3.Api.Api.getDiscriminer(1, 3);
discriminer = MetroCallouts3.Api.Api.getDiscriminer(1, 3);
discriminer2 = 1;
discriminer = MetroCallouts3.Api.Api.getDiscriminer(1, 2);
Game.LogTrivial($"[MetroCallouts3] Discriminer value for asaltoapolicia.cs is {discriminer}");
heading = 0f;
if (discriminer == 1)
Expand Down
2 changes: 1 addition & 1 deletion MetroCallouts3/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private static void RegisterCallouts()
LSPD_First_Response.Mod.API.Functions.RegisterCallout(typeof(Vehiculosingasolina));
LSPD_First_Response.Mod.API.Functions.RegisterCallout(typeof(vehiculovelocidadlenta));
LSPD_First_Response.Mod.API.Functions.RegisterCallout(typeof(vigilantedeseguridad));
LSPD_First_Response.Mod.API.Functions.RegisterCallout(typeof(Disparos));
//LSPD_First_Response.Mod.API.Functions.RegisterCallout(typeof(Disparos));
LSPD_First_Response.Mod.API.Functions.RegisterCallout(typeof(accidente1));
LSPD_First_Response.Mod.API.Functions.RegisterCallout(typeof(asaltoapolicias));

Expand Down
1 change: 1 addition & 0 deletions MetroCallouts3/MetroCallouts3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<ItemGroup>
<Compile Include="Api\Api.cs" />
<Compile Include="Callouts\accidente1.cs" />
<Compile Include="Callouts\accidente2.cs" />
<Compile Include="Callouts\asaltoapolicias.cs" />
<Compile Include="Callouts\caravanailegal.cs" />
<Compile Include="Callouts\Disparos.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
82a0d03043ef30f8da0735c6af82c52cd98b9b3e
2cb5dd6c55223d3674354f6db4c73c2b507cba1c
Binary file not shown.
Binary file modified MetroCallouts3/obj/Debug/MetroCallouts3.dll
Binary file not shown.
Binary file modified MetroCallouts3/obj/Debug/MetroCallouts3.pdb
Binary file not shown.

0 comments on commit 266723c

Please sign in to comment.