Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DODAĆ NOWY TIMER DLA SPRAWDZANIA POJAZDÓW!!!
- // KAŻDY NOWY TIMER DLA DANEGO POJAZDU
- // ROZWIĄZAĆ JAKOŚ PROBLEM Z PUSTYM ODCZYTEM NA STARCIE GRY
- using System;
- using System.Timers;
- using System.Windows.Forms;
- using System.Drawing;
- using System.Text;
- using System.Windows;
- using GTA;
- namespace RinepimChallenges
- {
- public class Part_1 : Script
- {
- bool makeScreen = false, endChallenge = false,
- challengeRun = false, it_WLACZONY=false;
- bool[] zadanieCheck,zgaszony;
- int timerChallenge, timerAll = 0, soundID, zdarzenieNr = 0, ptfxLodziarka, PTFX_nr1 = 0, PTFX_nr2 = 1;
- byte ileLodowDel = 0, smoothEnd = 0,gasnicaPojemnosc=255;
- int[] plomien;
- float[] daneAuta;
- float getX;
- string animacja;
- public string[] calyPlik;
- AnimationSet grupa_anim;
- GTA.Object antenaAuta,lodzikCh2,gasnica;
- GTA.Object[] arrayArrow;
- Vehicle goodCar,crashFlat;
- Vehicle[] specialCars;
- Ped[] pedsAround,startPed;
- Ped goodGuy;
- Checkpoint drawRedCircle;
- Blip MissionBlip;
- Camera cutSceneCam;
- Vector3[] miejscaStartPed;
- Vector3 corner1_challenge1= new Vector3(-344.71F,1212.62F,17.51F),
- corner2_challenge1= new Vector3(-384.68F,-34.42F,14.29F);
- GTA.Font screenFont,resultFont;
- GTA.Timer timerDraw, prepareRing, challengeNr1_first, challengeNr1_second, challengeNr2,challengeNr3,
- SpecialCar_CHECK, SpecialCar0, SpecialCar1, SpecialCar2;
- //cutsceneNr1,
- public Part_1()
- {
- plomien = new int[30];
- zadanieCheck = new bool[4];
- zgaszony = new bool[30];
- miejscaStartPed = new Vector3[25];
- miejscaStartPed[0] = new Vector3(-394.04F, 1195.20F, 13.76F);
- miejscaStartPed[1] = new Vector3(-389.36F, 613.74F, 13.71F);
- miejscaStartPed[2] = new Vector3(-526.6850F, 1258.5880F, 17.4778F);
- startPed = new Ped[25];
- specialCars = new Vehicle[25];
- daneAuta = new float[3];
- arrayArrow = new GTA.Object[3];
- SpecialCar_CHECK = new GTA.Timer(100, true);
- SpecialCar0 = new GTA.Timer(1000, false);
- SpecialCar1 = new GTA.Timer(10, false);
- SpecialCar2 = new GTA.Timer(100, false);
- prepareRing = new GTA.Timer(10,true);
- //cutsceneNr1 = new GTA.Timer(1, false);
- challengeNr1_first = new GTA.Timer(0, false);
- challengeNr1_second = new GTA.Timer(1, false);
- challengeNr2 = new GTA.Timer(1, false);
- challengeNr3 = new GTA.Timer(5, false);
- timerDraw = new GTA.Timer(1000,false);
- drawRedCircle = new Checkpoint();
- drawRedCircle.Color = Color.FromArgb(80, 250, 0, 0);
- resultFont = new GTA.Font("Impact", 1, FontScaling.FontSize, false, false);
- resultFont.Effect = FontEffect.Shadow;
- resultFont.EffectColor = Color.FromArgb(125, Color.Gold);
- resultFont.EffectSize = 1;
- screenFont = new GTA.Font("Impact", 2, FontScaling.FontSize, false, false);
- screenFont.Effect = FontEffect.Edge;
- screenFont.EffectColor = Color.FromArgb(125,Color.DarkGoldenrod);
- screenFont.EffectSize = 3;
- soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- this.timerDraw.Tick += new EventHandler(this.TimerChallenge);
- this.prepareRing.Tick += new EventHandler(this.Peds_In_City);
- //this.cutsceneNr1.Tick += new EventHandler(this.CutScene1_Challenge1);
- this.challengeNr1_first.Tick += new EventHandler(this.FirstMission_Challenge1);
- this.challengeNr1_second.Tick += new EventHandler(this.SecondMission_Challenge1);
- this.challengeNr2.Tick += new EventHandler(this.FirstMission_Challenge2);
- this.challengeNr3.Tick += new EventHandler(this.FirstMission_Challenge3);
- this.SpecialCar_CHECK.Tick += new EventHandler(this.CheckSpecialCar);
- this.SpecialCar0.Tick += new EventHandler(this.SpecialCar0_tick);
- this.SpecialCar1.Tick += new EventHandler(this.SpecialCar1_tick);
- this.SpecialCar2.Tick += new EventHandler(this.SpecialCar2_tick);
- this.PerFrameDrawing += new GraphicsEventHandler(DrawingThings);
- this.BindKey(System.Windows.Forms.Keys.L, new KeyPressDelegate(KeyDown));
- this.Interval = 1;
- this.BindConsoleCommand("Clear", new ConsoleCommandDelegate(Czystka), " - Clear Rinepim");
- //this.BindConsoleCommand("Start", new ConsoleCommandDelegate(Start));
- Start();
- calyPlik = SprawdzanieCodes();
- }
- private void Add_Award(int numer_adward)
- {
- switch (numer_adward)
- {
- case 0:
- if (!(antenaAuta == null)) if (antenaAuta.Exists())
- {
- antenaAuta.NoLongerNeeded();
- antenaAuta.Detach();
- antenaAuta.Delete();
- }
- if (!(specialCars[0] == null)) if (specialCars[0].Exists())
- {
- specialCars[0].NoLongerNeeded();
- specialCars[0].Delete();
- }
- GTA.Native.Function.Call("REQUEST_MODEL", 0x3A196CEA);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", -353.1F, 9.7F, 14.18F, 5F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", -353.1F, 9.7F, 14.18F, 5F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", -353.1F, 9.7F, 14.18F, 5F);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", -353.1F, 9.7F, 14.18F, 5F);
- specialCars[0] = World.CreateVehicle(0x3A196CEA, new Vector3(-353.1F, 9.7F, 14.18F));
- specialCars[0].Heading = 2;
- GTA.Native.Function.Call("REQUEST_MODEL", 0x700F7C5A);
- antenaAuta = World.CreateObject(0x700F7C5A, new Vector3(-353.1F, 9.7F, 40.18F));
- antenaAuta.AttachToVehicle(specialCars[0], new Vector3(0, -0.4F, 0.96F), new Vector3(0F,3.15F,0F));
- antenaAuta.Collision = true;
- //GTA.Native.Function.Call("ATTACH_OBJECT_TO_CAR_PHYSICALLY",0x700F7C5A, specialCars[0], 0, 0, 0F,0F,1F, 0, 0, 0, 0, 0, 0, 0, 1);
- break;
- case 1:
- if (!(specialCars[1] == null)) if (specialCars[1].Exists())
- {
- GTA.Native.Function.Call("STOP_PTFX", ptfxLodziarka);
- GTA.Native.Function.Call("REMOVE_PTFX", ptfxLodziarka);
- specialCars[1].NoLongerNeeded();
- specialCars[1].Delete();
- }
- GTA.Native.Function.Call("REQUEST_MODEL", 0x22C16A2F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", -533.42F, 1477.21F, 18.35F, 10F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", -533.42F, 1477.21F, 18.35F, 10F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", -533.42F, 1477.21F, 18.35F, 10F);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", -533.42F, 1477.21F, 18.35F, 10F);
- specialCars[1] = World.CreateVehicle(0x22C16A2F,new Vector3(-533.42F,1477.21F,18.35F));
- specialCars[1].Heading = 180;
- ptfxLodziarka = GTA.Native.Function.Call<int>("START_PTFX_ON_VEH", "ambient_dry_ice", specialCars[1], 0, 0, 0, 0, 0, 0, 1.0);
- break;
- case 2:
- if (!(specialCars[2] == null)) if (specialCars[2].Exists())
- {
- specialCars[2].NoLongerNeeded();
- specialCars[2].Delete();
- }
- GTA.Native.Function.Call("REQUEST_MODEL", 0x9D0450CA);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", -528.16F, 1284.33F, 109.6F, 10F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", -528.16F, 1284.33F, 109.6F, 10F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", -528.16F, 1284.33F, 109.6F, 10F);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", -528.16F, 1284.33F, 109.6F, 10F);
- specialCars[2] = World.CreateVehicle(0x9D0450CA, new Vector3(-528.16F, 1284.33F, 109.6F));
- specialCars[2].Heading = 0;
- break;
- }
- }
- private void NadpisanieCodes(int numer_challenge)
- {
- if (!(System.IO.File.Exists(Game.InstallFolder + "//scripts/RinepimChallenge/codes.txt")))
- {
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Script did not find 'codes.txt' file. Award was not saved.", 10000, 1);
- }
- else
- {
- StringBuilder MICHAL = new StringBuilder();
- System.IO.StreamWriter MichalWpisz = new System.IO.StreamWriter(Game.InstallFolder + "//scripts/RinepimChallenge/codes.txt", false);
- MichalWpisz.WriteLine("Special Awards:");
- for (int linijka3_nr = 0; linijka3_nr < numer_challenge; linijka3_nr++)
- {
- MichalWpisz.WriteLine(calyPlik[linijka3_nr]);
- }
- switch (numer_challenge)
- {
- case 0:
- MichalWpisz.WriteLine("64657374726f79656e67696e65"); // destroyengine
- //GTA.Native.Function.Call("SET_MISSION_PASSED_CASH",true, 5000, 1);
- Player.Money = Player.Money + 1000;
- if (zadanieCheck[0] == true) Player.Money = Player.Money + 1000;
- if (zadanieCheck[1] == true) Player.Money = Player.Money + 5000;
- GTA.Native.Function.Call("DISPLAY_CASH", true);
- // TEST TUTAJ
- break;
- case 1:
- MichalWpisz.WriteLine("6672657a7a65"); // frezze
- Player.Money = Player.Money + 1000;
- if (zadanieCheck[2] == true) Player.Money = Player.Money + 5000;
- if (zadanieCheck[3] == true) Player.Money = Player.Money + 2000;
- GTA.Native.Function.Call("DISPLAY_CASH", true);
- break;
- case 2:
- MichalWpisz.WriteLine("70726f70656c6c6572"); // propeller
- Player.Money = Player.Money + 10000;
- //if (zadanieCheck[2] == true) Player.Money = Player.Money + 5000;
- //if (zadanieCheck[3] == true) Player.Money = Player.Money + 2000;
- GTA.Native.Function.Call("DISPLAY_CASH", true);
- break;
- }
- for (int linijka4_nr = numer_challenge+1; linijka4_nr < 25; linijka4_nr++)
- {
- MichalWpisz.WriteLine(calyPlik[linijka4_nr]);
- }
- MichalWpisz.Close();
- calyPlik = SprawdzanieCodes();
- }
- }
- private string[] SprawdzanieCodes()
- {
- string[] linesFileRead = new string[25];
- if (!(System.IO.File.Exists(Game.InstallFolder + "//scripts/RinepimChallenge/codes.txt")))
- {
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Script did not find 'codes.txt' file. Awards do not loaded.", 10000, 1);
- }
- else
- {
- using (System.IO.StreamReader TESTUJE = new System.IO.StreamReader(Game.InstallFolder.ToString() + "//scripts/RinepimChallenge/codes.txt", true))
- {
- if (!(TESTUJE.ReadLine() == "Special Awards:")) //pusty znak - alt+2+5+5
- {
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "codes.txt IS NOT ORYGINAL!", 10000, 1);
- return null;
- }
- for (int linijka1_nr = 0; linijka1_nr < 25; linijka1_nr++)
- {
- linesFileRead[linijka1_nr] = TESTUJE.ReadLine();
- }
- TESTUJE.Close();
- }
- for (int linijka2_nr = 0; linijka2_nr < 25; linijka2_nr++)
- {
- switch (linijka2_nr)
- {
- case 0: // pierwsza linijka
- if (linesFileRead[0] == "64657374726f79656e67696e65")
- {
- Add_Award(0);
- }
- break;
- case 1:
- if (linesFileRead[1] == "6672657a7a65")
- {
- Add_Award(1);
- }
- break;
- case 2:
- if (linesFileRead[2] == "70726f70656c6c6572")
- {
- Add_Award(2);
- }
- break;
- }
- }
- }
- return linesFileRead;
- }
- public void Start()//(ParameterCollection Parameter)
- {
- for (int numerCzlowiek = 0; numerCzlowiek <= 2; numerCzlowiek++)
- {
- //GTA.Native.Function.Call("REQUEST_COLLISION_AT_POSN", miejscaStartPed[numerCzlowiek].X, miejscaStartPed[numerCzlowiek].Y, miejscaStartPed[numerCzlowiek].Z);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", miejscaStartPed[numerCzlowiek].X, miejscaStartPed[numerCzlowiek].Y, miejscaStartPed[numerCzlowiek].Z, 5F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", miejscaStartPed[numerCzlowiek].X, miejscaStartPed[numerCzlowiek].Y, miejscaStartPed[numerCzlowiek].Z, 5F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", miejscaStartPed[numerCzlowiek].X, miejscaStartPed[numerCzlowiek].Y, miejscaStartPed[numerCzlowiek].Z, 5F);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", miejscaStartPed[numerCzlowiek].X, miejscaStartPed[numerCzlowiek].Y, miejscaStartPed[numerCzlowiek].Z, 5F);
- Game.WaitInCurrentScript(100);
- //GTA.Native.Function.Call("REQUEST_INTERIOR_MODELS", 0xFC2BE1B8, char *interiorName);
- GTA.Native.Function.Call("REQUEST_MODEL", 0xFC2BE1B8);
- //GTA.Native.Function.Call("REQUEST_COLLISION_FOR_MODEL", 0xFC2BE1B8);
- startPed[numerCzlowiek] = World.CreatePed(0xFC2BE1B8, miejscaStartPed[numerCzlowiek]);
- }
- Game.WaitInCurrentScript(10000);
- Game.Console.Print("XXX");
- startPed[0].Heading = 220F;
- startPed[1].Heading = 264.7293F;
- startPed[2].Heading = 292.31F;
- //-389.3637, 613.7462, 14.7132 - ped spawn a head: 264.7293
- for (int numerCzlowiek = 0; numerCzlowiek <= 2; numerCzlowiek++)
- {
- //GTA.Native.Function.Call("SET_LOAD_COLLISION_FOR_CHAR_FLAG", startPed[numerCzlowiek], true);
- startPed[numerCzlowiek].BlockPermanentEvents = true;
- startPed[numerCzlowiek].BlockGestures = true;
- startPed[numerCzlowiek].BlockWeaponSwitching = true;
- startPed[numerCzlowiek].Task.PlayAnimation(new AnimationSet("missroman6"), "partial_wave_a", 1.0F, AnimationFlags.Unknown11 | AnimationFlags.Unknown05 | AnimationFlags.Unknown09);
- GTA.Native.Function.Call("SET_CHAR_KEEP_TASK", startPed[numerCzlowiek], true);
- GTA.Native.Function.Call("BLOCK_CHAR_VISEME_ANIMS", startPed[numerCzlowiek], true);
- GTA.Native.Function.Call("BLOCK_CHAR_AMBIENT_ANIMS", startPed[numerCzlowiek], true);
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", startPed[numerCzlowiek], "missroman6", "partial_wave_a", 0.2F);
- //GTA.Native.Function.Call("TASK_ACHIEVE_HEADING", startPed[numerCzlowiek], 220F);
- GTA.Native.Function.Call("SET_BLOCKING_OF_NON_TEMPORARY_EVENTS", startPed[numerCzlowiek], true);
- startPed[numerCzlowiek].BlockPermanentEvents = true;
- startPed[numerCzlowiek].CowerInsteadOfFleeing = false;
- startPed[numerCzlowiek].Invincible = true;
- startPed[numerCzlowiek].SenseRange = 0.0F;
- startPed[numerCzlowiek].Task.AlwaysKeepTask = true;
- startPed[numerCzlowiek].MakeProofTo(true, true, true, true, true);
- GTA.Native.Function.Call("UNLOCK_RAGDOLL", startPed[numerCzlowiek], false);
- startPed[numerCzlowiek].FreezePosition = true;
- }
- }
- private void Czystka(ParameterCollection Parameter)
- {
- startPed[2].NoLongerNeeded();
- startPed[2].Delete();
- //specialCars[0].NoLongerNeeded();
- //specialCars[0].Delete();
- // NA WEJŚCIU GRY - SPRAWDZ CZY JEST PLIK + CZY JEST ORYGINALNY
- // POTEM WCZYTAJ JAKIE KODY GRACZ DOSTAŁ
- // DODAJ TE OBIEKTY NA MAPE itp
- //string TurretCode = "turret_one";
- //Game.Console.Print("turret_one hash: " + TurretCode.GetHashCode() + "1030");
- /*
- if (!(System.IO.File.Exists(Game.InstallFolder + "//scripts/RinepimChallenge/codes.txt")))
- {
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Script did not find 'codes.txt' file. Award was not saved.", 10000, 1);
- }
- else
- {
- /*using (System.IO.StreamReader TESTUJE = new System.IO.StreamReader(Game.InstallFolder.ToString() + "//scripts/RinepimChallenge/codes.txt", true))
- {
- if (!(TESTUJE.ReadLine() == "Special Awards:")) //pusty znak - alt+2+5+5
- {
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "codes.txt IS NOT ORYGINAL!", 10000, 1);
- return;
- }
- //while (TESTUJE.Peek() >= 0)
- //{
- //Game.Console.Print(TESTUJE.ReadLine());
- //ABC = ABC + 1;
- //while (!TESTUJE.EndOfStream)
- for(ABC=0;ABC<25;ABC++)
- {
- lines[ABC] = TESTUJE.ReadLine();
- Game.Console.Print(lines[ABC]);
- }
- //}
- //Game.Console.Print("BYLO ABC: " + ABC);
- TESTUJE.Close();
- }
- StringBuilder MICHAL = new StringBuilder();
- //MICHAL.AppendLine(mojTekst.GetHashCode().ToString());
- System.IO.StreamWriter MichalWpisz = new System.IO.StreamWriter(Game.InstallFolder + "//scripts/RinepimChallenge/codes.txt",false);
- MichalWpisz.WriteLine("Special Awards:");
- for (int linijka3_nr = 0; linijka3_nr < 5; linijka3_nr++)
- {
- MichalWpisz.WriteLine(calyPlik[linijka3_nr]);
- }
- for (int linijka4_nr = 6; linijka4_nr < 25; linijka4_nr++)
- {
- MichalWpisz.WriteLine(calyPlik[linijka4_nr]);
- }
- MichalWpisz.Close();
- }
- */
- }
- private int Losowanie(int min, int max)
- {
- Random newRandom = new Random();
- return newRandom.Next(min, max);
- }
- private void PlayerIsAlive()
- {
- if (Player.Character.isDead == true)
- {
- ClearAll();
- }
- }
- private void KeyDown()
- {
- //Game
- // .Consolegasnica.CurrentRoom;
- //GTA.Native.Function.Call("GET_INTERIOR_FROM_CHAR",Player.Character, &inter);
- //Game.Console.Print("ROOM: " + Player.Character.CurrentRoom);
- /*
- GTA.Native.Function.Call("SET_STATE_OF_CLOSEST_DOOR_OF_TYPE",new Model(0xb7bda30e), -528.0F, 1262.0F, 18.0F, 0, 0.0F); // open
- //GTA.Native.Function.Call("SET_STATE_OF_CLOSEST_DOOR_OF_TYPE", new Model(0xb7bda30e), -528.0F, 1262.0F, 18.0F, 1, 0.0F); // lock
- //tStateOfClosestDoorOfType(0xb7bda30e, -528.0f, 1262.0f, 18.0f, 0, 0.0f)
- /*GTA.Native.Function.Call("GET_STATE_OF_CLOSEST_DOOR_OF_TYPE",(uint model, float x, float y, float z, int *state, float *);
- GetStateOfClosestDoorOfType(model, x, y, z, &lock, &doorSwing);
- if (lock == 1) // if door is locked, unlock
- {
- SetStateOfClosestDoorOfType(model, x, y, z, 0, 0.0f);
- LogInfo("Episode: TLAD, Door: '%s', Coords: %.2f %.2f %.2f", strDoor, x, y, z);
- }
- //GTA.Native.Function.Call("SET_FORCE_PLAYER_TO_ENTER_THROUGH_DIRECT_DOOR",Player.Character, true);
- //GTA.Native.Function.Call("PLAYSTATS_MISSION_FAILED",1000);
- //Wait(1000);
- /*
- //soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- GTA.Native.Function.Call("PLAY_AUDIO_EVENT", "FLAT_TYRE_BLOWOUT");
- Wait(1000);
- GTA.Native.Function.Call("PLAY_SOUND_FRONTEND", soundID, "FLAT_TYRE_BLOWOUT");
- Wait(1000);
- GTA.Native.Function.Call("PLAY_SOUND", soundID, "FLAT_TYRE_BLOWOUT");
- //Player.TeleportTo(startPed[1].Position.Around(2F));
- /*
- if(TEEEST==false)
- {
- MissionBlip = GTA.Blip.AddBlip(Player.Character.Position);
- TEEEST = true;
- GTA.Native.Function.Call("FLASH_BLIP",MissionBlip, true);
- }
- //GTA.Native.Function.Call("SET_BLIP_COORDINATES", , Player.Character.Position.X, Player.Character.Position.Y, Player.Character.Position.Z);
- //MissionBlip.Position = Player.Character.GetOffsetPosition(new Vector3(0,5F,0));
- //GTA.Object lodzik = World.CreateObject(Model.FromString("amb_icecone01"),new Vector3(-340.04F,640.93F,16.48F));
- //BLIP 1: -362.00F,621.62, 14.77
- // DRUGI:GTA.Object lodzik = World.CreateObject(Model.FromString("amb_icecone01"),new Vector3(-35.58F,606.64F,14.46F));
- // trzeci GTA.Object lodzik = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-70.44F, 1241.32F, 20.97F));
- // czwarty LAST :GTA.Object lodzik = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-503.9102F, 1467.0360F, 21.660F));
- //-389.3637, 613.7462, 14.7132 - ped spawn a head: 264.7293
- //lodzik.FreezePosition = true;
- //while(!(GTA.Native.Function.Call<bool>("HAS_OBJECT_BEEN_DAMAGED_BY_CHAR",lodzik, Player.Character))
- //lodzik.NoLongerNeeded();
- //lodzik.Delete();
- /*
- Ped CEL = World.CreatePed(Player.Character.GetOffsetPosition(new Vector3(0, 5F, 0))) ;
- GTA.Native.Function.Call("SET_CHAR_MOVE_ANIM_SPEED_MULTIPLIER",CEL, 4.0F);
- CEL.Task.RunTo(Player.Character.GetOffsetPosition(new Vector3(0,30F,0)),true);
- Wait(1000);
- //int qwe = 254;
- //do
- //{
- //qwe = qwe - 1;
- //GTA.Native.Function.Call("SET_PED_ALPHA", CEL, 48);
- //Wait(10);
- //} while (qwe > 10);
- //Game.Console.Print("QWE: " + qwe);
- Wait(5000);
- CEL.Task.RunTo(Player.Character.GetOffsetPosition(new Vector3(10, -10F, 0)), true);
- //GTA.Native.Function.Call("SET_PED_ALPHA", CEL, 255);
- Wait(5000);
- CEL.NoLongerNeeded();
- CEL.Delete();
- /// DRAW_SPRITE_WITH_UV_COORDS(uint texture, float, float, float, float, float, float, float, float, float angle, int r, int g, int b, int a);
- /// SPRAWDZIC
- //Wait(500);
- //GTA.Native.Function.Call("GET_OBJECT_MASS",obiektH, masa);
- //Game.Console.Print("MASA : " + masa);
- //GTA.Native.Function.Call("CLEAR_OBJECT_LAST_DAMAGE_ENTITY", obiektH);
- //GTA.Native.Function.Call("SET_OBJECT_CCD", obiektH,true);
- //GTA.Native.Function.Call("SET_OBJECT_HEALTH", obiektH, -10F);
- //GTA.Native.Function.Call("SET_ACTIVATE_OBJECT_PHYSICS_AS_SOON_AS_IT_IS_UNFROZEN", obiektH, true);
- //}
- /*
- //Vector3 qwe = Player.Character.GetOffsetPosition(new Vector3(0F,10F,2F));
- //GTA.Native.Function.Call("PLAY_FIRE_SOUND_FROM_POSITION",1, qwe.X, qwe.Y, qwe.Z);
- //GTA.Native.Function.Call("DRAW_CORONA", -357.69F, Player.Character.Position.Y - 30F, 22.96F, 200F, 1, 1F, 255, 255, 255);
- //Player.Character.Animation.Play(grupa_anim2, animacja2, 1.0F,AnimationFlags.Unknown06);
- //Wait(2000);
- //Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown11 | AnimationFlags.Unknown12);
- //GTA.Native.Function.Call("TASK_PLAY_ANIM_SECONDARY_UPPER_BODY", Player.Character, animacja, grupa_anim.Name, 0.9F, 0, 0, 0, 1, 0);
- //GTA.Native.Function.Call("TASK_PLAY_ANIM_UPPER_BODY", Player.Character, animacja, grupa_anim.Name, 1.0F, 0, 0, 0, 0, 0);
- //Wait(5000);
- //dymek.Visible = false;
- //GTA.Native.Function.Call("TASK_PLAY_ANIM_SECONDARY_UPPER_BODY", Player.Character, animacja, grupa_anim.Name, 0.9F, 0, 0, 0, 1, 0);
- *
- *
- // START GASNICY !!!!!!!!!!!!!!!!!!!!!!!!!!
- string animacja = "swing_idle";
- AnimationSet grupa_anim = new AnimationSet("amb@baseball");
- string animacja2 = "use_vendmac";
- AnimationSet grupa_anim2 = new AnimationSet("amb@arcade");
- soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim2.Name);
- Player.Character.FreezePosition = true;
- Player.CanControlCharacter = false;
- Player.Character.Animation.Play(grupa_anim2, animacja2, 1.0F);
- Wait(100);
- GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", Player.Character, grupa_anim2.Name, animacja2, 0.60F);
- Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06|AnimationFlags.Unknown09 | AnimationFlags.Unknown11 | AnimationFlags.Unknown12);
- //GTA.Native.Function.Call("TASK_PLAY_ANIM_SECONDARY_UPPER_BODY", Player.Character, animacja, grupa_anim.Name, 0.9F, 0, 0, 0, 1, 0);
- Wait(100);
- GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", Player.Character, grupa_anim.Name, animacja, 0.90F);
- Wait(1000);
- Player.Character.FreezePosition = false;
- Player.CanControlCharacter = true;
- Vector3 PRZOD = Player.Character.GetOffsetPosition(new Vector3(0, 1F, 0));
- int myFire1 = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -542.1921F, 1256.6660F, 21.5448F, 25, 50);
- int myFire2 = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", PRZOD.X, PRZOD.Y+4F, PRZOD.Z, 25, 50);
- //GTA.Native.Function.Call("TASK_PLAY_ANIM_NON_INTERRUPTABLE", Player.Character, animacja, grupa_anim.Name, 0.9F, 0, 0, 0, 1, 0);
- //UPDATE_PTFX_TINT(iParam1, uVar4 / 255.00000000, uVar5 / 255.00000000, uVar6 / 255.00000000, 255);
- //Wait(2000);
- //GTA.Native.Function.Call("UPDATE_PTFX_OFFSETS", MY_TEST, 0F, 0F, 0.5F, 15F, 15F,-25.0F);
- //int PTFX_nr1 = GTA.Native.Function.Call<int>("START_PTFX_ON_OBJ", "shot_directed_steam", gasnica, 0.2F, 0F, 0.63F, Player.Character.Direction.X + 80F, Player.Character.Direction.Y + 180F, Player.Character.Direction.Z+80F, 1.0F);
- //int PTFX_nr1 = GTA.Native.Function.Call<int>("START_PTFX_ON_OBJ", "shot_directed_water", gasnica, 0.2F, 0F, 0.63F, Player.Character.Direction.X + 80F, Player.Character.Direction.Y + 180F, Player.Character.Direction.Z + 80F, 1.0F);
- int TTT = 20;
- float RRR = 16.2F;
- int PTFX_nr1=0,PTFX_nr2=1;
- bool it_WLACZONY = false;
- Wait(200);
- GTA.Object gasnica = World.CreateObject(0x145D8395, Player.Character.GetOffsetPosition(new Vector3(0, 1F, 0F)));
- //GTA.Native.Function.Call("MUTE_POSITIONED_RADIO", true);
- //GTA.Native.Function.Call("SET_LOBBY_MUTE_OVERRIDE", true);
- //GTA.Native.Function.Call("MUTE_GAMEWORLD_AUDIO", true);
- //GTA.Native.Function.Call("MUTE_GAMEWORLD_AND_POSITIONED_RADIO_FOR_TV", true); // to dziala
- GTA.Native.Function.Call("BLOCK_CHAR_VISEME_ANIMS",Player.Character, true);
- GTA.Native.Function.Call("BLOCK_CHAR_AMBIENT_ANIMS",Player.Character, true);
- GTA.Native.Function.Call("HIDE_CHAR_WEAPON_FOR_SCRIPTED_CUTSCENE", Player.Character, true);
- GTA.Native.Function.Call("BLOCK_PED_WEAPON_SWITCHING", Player.Character, true);
- GTA.Native.Function.Call("SET_BLOCKING_OF_NON_TEMPORARY_EVENTS", Player.Character, true);
- //GTA.Native.Function.Call("IS_PED_IN_CUTSCENE_BLOCKING_BOUNDS",Player.Character);
- gasnica.AttachToPed(Player.Character, Bone.LeftHand, new Vector3(0F, 0.02F, 0.63F), new Vector3(3.15F, 0.0F, -1.65F));
- //GTA.Native.Function.Call("UPDATE_PTFX_TINT", PTFX_nr1, 255F, 0.0F, 1.0F, 255);
- bool zgaszony1=false,zgaszony2=false;
- int control = 0;
- do
- {
- //GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", Player.Character, grupa_anim.Name, animacja, 0.90F);
- //GTA.Native.Function.Call("UPDATE_PTFX_TINT", MY_TEST, 5F / 255.00000F, 155.5F / 255.00000000, 255.0F / 255.00000000, 255);
- //GTA.Native.Function.Call("UPDATE_PTFX_TINT", MY_TEST, 255F, 0.0F, 1.0F, 0F);
- RRR = RRR + 1.0F;
- //GTA.Native.Function.Call("UPDATE_PTFX_OFFSETS", MY_TEST, 0F, 0F, 0.5F, RRR, RRR, RRR);
- if(Game.isGameKeyPressed(GameKey.Action))
- {
- if (it_WLACZONY)
- {
- it_WLACZONY = false;
- GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr2);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr2);
- Wait(300);
- }
- else
- {
- GTA.Native.Function.Call("PLAY_SOUND_FROM_OBJECT",soundID, "BULLET_SPRAY_LOOP", gasnica);
- //GTA.Native.Function.Call("PLAY_SOUND_FROM_OBJECT", soundID, "AMBIENT_CREAKING_BV_WRAPPER", gasnica);
- //Wait(1000);
- //GTA.Native.Function.Call("PLAY_AUDIO_EVENT", "AMBIENT_CREAKING_BV_WRAPPER");
- //Wait(1000);
- //GTA.Native.Function.Call("PLAY_SOUND_FRONTEND", soundID, "AMBIENT_CREAKING_BV_WRAPPER");
- //Wait(1000);
- //GTA.Native.Function.Call("PLAY_SOUND", soundID, "AMBIENT_CREAKING_BV_WRAPPER");
- PTFX_nr1 = GTA.Native.Function.Call<int>("START_PTFX_ON_OBJ", "water_carwash_jets", gasnica, 0.15F, 0F, 0.66F, Player.Character.Direction.X + 90F, Player.Character.Direction.Y + 110F, Player.Character.Direction.Z, 1.0F);
- PTFX_nr2 = GTA.Native.Function.Call<int>("START_PTFX_ON_OBJ", "water_carwash_jets", gasnica, 0.16F, 0F, 0.66F, Player.Character.Direction.X + 90F, Player.Character.Direction.Y + 110F, Player.Character.Direction.Z, 1.0F);
- it_WLACZONY = true;
- }
- }
- if (it_WLACZONY)
- {
- Vector3 Gaszenie = Player.Character.GetOffsetPosition(new Vector3(0,1.0F,-0.5F));
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT",Gaszenie.X, Gaszenie.Y, Gaszenie.Z, 1.0F);
- TTT = TTT - 1;
- //Wait(500);
- //dymek.Delete();
- }
- Wait(100);
- if (GTA.Native.Function.Call<bool>("IS_SCRIPT_FIRE_EXTINGUISHED", myFire1) && zgaszony1==false)
- {
- Game.Console.Print("ZGASZONY 1!");
- zgaszony1 = true;
- control = control + 1;
- }
- if (GTA.Native.Function.Call<bool>("IS_SCRIPT_FIRE_EXTINGUISHED", myFire2) && zgaszony2 == false)
- {
- Game.Console.Print("ZGASZONY 2!");
- zgaszony2 = true;
- control = control + 1;
- /// Zabezpieczenie anty cheat:
- /// jak suma kontrolna wiecej niz 1 to jest cheater
- /// jak ostatni ogien zgasi nie bedac w poblizu = dodaj do sumy kontrolnej i tez wykryje cheatera
- }
- if (control > 1)
- {
- Game.Console.Print("CHEATER!");
- }
- control = 0;
- Game.DisplayText("TTT : " + TTT);
- } while (TTT > 10);
- GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("RELEASE_SOUND_ID", soundID);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr2);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr2);
- //GTA.Native.Function.Call("STOP_PTFX", PTFX_nr1);
- //GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr1);
- //GTA.Native.Function.Call("STOP_PTFX", PTFX_nr2);
- //GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr2);
- gasnica.Detach();
- gasnica.NoLongerNeeded();
- Player.Character.Task.ClearAll();
- Player.Character.Task.ClearSecondary();
- //GTA.Native.Function.Call("MUTE_GAMEWORLD_AND_POSITIONED_RADIO_FOR_TV", false);
- //GTA.Native.Function.Call("MUTE_POSITIONED_RADIO", false);
- //GTA.Native.Function.Call("SET_LOBBY_MUTE_OVERRIDE", false);
- //GTA.Native.Function.Call("MUTE_GAMEWORLD_AUDIO", false);
- GTA.Native.Function.Call("BLOCK_CHAR_AMBIENT_ANIMS", Player.Character, false);
- GTA.Native.Function.Call("BLOCK_CHAR_VISEME_ANIMS", Player.Character, false);
- GTA.Native.Function.Call("BLOCK_PED_WEAPON_SWITCHING", Player.Character, false);
- GTA.Native.Function.Call("SET_BLOCKING_OF_NON_TEMPORARY_EVENTS", Player.Character, false);
- // KONIEC GASNICY !!!!!!!!!!!!!!!!!!!!!!!!!!
- /*
- Wait(1000);
- Player.Character.Task.PlayAnimation(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown11);
- Wait(1000);
- Player.Character.Task.PlayAnimation(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown10);
- Wait(1000);
- Player.Character.Task.PlayAnimation(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown08);
- Wait(1000);
- Player.Character.Task.PlayAnimation(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown07);
- Wait(1000);
- Player.Character.Task.PlayAnimation(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown02);
- Wait(1000);
- Player.Character.Task.PlayAnimation(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown04);
- Wait(1000);
- Player.Character.Task.PlayAnimation(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown09 | AnimationFlags.Unknown03);*/
- // obiekt BM_fire_extingB
- // wycelować - zwolnić - jakaś oznaka lodu - ragdoll po
- // na dole vvv jak odegrać od pewnego momentu
- /*
- string animacja = "use_vendmac";
- AnimationSet grupa_anim = new AnimationSet("amb@arcade");
- GTA.Native.Function.Call("REQUEST_ANIMS",grupa_anim.Name);
- Wait(200);
- Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown01);
- Wait(200);
- GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", Player.Character, grupa_anim.Name, animacja, 0.75F);
- */
- //Wait(10000);
- //Player.Character.Task.PlayAnimation(new AnimationSet("reaction@male_flee"), "front", 1.0F,AnimationFlags.Unknown06);
- //GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME",Player.Character, "reaction@male_flee", "front", 0.1);
- //Game.Console.Print("HEY : "+new AnimationSet("reaction@male_flee").GetPedsCurrentAnimationTime(Player.Character,"front"));
- /*
- if (Player.Character.isInVehicle())
- {
- if (Player.Character.CurrentVehicle.Model == 0x22C16A2F)
- {
- if (Game.isGameKeyPressed(GameKey.SoundHorn))
- {
- int ABC = 0;
- float QWE = 1.0F;
- Ped[] pedsAround = World.GetPeds(Player.Character.Position, 14F);
- foreach (Ped targetArray in pedsAround)
- {
- if (targetArray == Player || targetArray.isInVehicle() ||
- 0.1F<targetArray.Animation.GetCurrentAnimationTime(new AnimationSet("reaction@male_flee"),"front")||
- 0.1F < targetArray.Animation.GetCurrentAnimationTime(new AnimationSet("reaction@male_flee"), "left") ||
- 0.1F < targetArray.Animation.GetCurrentAnimationTime(new AnimationSet("reaction@male_flee"), "right") ||
- 0.1F < targetArray.Animation.GetCurrentAnimationTime(new AnimationSet("amb@flee"), "stand_into_ball"))
- //targetArray.Animation.isPlaying(new AnimationSet("reaction@male_flee"),"front")||
- //targetArray.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "left")||
- //targetArray.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "right")||
- //targetArray.Animation.isPlaying(new AnimationSet("amb@flee"), "stand_into_ball"))
- {
- continue;
- }
- int wynikLosowania = Losowanie(0, 4);
- Wait(1);
- if (wynikLosowania == 0)
- {
- animacja = "front";
- grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- targetArray.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- else if (wynikLosowania == 1)
- {
- animacja = "left";
- grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- targetArray.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- else if (wynikLosowania == 2)
- {
- animacja = "right";
- grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- targetArray.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- else if (wynikLosowania == 3)
- {
- animacja = "stand_into_ball";
- grupa_anim = new AnimationSet("amb@flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- targetArray.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- }
- while (QWE > 0.01F)
- {
- foreach (Ped targetArray in pedsAround)
- {
- if (targetArray == Player || targetArray.isInVehicle())
- {
- continue;
- }
- ABC = ABC + 1;
- if (ABC == pedsAround.Length)
- {
- QWE = QWE - 0.01F;
- ABC = 1;
- Wait(1);
- }
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", targetArray, grupa_anim.Name, animacja, QWE);
- }
- }
- Game.Console.Print("Ilu: " + pedsAround.Length);
- ABC = 0;
- foreach (Ped targetArray in pedsAround)
- {
- ABC = ABC + 1;
- if (targetArray == Player || targetArray.isInVehicle())
- {
- continue;
- }
- Game.Console.Print("Ile zwalnia: " + ABC);
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", targetArray, grupa_anim.Name, animacja, 0.0F);
- }
- QWE = 1.0F;
- Wait(2000);
- Game.Console.Print("END!");
- foreach (Ped targetArray in pedsAround)
- {
- if (targetArray == Player.Character)
- {
- continue;
- }
- targetArray.Task.ClearAllImmediately();
- }
- }
- }
- }
- /*
- int wynikLosowania = Losowanie(0, 4);
- Game.Console.Print("LOSUJE: " + wynikLosowania);
- if (wynikLosowania == 0)
- {
- string animacja = "front";
- AnimationSet grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- while (QWE > 0.1F)
- {
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, QWE);
- QWE = QWE - 0.01F;
- Wait(1);
- }
- Wait(200);
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, 0.0);
- }
- else if (wynikLosowania == 1)
- {
- string animacja = "left";
- AnimationSet grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- while (QWE > 0.1F)
- {
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, QWE);
- QWE = QWE - 0.01F;
- Wait(1);
- }
- Wait(200);
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, 0.0);
- }
- else if (wynikLosowania == 2)
- {
- string animacja = "right";
- AnimationSet grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- while (QWE > 0.1F)
- {
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, QWE);
- QWE = QWE - 0.01F;
- Wait(1);
- }
- Wait(200);
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, 0.0);
- }
- else if (wynikLosowania == 3)
- {
- string animacja = "stand_into_ball";
- AnimationSet grupa_anim = new AnimationSet("amb@flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- while (QWE > 0.1F)
- {
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, QWE);
- QWE = QWE - 0.01F;
- Wait(1);
- }
- Wait(200);
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", Player.Character, grupa_anim.Name, animacja, 0.0);
- }
- */
- // versja STARA - TO NA IDLE --int myPtfx = GTA.Native.Function.Call<int>("START_PTFX_ON_PED", "ambient_cig_clouds", Player.Character, 0, 0, 0, 0, 0, 0, 1.0);
- //0xF1388248
- //GTA.Native.Function.Call("REQUEST_MODEL", 0xF1388248);
- //dir_ptfx = GTA.World.CreateObject(0xF0E633D9,Player.Character.Position);
- //dir_ptfx.FreezePosition = false;
- //dir_ptfx.Collision = false;
- //dir_ptfx.AttachToPed(Player.Character,Bone.Root,new Vector3(0,0,0),new Vector3(12,15,10));
- // DO IDLE !!!!!!! int myPtfx = GTA.Native.Function.Call<int>("START_PTFX_ON_PED", "ambient_cig_clouds", Player.Character, 0, 0, -0.6, 0, 0, 0, 1.0);
- //ambient_steam_chimney
- //ambient_hotdogstand
- /*
- int myPtfx = GTA.Native.Function.Call<int>("START_PTFX_ON_PED", "ambient_hotdogstand", Player.Character, 0, 0, -0.8, 0, 0, 0, 1.0);
- GTA.Native.Function.Call("UPDATE_PTFX_TINT",myPtfx, 0.0F, 0.0F, 1.0F, 255F);
- //int myPtfx = GTA.Native.Function.Call<int>("START_PTFX_ON_PED", "ambient_respray_can", Player.Character, 0, 0, -0.6, 2F, 95F, 22F, 1.0);
- //GTA.Native.Function.Call("EVOLVE_PTFX",myPtfx, "fade", 1.6);
- Game.Console.Print("STOP!");
- QWE = 1.0F;
- //if (new AnimationSet("reaction@male_flee").isPedPlayingAnimation(Player.Character, "front"))
- //{
- //Game.Console.Print("GRA!");
- //}
- Wait(6000);
- GTA.Native.Function.Call("STOP_PTFX", myPtfx);
- GTA.Native.Function.Call("REMOVE_PTFX", myPtfx);
- //dest_ceramic
- //dest_glass_clear_empty
- //dest_plastic
- myPtfx = GTA.Native.Function.Call<int>("START_PTFX_ON_PED", "dest_glass_clear_empty", Player.Character, 0, 0, 0, 0, 0, 0, 2.0);
- GTA.Native.Function.Call("PLAY_SOUND_FROM_POSITION", soundID, "GLASS_CRACK_S1_C", Player.Character.Position.X, Player.Character.Position.Y, Player.Character.Position.Z);
- GTA.Native.Function.Call("STOP_PTFX", myPtfx);
- GTA.Native.Function.Call("REMOVE_PTFX", myPtfx);
- Game.Console.Print("CLEAR");
- Player.Character.Task.ClearAll();
- Player.Character.ForceRagdoll(2000, false);
- Wait(200);
- GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("RELEASE_SOUND_ID", soundID);
- //Player.Character.Euphoria.BodyBalance.Start(1000);
- //reaction@male_flee
- //Player.TeleportTo(new Vector3(-395.61F, 1178.95F, 14.54F));
- */
- }
- private void CheckSpecialCar(object sender, EventArgs e)
- {
- if (Player.Character.isInVehicle())
- {
- if (!(specialCars[0] == null))
- {
- if (Player.Character.CurrentVehicle == specialCars[0])
- {
- SpecialCar0.Start();
- SpecialCar_CHECK.Stop();
- }
- }
- if (!(specialCars[1] == null))
- {
- if (Player.Character.CurrentVehicle == specialCars[1])
- {
- SpecialCar1.Start();
- SpecialCar_CHECK.Stop();
- }
- }
- if (!(specialCars[2] == null))
- {
- if (Player.Character.CurrentVehicle == specialCars[2])
- {
- SpecialCar2.Start();
- SpecialCar_CHECK.Stop();
- }
- }
- }
- }
- private void SpecialCar0_tick(object sender, EventArgs e)
- {
- if (Player.Character.isInVehicle())
- {
- if (Player.Character.CurrentVehicle.Speed < 10F)
- {
- //GTA.Native.Function.Call("DRAW_LIGHT_WITH_RANGE",antenaAuta.Position.X, antenaAuta.Position.Y, antenaAuta.Position.Z, 255, 255, 255, 50F, 5F);
- GTA.Native.Function.Call("DRAW_CORONA",antenaAuta.Position.X, antenaAuta.Position.Y, antenaAuta.Position.Z+0.7F, 40.0F, 0, 0, 255, 255, 255);
- Vehicle[] carsAround = World.GetVehicles(Player.Character.Position, 15F);
- foreach (Vehicle car in carsAround)
- {
- if (car == Player.Character.CurrentVehicle)
- {
- continue;
- }
- if (car.EngineRunning == true)
- {
- car.EngineHealth = 0;
- }
- Ped pedAuta = car.GetPedOnSeat(VehicleSeat.Driver);
- if (!(pedAuta==null)) pedAuta.Task.FleeFromChar(Player.Character);
- }
- }
- }
- else
- {
- SpecialCar_CHECK.Start();
- SpecialCar0.Stop();
- }
- }
- private void SpecialCar1_tick(object sender, EventArgs e)
- {
- if (Player.Character.isInVehicle())
- {
- if (Game.isGameKeyPressed(GameKey.SoundHorn))
- {
- pedsAround = World.GetPeds(Player.Character.Position, 24F);
- foreach (Ped killFrezze in pedsAround)
- {
- if (Player.Character.CurrentVehicle.Speed > 10F)
- {
- return;
- }
- if (killFrezze == Player || killFrezze == startPed[0])
- {
- continue;
- }
- if (
- killFrezze.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "front") ||
- killFrezze.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "left") ||
- killFrezze.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "right") ||
- killFrezze.Animation.isPlaying(new AnimationSet("amb@flee"), "stand_into_ball"))
- {
- int myPtfx = GTA.Native.Function.Call<int>("START_PTFX", "dest_glass_clear_empty", killFrezze.Position.X, killFrezze.Position.Y, killFrezze.Position.Z, 0, 0, 0, 3.0);
- soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- GTA.Native.Function.Call("PLAY_SOUND_FROM_POSITION", soundID, "GLASS_CRACK_S1_C", killFrezze.Position.X, killFrezze.Position.Y, killFrezze.Position.Z);
- if (killFrezze.isInVehicle())
- {
- killFrezze.CurrentVehicle.NoLongerNeeded();
- killFrezze.Task.ClearAllImmediately();
- //GTA.Native.Function.Call("TASK_LEAVE_CAR_IMMEDIATELY",killFrezze, killFrezze.CurrentVehicle);
- }
- //Wait(1);
- GTA.Native.Function.Call("STOP_PTFX", myPtfx);
- GTA.Native.Function.Call("REMOVE_PTFX", myPtfx);
- //GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("RELEASE_SOUND_ID", soundID);
- killFrezze.Position = new Vector3(killFrezze.Position.X, killFrezze.Position.Y, killFrezze.Position.Z - 100F);
- }
- }
- }
- pedsAround = World.GetPeds(Player.Character.Position, 14F);
- int ABC = 0;
- float QWE = 1.0F;
- foreach (Ped startFrezze in pedsAround)
- {
- if (Player.Character.CurrentVehicle.Speed > 10F)
- {
- return;
- }
- if (startFrezze == Player || startFrezze == startPed[0] ||
- //xxxxxxxxxxxxxxxxxxxx tytaj // aaaaaaaaaaaaaaaaaaaaaaaaa
- startFrezze.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "front") ||
- startFrezze.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "left") ||
- startFrezze.Animation.isPlaying(new AnimationSet("reaction@male_flee"), "right") ||
- startFrezze.Animation.isPlaying(new AnimationSet("amb@flee"), "stand_into_ball"))
- {
- continue;
- }
- int wynikLosowania = Losowanie(0, 4);
- GTA.Native.Function.Call("UNLOCK_RAGDOLL", startFrezze, false);
- startFrezze.FreezePosition = true;
- if (wynikLosowania == 0)
- {
- animacja = "front";
- grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- if (startFrezze.isInVehicle())
- {
- if (startFrezze.Position.DistanceTo(Player.Character.Position) < 10F)
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06 | AnimationFlags.Unknown09);
- startFrezze.CurrentVehicle.DoorLock = DoorLock.ImpossibleToOpen;
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 0);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 1);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 2);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 3);
- }
- }
- else
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- }
- else if (wynikLosowania == 1)
- {
- animacja = "left";
- grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- if (startFrezze.isInVehicle())
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06 | AnimationFlags.Unknown09);
- startFrezze.CurrentVehicle.DoorLock = DoorLock.ImpossibleToOpen;
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 0);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 1);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 2);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 3);
- }
- else
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- }
- else if (wynikLosowania == 2)
- {
- animacja = "right";
- grupa_anim = new AnimationSet("reaction@male_flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- if (startFrezze.isInVehicle())
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06 | AnimationFlags.Unknown09);
- startFrezze.CurrentVehicle.DoorLock = DoorLock.ImpossibleToOpen;
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 0);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 1);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 2);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 3);
- }
- else
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- }
- else if (wynikLosowania == 3)
- {
- animacja = "stand_into_ball";
- grupa_anim = new AnimationSet("amb@flee");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- if (startFrezze.isInVehicle())
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06 | AnimationFlags.Unknown09);
- startFrezze.CurrentVehicle.DoorLock = DoorLock.ImpossibleToOpen;
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 0);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 1);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 2);
- GTA.Native.Function.Call("SMASH_CAR_WINDOW", startFrezze.CurrentVehicle, 3);
- }
- else
- {
- startFrezze.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06);
- }
- }
- }
- while (QWE > 0.01F)
- {
- foreach (Ped slowDownMan in pedsAround)
- {
- ABC = ABC + 1;
- if (ABC == pedsAround.Length)
- {
- QWE = QWE - 0.01F;
- ABC = 0;
- Game.WaitInCurrentScript(1);
- }
- if (slowDownMan == Player || slowDownMan == startPed[0])
- {
- continue;
- }
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", slowDownMan, grupa_anim.Name, animacja, QWE);
- }
- }
- ABC = 0;
- foreach (Ped stopMan in pedsAround)
- {
- ABC = ABC + 1;
- if (stopMan == Player || stopMan == startPed[0])
- {
- continue;
- }
- GTA.Native.Function.Call("SET_CHAR_ANIM_SPEED", stopMan, grupa_anim.Name, animacja, 0.00001F);
- stopMan.Die();
- stopMan.NoLongerNeeded();
- }
- QWE = 1.0F;
- }
- else
- {
- SpecialCar_CHECK.Start();
- SpecialCar1.Stop();
- //Game.Console.Print("CHECK START, one spec cial STOP!");
- // tick check auta ON
- }
- }
- private void SpecialCar2_tick(object sender, EventArgs e)
- {
- if (Player.Character.isInVehicle())
- {
- if (Player.Character.CurrentVehicle.EngineRunning == true)
- {
- Vector3 graczWHeli = Player.Character.GetOffsetPosition(new Vector3(0, 0, -3F));
- Ped[] ludzieHeli = World.GetPeds(graczWHeli, 10F);
- Vehicle[] pojazdyHeli = World.GetVehicles(graczWHeli, 10F);
- GTA.Object[] obiektyHeli = World.GetAllObjects();
- foreach (Ped czlekH in ludzieHeli)
- {
- if (!Game.Exists(czlekH) || czlekH == Player || czlekH.isInVehicle())
- continue;
- czlekH.Euphoria.BodyBalance.Start(5000);
- czlekH.ApplyForce(Vector3.Normalize(czlekH.Position - Player.Character.Position) * (czlekH.Position.DistanceTo(Player.Character.Position) / 2));
- }
- foreach (Vehicle carH in pojazdyHeli)
- {
- if (!Game.Exists(carH) || carH == Player.Character.CurrentVehicle)
- continue;
- carH.ApplyForce(Vector3.Normalize(carH.Position - Player.Character.Position) * (carH.Position.DistanceTo(Player.Character.Position) / 2));
- }
- foreach (GTA.Object obiektH in obiektyHeli)
- {
- if (!Game.Exists(obiektH) || obiektH.Position.DistanceTo(graczWHeli) > 10F)
- continue;
- if (obiektH.isAttachedSomewhere)
- {
- //GTA.Native.Function.Call("DETACH_OBJECT", obiektH, true);
- obiektH.Detach();
- }
- GTA.Native.Function.Call("SET_OBJECT_DYNAMIC", obiektH, true);
- obiektH.ApplyForce(Vector3.Normalize(obiektH.Position - Player.Character.Position) * (obiektH.Position.DistanceTo(Player.Character.Position)));
- }
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", graczWHeli.X, graczWHeli.Y, graczWHeli.Z, 10F);
- }
- }
- else
- {
- SpecialCar_CHECK.Start();
- SpecialCar2.Stop();
- }
- }
- private void TimerChallenge(object sender, EventArgs e)
- {
- timerAll = timerAll + 1;
- if (challengeNr1_second.isRunning)
- {
- if ((timerAll % 2) == 0)
- {
- GTA.Native.Function.Call("FIRE_SINGLE_BULLET", -357.69F, Player.Character.Position.Y - 30F, 22.96F, getX + 0.3F, Player.Character.Position.Y, Player.Character.Position.Z + 0.52F, 200);
- }
- getX = Player.Character.Position.X;
- }
- if (challengeNr3.isRunning)
- {
- if(gasnicaPojemnosc<250) gasnicaPojemnosc = (byte)(gasnicaPojemnosc + 5);
- }
- if (challengeRun)
- {
- timerChallenge = timerChallenge - 1;
- if (timerChallenge < 10)
- {
- GTA.Native.Function.Call("PLAY_SOUND_FROM_POSITION", soundID, "F5_TRUCK_ARSON_BOMB_BLEEP", Player.Character.Position.X, Player.Character.Position.Y, Player.Character.Position.Z);
- if (timerChallenge <= 0)
- {
- if (challengeNr3.isRunning) Challenge3_clear();
- if (!(goodCar==null))
- {
- if (goodCar.Exists())
- {
- goodCar.Explode();
- }
- }
- GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("RELEASE_SOUND_ID", soundID);
- ClearAll();
- }
- }
- }
- }
- private void DrawingThings(object sender, GraphicsEventArgs abc)
- {
- abc.Graphics.Scaling = FontScaling.FontSize;
- if (challengeRun == true)
- {
- abc.Graphics.DrawText("TIME:"+timerChallenge, new RectangleF(10, 1,10, 2), TextAlignment.Center, Color.Black, screenFont);
- }
- if (endChallenge == true)
- {
- if (makeScreen == true)
- {
- abc.Graphics.DrawRectangle(10F, 0F,10F, 0.2F, Color.Gold);
- abc.Graphics.DrawText(DateTime.Now.ToString(), new RectangleF(0.5F, 19F, 5F, 2F), TextAlignment.Left, Color.WhiteSmoke, new GTA.Font("Times New Roman", 0.5F, FontScaling.FontSize));
- abc.Graphics.DrawText("Rinepim", new RectangleF(10F, 19F, 5F, 2F), TextAlignment.Center, Color.FromArgb(255,Color.DarkKhaki), new GTA.Font("Times New Roman", 0.5F, FontScaling.FontSize,true,false));
- }
- abc.Graphics.DrawRectangle(new RectangleF(5, 0, 10, 20), Color.FromArgb(smoothEnd, Color.Black));
- //abc.Graphics.DrawText("Rinepim\n Challenge nr 1", new RectangleF(5, 1, 10, 4), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GreenYellow), screenFont);
- abc.Graphics.DrawText("Rinepim", new RectangleF(5, 1, 10, 4), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GreenYellow), screenFont);
- if (challengeNr1_second.isRunning) abc.Graphics.DrawText("\n Challenge nr 1", new RectangleF(5, 1, 10, 4), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GreenYellow), screenFont);
- if (challengeNr2.isRunning) abc.Graphics.DrawText("\n Challenge nr 2", new RectangleF(5, 1, 10, 4), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GreenYellow), screenFont);
- if (challengeNr3.isRunning) abc.Graphics.DrawText("\n Challenge nr 3", new RectangleF(5, 1, 10, 4), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GreenYellow), screenFont);
- abc.Graphics.DrawText("Time challenge: "+timerAll+"sec", new RectangleF(5, 5, 10, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- if (challengeNr1_second.isRunning == true)
- {
- abc.Graphics.DrawRectangle(new RectangleF(13.2F, 7.0F, 0.5F, 0.8F), Color.FromArgb(smoothEnd + 50, Color.DarkGreen));
- abc.Graphics.DrawRectangle(new RectangleF(13.2F, 9.0F, 0.5F, 0.8F), Color.FromArgb(smoothEnd + 50, Color.DarkGreen));
- abc.Graphics.DrawText("Clear loop", new RectangleF(5, 7, 10, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- if (zadanieCheck[0] == true)
- {
- abc.Graphics.DrawText(((char)0x221A).ToString(), new RectangleF(13, 7, 1, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- }
- abc.Graphics.DrawText("Clear slalom", new RectangleF(5, 9, 10, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- if (zadanieCheck[1] == true)
- {
- abc.Graphics.DrawText(((char)0x221A).ToString(), new RectangleF(13, 9, 1, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- }
- }
- if (challengeNr2.isRunning == true)
- {
- abc.Graphics.DrawRectangle(new RectangleF(13.2F, 7.0F, 0.5F, 0.8F), Color.FromArgb(smoothEnd + 50, Color.DarkGreen));
- abc.Graphics.DrawRectangle(new RectangleF(13.2F, 9.0F, 0.5F, 0.8F), Color.FromArgb(smoothEnd + 50, Color.DarkGreen));
- abc.Graphics.DrawText("Nade on roof", new RectangleF(5, 7, 10, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- if (zadanieCheck[2] == true)
- {
- abc.Graphics.DrawText(((char)0x221A).ToString(), new RectangleF(13, 7, 1, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- }
- abc.Graphics.DrawText("All time in vehicle", new RectangleF(5, 9, 10, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- if (zadanieCheck[3] == true)
- {
- abc.Graphics.DrawText(((char)0x221A).ToString(), new RectangleF(13, 9, 1, 1), TextAlignment.Center, Color.FromArgb(smoothEnd * 2 + 5, Color.GhostWhite), resultFont);
- }
- }
- }
- }
- private void Peds_In_City(object sender, EventArgs e)
- {
- if (Player.Character.Position.DistanceTo(miejscaStartPed[0]) <= 1.4F && Player.Character.isInVehicle()==false)
- {
- if (Player.WantedLevel == 0)
- {
- startPed[0].Task.TurnTo(Player.Character);
- if (Game.isGameKeyPressed(GameKey.Action)) Prepare_Challenge1();
- else GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Challenge nr.1 - press " + GameKey.Action.ToString() + " to start.", 15, 1);
- }
- else GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Lose cops!", 15, 1);
- }
- if (Player.Character.Position.DistanceTo(miejscaStartPed[1]) <= 2.4F)
- {
- if (Player.WantedLevel == 0)
- {
- startPed[1].Task.TurnTo(Player.Character);
- if (Game.isGameKeyPressed(GameKey.Action)) Prepare_Challenge2();
- else GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Challenge nr.2 - press " + GameKey.Action.ToString() + " to start.", 15, 1);
- }
- else GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Lose cops!", 15, 1);
- }
- if (Player.Character.Position.DistanceTo(miejscaStartPed[2]) <= 1.4F && Player.Character.isInVehicle() == false)
- {
- if (Player.WantedLevel == 0)
- {
- startPed[2].Task.TurnTo(Player.Character);
- if (Game.isGameKeyPressed(GameKey.Action)) Prepare_Challenge3();
- else GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Challenge nr.3 - press " + GameKey.Action.ToString() + " to start.", 15, 1);
- }
- else GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Lose cops!", 15, 1);
- }
- }
- private void Prepare_Challenge1()
- {
- GTA.Native.Function.Call("HIDE_CHAR_WEAPON_FOR_SCRIPTED_CUTSCENE", Player.Character, true);
- startPed[0].Task.ClearSecondary();
- startPed[0].Task.ClearAllImmediately();
- //drawRedCircle.Visible = false;
- Vector3 spawnpoint = new Vector3(-390.66F, 1180.09F, 14.18F);
- GTA.Native.Function.Call("SET_MISSION_FLAG", true);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- GTA.Native.Function.Call("REQUEST_MODEL", 0x3A196CEA);
- goodCar = World.CreateVehicle(0x3A196CEA, spawnpoint);
- goodCar.Heading = 90F;
- goodCar.Color = ColorIndex.DarkGreenPoly;
- MissionBlip = GTA.Blip.AddBlip(goodCar);
- MissionBlip.Icon = BlipIcon.Misc_Destination2;
- MissionBlip.Scale = 1.0F;
- MissionBlip.ShowOnlyWhenNear = false;
- MissionBlip.Display = BlipDisplay.ArrowAndMap;
- MissionBlip.Name = "Joker Challenge Car";
- //cutsceneNr1.Start();
- Prepare1_Challenge1();
- }
- private void Prepare1_Challenge1()
- {
- prepareRing.Stop();
- SpecialCar_CHECK.Stop();
- Player.CanControlCharacter = true;
- GTA.Native.Function.Call("SETTIMERC", 0);
- do{
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Get into car to start challenge!", 100, 1);
- Game.WaitInCurrentScript(50);
- }while(GTA.Native.Function.Call<int>("TIMERC")<14000 && !(Player.Character.isInVehicle(goodCar)));
- PlayerIsAlive();
- if (Player.Character.isInVehicle(goodCar))
- {
- GTA.Native.Function.Call("REQUEST_MODEL", 0x4071AA4A);
- arrayArrow[0] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-422.95F, 1163.0F, 13.08F));
- arrayArrow[0].Rotation = new Vector3(1.5F, 90F, -90F);
- arrayArrow[1] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-422.95F, 1171.0F, 13.08F));
- arrayArrow[1].Rotation = new Vector3(1.5F, 90F, -90F);
- arrayArrow[2] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-422.95F, 1179.0F, 13.08F));
- arrayArrow[2].Rotation = new Vector3(1.5F, 90F, -90F);
- arrayArrow[0].Collision = false;
- arrayArrow[1].Collision = false;
- arrayArrow[2].Collision = false;
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-454.53F, 945.15F, 9.00F));
- MissionBlip.Scale = 2.0F;
- MissionBlip.RouteActive = true;
- goodCar.EngineRunning = true;
- Zdarzenie(zdarzenieNr = 1);
- cutSceneCam = new Camera();
- cutSceneCam.Position = Player.Character.GetOffsetPosition(new Vector3(6, -5, 1));
- cutSceneCam.FOV = 57;
- cutSceneCam.Heading = 130F;
- cutSceneCam.Activate();
- goodCar.DoorLock = DoorLock.ImpossibleToOpen;
- Player.CanControlCharacter = false;
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "You have only 45 sec to pass track. If time shows 0, BOOM!", 5000, 1);
- Game.WaitInCurrentScript(2000);
- goodCar.PetrolTankHealth = 1000;
- goodCar.EngineHealth = 1000;
- goodCar.Health = 1000;
- goodCar.CloseAllDoors();
- Game.WaitInCurrentScript(3000);
- cutSceneCam.Deactivate();
- Player.CanControlCharacter = true;
- Player.Character.WillFlyThroughWindscreen = false;
- challengeRun = true;
- soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- timerChallenge=45;
- timerDraw.Start();
- }
- else
- {
- goodCar.Explode();
- ClearAll();
- }
- //cutsceneNr1.Stop();
- }
- private void FirstMission_Challenge1(object sender, EventArgs e)
- {
- PlayerIsAlive();
- if (zdarzenieNr == 1)
- {
- arrayArrow[0].Position = arrayArrow[0].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[1].Position = arrayArrow[1].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[2].Position = arrayArrow[2].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- if (arrayArrow[0].Position.Y <= 1155.0F)
- {
- arrayArrow[0].Position = new Vector3(-422.95F, 1179.0F, 14.58F);
- }
- if (arrayArrow[1].Position.Y <= 1155.0F)
- {
- arrayArrow[1].Position = new Vector3(-422.95F, 1179.0F, 14.58F);
- }
- if (arrayArrow[2].Position.Y <= 1155.0F)
- {
- arrayArrow[2].Position = new Vector3(-422.95F, 1179.0F, 14.58F);
- }
- if (goodCar.Position.DistanceTo(new Vector3(-435.21F, 1101.40F, 10F)) < 6F)
- {
- Zdarzenie(zdarzenieNr = 2);
- }
- }
- if (zdarzenieNr == 2)
- {
- arrayArrow[0].Position = arrayArrow[0].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[1].Position = arrayArrow[1].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[2].Position = arrayArrow[2].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- if (arrayArrow[0].Position.X >= -447.0F)
- {
- arrayArrow[0].Position = new Vector3(-462.0F, 925.64F, 11.0F);
- }
- if (arrayArrow[1].Position.X >= -447.0F)
- {
- arrayArrow[1].Position = new Vector3(-462.0F, 925.64F, 11.0F);
- }
- if (arrayArrow[2].Position.X >= -447.0F)
- {
- arrayArrow[2].Position = new Vector3(-462.0F, 925.64F, 11.0F);
- }
- if (goodCar.Position.DistanceTo(new Vector3(-454.53F, 945.15F, 9.00F)) < 6F)
- {
- Zdarzenie(zdarzenieNr = 3); // każe rysować nowy numer zdrzenia + zmienia numer
- }
- }
- if (zdarzenieNr == 3)
- {
- arrayArrow[0].Position = arrayArrow[0].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[1].Position = arrayArrow[1].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[2].Position = arrayArrow[2].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- if (arrayArrow[0].Position.Y >= 940.00F)
- {
- arrayArrow[0].Position = new Vector3(-302.0F, 928.00F, 15.79F);
- }
- if (arrayArrow[1].Position.Y >= 940.00F)
- {
- arrayArrow[1].Position = new Vector3(-302.0F, 928.00F, 15.79F);
- }
- if (arrayArrow[2].Position.Y >= 940.00F)
- {
- arrayArrow[2].Position = new Vector3(-302.0F, 928.00F, 15.79F);
- }
- if (goodCar.Position.DistanceTo(new Vector3(-316.44F, 938.43F, 13.00F)) < 6F)
- {
- Zdarzenie(zdarzenieNr = 4);
- }
- }
- if (zdarzenieNr == 4)
- {
- if (goodCar.Position.DistanceTo(new Vector3(-306.11F, 1039.86F, 9.00F)) < 6F)
- {
- Zdarzenie(zdarzenieNr = 5);
- }
- }
- if (zdarzenieNr == 5)
- {
- arrayArrow[0].Position = arrayArrow[0].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[1].Position = arrayArrow[1].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- arrayArrow[2].Position = arrayArrow[2].GetOffsetPosition(new Vector3(0, 0, 0.1F));
- if (arrayArrow[0].Position.Y >= 1130.29)
- {
- arrayArrow[0].Position = new Vector3(-314.34F,1121.29F,14.41F);
- }
- if (arrayArrow[1].Position.Y >= 1130.29)
- {
- arrayArrow[1].Position = new Vector3(-314.34F, 1121.29F, 14.41F);
- }
- if (arrayArrow[2].Position.Y >= 1130.29)
- {
- arrayArrow[2].Position = new Vector3(-314.34F, 1121.29F, 14.41F);
- }
- if (goodCar.Position.DistanceTo(new Vector3(-376.95F, 1181.22F, 14.00F)) < 6F)
- {
- drawRedCircle.Visible = false;
- challengeRun = false;
- MissionBlip.Delete();
- if (goodCar.PetrolTankHealth == 1000 && goodCar.Health == 1000 && goodCar.EngineHealth == 1000)
- {
- zadanieCheck[0] = true;
- }
- challengeNr1_first.Stop();
- Prepare2_Challenge1();
- }
- }
- }
- private void Zdarzenie(int NumerZdarzenia)
- {
- if (NumerZdarzenia == 1)
- {
- drawRedCircle.Position = new Vector3(-435.21F, 1101.40F, 9.0F);
- drawRedCircle.Diameter = 10F; // średnica koła
- drawRedCircle.Visible = true;
- MissionBlip.Delete();
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-435.21F, 1101.40F, 9.0F));
- //MissionBlip = GTA.Blip.AddBlipContact(Player.Character.Position);
- MissionBlip.Scale = 2.0F;
- challengeNr1_first.Start();
- }
- if (NumerZdarzenia == 2)
- {
- drawRedCircle.Position = new Vector3(-454.53F, 945.15F, 9.00F);
- MissionBlip.Delete();
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-454.53F, 945.15F, 9.00F));
- MissionBlip.Scale = 2.0F;
- MissionBlip.RouteActive = true;
- arrayArrow[0].Delete();
- arrayArrow[1].Delete();
- arrayArrow[2].Delete();
- arrayArrow[0] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-452.0F, 925.64F, 9.58F));
- arrayArrow[0].Rotation = new Vector3(1.5F, 90F, 0F);
- arrayArrow[0].Collision = false;
- arrayArrow[1] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-457.0F, 925.64F, 9.58F));
- arrayArrow[1].Rotation = new Vector3(1.5F, 90F, 0F);
- arrayArrow[1].Collision = false;
- arrayArrow[2] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-462.0F, 925.64F, 9.58F));
- arrayArrow[2].Rotation = new Vector3(1.5F, 90F, 0F);
- arrayArrow[2].Collision = false;
- GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", -361.08F, 845.62F, 14.36F, 15F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", -361.08F, 845.62F, 14.36F, 15F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", -361.08F, 845.62F, 14.36F, 15F);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", -361.08F, 845.62F, 14.36F, 15F);
- crashFlat = World.CreateVehicle(0x50B0215A, new Vector3(-361.08F, 845.62F, 14.36F));//)
- goodGuy = World.CreatePed(0xB2F9C1A1, new Vector3(-361.08F, 845.62F, 19.36F)); //new Vector3(-361.08F,845.62F,17.36F)
- goodGuy.WarpIntoVehicle(crashFlat, VehicleSeat.Driver);
- crashFlat.Heading = 0;
- crashFlat.EngineRunning = true;
- crashFlat.Dirtyness = 3;
- crashFlat.Speed = 30.0F;
- GTA.Native.Function.Call("TASK_CAR_TEMP_ACTION", goodGuy, crashFlat, 9, 15000);
- GTA.Native.Function.Call("SET_DRIVE_TASK_CRUISE_SPEED", goodGuy, 40.0F);
- goodGuy.Task.AlwaysKeepTask = true;
- }
- if (NumerZdarzenia == 3)
- {
- drawRedCircle.Position = new Vector3(-316.44F, 938.43F, 13.00F);
- MissionBlip.Delete();
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-316.44F, 938.43F, 13.00F));
- MissionBlip.Scale = 2.0F;
- MissionBlip.RouteActive = true;
- if (goodGuy.Exists())
- {
- goodGuy.NoLongerNeeded();
- }
- if (!(crashFlat == null))
- {
- if (crashFlat.Exists())
- {
- crashFlat.NoLongerNeeded();
- }
- }
- arrayArrow[0].Delete();
- arrayArrow[1].Delete();
- arrayArrow[2].Delete();
- arrayArrow[0] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-302.0F, 936.0F, 15.09F));
- arrayArrow[0].Rotation = new Vector3(1.5F, 90F, 90F);
- arrayArrow[0].Collision = false;
- arrayArrow[1] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-302.0F, 932F, 15.09F));
- arrayArrow[1].Rotation = new Vector3(1.5F, 90F, 90F);
- arrayArrow[1].Collision = false;
- arrayArrow[2] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-302.0F, 928F, 15.09F));
- arrayArrow[2].Rotation = new Vector3(1.5F, 90F, 90F);
- arrayArrow[2].Collision = false;
- }
- if (NumerZdarzenia == 4)
- {
- arrayArrow[0].Delete();
- arrayArrow[1].Delete();
- arrayArrow[2].Delete();
- drawRedCircle.Position = new Vector3(-306.11F, 1039.86F, 9.00F);
- MissionBlip.Delete();
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-306.11F, 1039.86F, 9.00F));
- MissionBlip.Scale = 2.0F;
- }
- if (NumerZdarzenia == 5)
- {
- drawRedCircle.Position = new Vector3(-376.95F, 1181.22F, 14.00F);
- MissionBlip.Delete();
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-376.95F, 1181.22F, 14.00F));
- MissionBlip.Scale = 2.0F;
- arrayArrow[0] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-320.34F, 1127.29F, 12.71F));
- arrayArrow[0].Rotation = new Vector3(1.5F, 90F, 145F);
- arrayArrow[0].Collision = false;
- arrayArrow[1] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-317.34F, 1124.29F, 12.71F));
- arrayArrow[1].Rotation = new Vector3(1.5F, 90F, 145F);
- arrayArrow[1].Collision = false;
- arrayArrow[2] = World.CreateObject(new Model(0x4071AA4A), new Vector3(-314.34F, 1121.29F, 12.71F));
- arrayArrow[2].Rotation = new Vector3(1.5F, 90F, 145F);
- arrayArrow[2].Collision = false;
- }
- if (NumerZdarzenia == 6)
- {
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-360.00F, 621F, 14.77F));
- MissionBlip.Icon = BlipIcon.Misc_Objective5;
- MissionBlip.Scale = 1.0F;
- MissionBlip.ShowOnlyWhenNear = false;
- MissionBlip.Display = BlipDisplay.MapOnly;
- MissionBlip.Name = "First icecone nearly";
- lodzikCh2 = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-340.04F, 640.93F, 16.48F));
- lodzikCh2.FreezePosition = true;
- zadanieCheck[3] = true;
- }
- if (NumerZdarzenia == 7)
- {
- MissionBlip.Delete();
- timerChallenge = timerChallenge + 30;
- // DRUGI:
- // trzeci GTA.Object lodzik = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-70.44F, 1241.32F, 20.97F));
- // czwarty LAST :GTA.Object lodzik = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-503.9102F, 1467.0360F, 21.660F));
- // zmiana blipa + spawnu obiektu
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-49.4134F, 621.1909F, 14.7134F));
- MissionBlip.Icon = BlipIcon.Misc_Objective5;
- MissionBlip.Scale = 1.0F;
- MissionBlip.ShowOnlyWhenNear = false;
- MissionBlip.Display = BlipDisplay.MapOnly;
- MissionBlip.Name = "First icecone nearly";
- //lodzikCh2 = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-340.04F, 640.93F, 16.48F));
- lodzikCh2 = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-35.58F, 606.64F, 14.46F));
- lodzikCh2.FreezePosition = true;
- }
- if (NumerZdarzenia == 8)
- {
- MissionBlip.Delete();
- timerChallenge = timerChallenge + 30;
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-49.6953F, 1252.4010F, 20.0150F));
- MissionBlip.Icon = BlipIcon.Misc_Objective5;
- MissionBlip.Scale = 1.0F;
- MissionBlip.ShowOnlyWhenNear = false;
- MissionBlip.Display = BlipDisplay.MapOnly;
- MissionBlip.Name = "First icecone nearly";
- lodzikCh2 = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-70.44F, 1241.32F, 20.97F));
- lodzikCh2.FreezePosition = true;
- }
- if (NumerZdarzenia == 9)
- {
- MissionBlip.Delete();
- timerChallenge = timerChallenge + 30;
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-501.2669F, 1485.2340F, 18.2470F));
- MissionBlip.Icon = BlipIcon.Misc_Objective5;
- MissionBlip.Scale = 1.0F;
- MissionBlip.ShowOnlyWhenNear = false;
- MissionBlip.Display = BlipDisplay.MapOnly;
- MissionBlip.Name = "First icecone nearly";
- lodzikCh2 = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-503.9102F, 1467.0360F, 21.660F));
- lodzikCh2.FreezePosition = true;
- }
- if (NumerZdarzenia == 10)
- {
- if (Player.Character.Weapons.Current == Weapon.Thrown_Grenade) zadanieCheck[2] = true;
- else zadanieCheck[2] = false;
- challengeRun=false;
- endChallenge = true;
- timerDraw.Stop();
- GTA.Native.Function.Call("TRIGGER_MISSION_COMPLETE_AUDIO", 1);
- endOfAll(1);
- // tutaj koniec, zatrzymanie timera, clearAll
- }
- }
- private void Prepare2_Challenge1()
- {
- cutSceneCam = new Camera();
- cutSceneCam.Position = new Vector3(-364.00F,Player.Character.Position.Y+10,Player.Character.Position.Z+5);
- cutSceneCam.FOV = 45F;
- cutSceneCam.Heading = 180F;
- Player.CanControlCharacter = false;
- cutSceneCam.Activate();
- arrayArrow[0].NoLongerNeeded();
- arrayArrow[0].Delete();
- arrayArrow[1].NoLongerNeeded();
- arrayArrow[1].Delete();
- arrayArrow[2].NoLongerNeeded();
- arrayArrow[2].Delete();
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Now, go along this street and miss sniper shoots. Do not leave this way if You want life.", 10000, 1);
- drawRedCircle.Visible = true;
- drawRedCircle.Position = new Vector3(-362.01F, 22.96F, 14.00F);
- MissionBlip = GTA.Blip.AddBlip(new Vector3(-362.01F, 22.96F, 14.00F));
- MissionBlip.RouteActive = true;
- Game.WaitInCurrentScript(5000);
- PlayerIsAlive();
- cutSceneCam.Position = Player.Character.GetOffsetPosition(new Vector3(-1.5F,3F,0F));
- cutSceneCam.Heading = (Player.Character.Heading-150);
- cutSceneCam.FOV = 40F;
- Game.WaitInCurrentScript(500);
- goodCar.BurstTire(VehicleWheel.FrontLeft);
- soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- GTA.Native.Function.Call("PLAY_SOUND_FROM_VEHICLE", soundID, "FLAT_TYRE_BLOWOUT", goodCar);
- goodCar.BurstTire(VehicleWheel.FrontRight);
- goodCar.BurstTire(VehicleWheel.RearLeft);
- goodCar.BurstTire(VehicleWheel.RearRight);
- Game.WaitInCurrentScript(3500);
- GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("RELEASE_SOUND_ID", soundID);
- cutSceneCam.Deactivate();
- Player.CanControlCharacter = true;
- challengeNr1_second.Start();
- daneAuta[0] = goodCar.PetrolTankHealth;
- daneAuta[1] = goodCar.Health;
- daneAuta[2] = goodCar.EngineHealth;
- Game.WaitInCurrentScript(3000);
- timerAll = timerAll + 12;
- }
- #region Sniper Alley
- private void SecondMission_Challenge1(object sender, EventArgs e)
- {
- if (!(goodCar.isAlive))
- {
- ClearAll();
- }
- PlayerIsAlive();
- if (!(Player.Character.isInArea(corner1_challenge1, corner2_challenge1, true)))
- {
- goodCar.Explode();
- ClearAll();
- }
- if (goodCar.Position.DistanceTo(new Vector3(-362.01F, 22.96F, 14.00F)) < 6.0F)
- {
- endChallenge = true;
- goodCar.DoorLock = DoorLock.None;
- if ((goodCar.PetrolTankHealth == daneAuta[0]) && (goodCar.Health == daneAuta[1]) && (goodCar.EngineHealth == daneAuta[2]))
- {
- zadanieCheck[1] = true;
- }
- drawRedCircle.Visible = false;
- GTA.Native.Function.Call("TRIGGER_MISSION_COMPLETE_AUDIO", 1);
- endOfAll(0);
- }
- }
- #endregion
- public void Prepare_Challenge2()
- {
- prepareRing.Stop();
- SpecialCar_CHECK.Stop();
- GTA.Native.Function.Call("HIDE_CHAR_WEAPON_FOR_SCRIPTED_CUTSCENE", Player.Character, true);
- startPed[1].Task.ClearSecondary();
- startPed[1].Task.ClearAllImmediately();
- Player.CanControlCharacter = false;
- //drawRedCircle.Visible = false;
- //Vector3 spawnpoint = new Vector3(-390.66F, 1180.09F, 14.18F);
- GTA.Native.Function.Call("SET_MISSION_FLAG", true);
- GTA.Object lodzikCutscene = World.CreateObject(Model.FromString("amb_icecone01"), new Vector3(-388.1567F, 614.7545F, 14.8061F));
- lodzikCutscene.FreezePosition = true;
- cutSceneCam = new Camera();
- cutSceneCam.Position = new Vector3(-385.70F, 613.16F, 16F);
- cutSceneCam.Heading = 30F;
- cutSceneCam.LookAt(lodzikCutscene.Position);
- cutSceneCam.FOV = 40F;
- cutSceneCam.Activate();
- Game.WaitInCurrentScript(10);
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Find ice cones hidden in city and destroy them!", 5000, 1);
- Game.WaitInCurrentScript(2000);
- int myPtfx = GTA.Native.Function.Call<int>("START_PTFX", "dest_food_debris", lodzikCutscene.Position.X+0.1F, lodzikCutscene.Position.Y, lodzikCutscene.Position.Z, 0, 0, 0, 1.0);
- lodzikCutscene.NoLongerNeeded();
- lodzikCutscene.Delete();
- Game.WaitInCurrentScript(2000);
- cutSceneCam.Deactivate();
- Player.CanControlCharacter = true;
- //GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- //GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- //GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- //GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", spawnpoint.X, spawnpoint.Y, spawnpoint.Z, 8F);
- //goodCar = World.CreateVehicle(0x3A196CEA, spawnpoint);
- //goodCar.Heading = 90F;
- //goodCar.Color = ColorIndex.DarkGreenPoly;
- //MissionBlip = GTA.Blip.AddBlip(goodCar);
- Zdarzenie(6);
- GTA.Native.Function.Call("STOP_PTFX", myPtfx);
- GTA.Native.Function.Call("REMOVE_PTFX", myPtfx);
- timerChallenge = 60;
- challengeRun = true;
- challengeNr2.Start();
- timerDraw.Start();
- //cutsceneNr1.Start();
- //CutScene1_Challenge1();
- }
- private void FirstMission_Challenge2(object sender, EventArgs e)
- {
- PlayerIsAlive();
- if (!(Player.Character.isInVehicle())) zadanieCheck[3] = false;
- if (GTA.Native.Function.Call<bool>("HAS_OBJECT_BEEN_DAMAGED_BY_CHAR", lodzikCh2, Player.Character))
- {
- GTA.Native.Function.Call<int>("START_PTFX", "dest_food_debris", lodzikCh2.Position.X + 0.1F, lodzikCh2.Position.Y, lodzikCh2.Position.Z, 0, 0, 0, 1.0);
- lodzikCh2.NoLongerNeeded();
- lodzikCh2.Delete();
- //GTA.Native.Function.Call("STOP_PTFX", myPtfx);
- //GTA.Native.Function.Call("REMOVE_PTFX", myPtfx);
- ileLodowDel = (byte)(ileLodowDel + 1);
- if(ileLodowDel==1) Zdarzenie(7);
- if (ileLodowDel == 2) Zdarzenie(8);
- if (ileLodowDel == 3) Zdarzenie(9);
- if (ileLodowDel == 4) Zdarzenie(10);
- }
- }
- private void Prepare_Challenge3()
- {
- prepareRing.Stop();
- SpecialCar_CHECK.Stop();
- startPed[2].Task.ClearSecondary();
- startPed[2].Task.ClearAllImmediately();
- Player.CanControlCharacter = false;
- //drawRedCircle.Visible = false;
- //Vector3 spawnpoint = new Vector3(-390.66F, 1180.09F, 14.18F);
- GTA.Native.Function.Call("SET_MISSION_FLAG", true);
- GTA.Native.Function.Call("SET_STATE_OF_CLOSEST_DOOR_OF_TYPE", new Model(0xb7bda30e), -528.0F, 1262.0F, 18.0F, 0, 0.0F);
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Get up fire extinguisher and extinguish fire!", 5000, 1);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CARS", -537.7730F, 1260.8560F, 16.5451F, 15F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_CHARS", -537.7730F, 1260.8560F, 16.5451F, 15F);
- GTA.Native.Function.Call("CLEAR_AREA_OF_OBJECTS", -537.7730F, 1260.8560F, 16.5451F, 15F);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", -537.7730F, 1260.8560F, 16.5451F, 15F);
- GTA.Native.Function.Call("REQUEST_MODEL", 0x145D8395);
- gasnica = World.CreateObject(0x145D8395, new Vector3(-537.7730F, 1260.8560F, 16.5451F));
- //GTA.Native.Function.Call("CLEAR_ROOM_FOR_OBJECT",gasnica);
- //GTA.Native.Function.Call("SET_OBJECT_VISIBLE",gasnica,true);
- gasnica.CurrentRoom = Room.FromString("R_ADFEDDD7_00013104");
- gasnica.FreezePosition = true;
- cutSceneCam = new Camera();
- cutSceneCam.FOV = 50F;
- cutSceneCam.LookAt(gasnica);
- cutSceneCam.Position = gasnica.GetOffsetPosition(new Vector3(1F,-4F,1.5F));
- cutSceneCam.Activate();
- Game.WaitInCurrentScript(3000);
- Player.CanControlCharacter = true;
- cutSceneCam.Deactivate();
- GTA.Native.Function.Call("SETTIMERC", 0);
- do{
- Game.WaitInCurrentScript(1);
- if (Player.Character.Position.DistanceTo(new Vector3(-537.7730F, 1260.8560F, 17.5451F)) < 1.0F)
- {
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Press " + GameKey.Action + " to pick up extinguisher!", 20, 1);
- if (Game.isGameKeyPressed(GameKey.Action))
- {
- Player.Character.Task.TurnTo(gasnica.Position);
- Game.WaitInCurrentScript(600);
- string animacja = "swing_idle";
- AnimationSet grupa_anim = new AnimationSet("amb@baseball");
- string animacja2 = "use_vendmac";
- AnimationSet grupa_anim2 = new AnimationSet("amb@arcade");
- soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim.Name);
- GTA.Native.Function.Call("REQUEST_ANIMS", grupa_anim2.Name);
- Player.Character.FreezePosition = true;
- Player.CanControlCharacter = false;
- Player.Character.Animation.Play(grupa_anim2, animacja2, 1.0F);
- Game.WaitInCurrentScript(100);
- gasnica.FreezePosition = false;
- GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", Player.Character, grupa_anim2.Name, animacja2, 0.60F);
- Player.Character.Animation.Play(grupa_anim, animacja, 1.0F, AnimationFlags.Unknown06 | AnimationFlags.Unknown09 | AnimationFlags.Unknown11 | AnimationFlags.Unknown12);
- //GTA.Native.Function.Call("TASK_PLAY_ANIM_SECONDARY_UPPER_BODY", Player.Character, animacja, grupa_anim.Name, 0.9F, 0, 0, 0, 1, 0);
- Game.WaitInCurrentScript(100);
- GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", Player.Character, grupa_anim.Name, animacja, 0.90F);
- Game.WaitInCurrentScript(400);
- GTA.Native.Function.Call("BLOCK_CHAR_VISEME_ANIMS", Player.Character, true);
- GTA.Native.Function.Call("BLOCK_CHAR_AMBIENT_ANIMS", Player.Character, true);
- GTA.Native.Function.Call("HIDE_CHAR_WEAPON_FOR_SCRIPTED_CUTSCENE", Player.Character, true);
- GTA.Native.Function.Call("BLOCK_PED_WEAPON_SWITCHING", Player.Character, true);
- GTA.Native.Function.Call("SET_BLOCKING_OF_NON_TEMPORARY_EVENTS", Player.Character, true);
- soundID = GTA.Native.Function.Call<int>("GET_SOUND_ID");
- //obiekt jakiś aby zablokować pójście gdy zostawi ogien na dole... Hmmm?
- //GTA.Native.Function.Call("IS_PED_IN_CUTSCENE_BLOCKING_BOUNDS",Player.Character);
- gasnica.AttachToPed(Player.Character, Bone.LeftHand, new Vector3(0F, 0.02F, 0.63F), new Vector3(3.15F, 0.0F, -1.65F));
- Player.Character.FreezePosition = false;
- Player.CanControlCharacter = true;
- plomien[0] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -542.1921F, 1256.6660F, 20.5448F, 2, 5);
- plomien[1] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -539.4823F, 1267.0840F, 24.5453F, 2, 5);
- plomien[2] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[3] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -538.0640F, 1257.7440F, 33.7715F, 2, 5);
- //aaaaa
- /*
- plomien[4] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[5] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[6] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[7] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[8] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[9] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[10] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[11] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[12] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[13] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[14] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[15] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[16] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[17] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[18] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[19] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[20] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[21] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[22] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[23] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[24] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[25] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[26] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[27] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[28] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- plomien[29] = GTA.Native.Function.Call<int>("START_SCRIPT_FIRE", -549.7076F, 1252.3270F, 29.5411F, 2, 5);
- * */
- GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Press " + GameKey.Action + " to use !", 20, 1);
- // TUTAJ OGNIE, tabelka 30 wymiarowa
- break;
- }
- }
- }while(GTA.Native.Function.Call<int>("TIMERC")<20000);
- if (!(GTA.Native.Function.Call<Ped>("GET_PED_OBJECT_IS_ATTACHED_TO", gasnica) == Player.Character))
- {
- gasnica.FreezePosition = false;
- Challenge3_clear();
- ClearAll();
- }
- else
- {
- timerChallenge = 60;
- challengeRun = true;
- timerDraw.Start();
- challengeNr3.Start();
- }
- //GTA.Native.Function.Call("SET_STATE_OF_CLOSEST_DOOR_OF_TYPE", new Model(0xb7bda30e), -528.0F, 1262.0F, 18.0F, 1, 0.0F);
- }
- private void FirstMission_Challenge3(object sender, EventArgs e)
- {
- byte control = 0;
- if (Game.isGameKeyPressed(GameKey.Action))
- {
- if (it_WLACZONY)
- {
- it_WLACZONY = false;
- GTA.Native.Function.Call("STOP_SOUND", soundID); // spr dzwiek czy nie koliduje z pipkiem od 10 sec
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr2);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr2);
- Game.WaitInCurrentScript(100);
- }
- else
- {
- if (gasnicaPojemnosc > 5)
- {
- GTA.Native.Function.Call("PLAY_SOUND_FROM_OBJECT", soundID, "BULLET_SPRAY_LOOP", gasnica);
- PTFX_nr1 = GTA.Native.Function.Call<int>("START_PTFX_ON_OBJ", "water_carwash_jets", gasnica, 0.15F, 0F, 0.66F, Player.Character.Direction.X + 90F, Player.Character.Direction.Y + 110F, Player.Character.Direction.Z, 1.0F);
- PTFX_nr2 = GTA.Native.Function.Call<int>("START_PTFX_ON_OBJ", "water_carwash_jets", gasnica, 0.16F, 0F, 0.66F, Player.Character.Direction.X + 90F, Player.Character.Direction.Y + 110F, Player.Character.Direction.Z, 1.0F);
- it_WLACZONY = true;
- }
- }
- }
- if (it_WLACZONY)
- {
- Game.Console.Print("GESTOSC: " + gasnicaPojemnosc);
- if (gasnicaPojemnosc <= 5)
- {
- it_WLACZONY = false;
- GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr2);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr2);
- }
- if (gasnicaPojemnosc > 5)
- {
- Vector3 Gaszenie = Player.Character.GetOffsetPosition(new Vector3(0, 1.0F, -0.5F));
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", Gaszenie.X, Gaszenie.Y, Gaszenie.Z, 1.0F);
- gasnicaPojemnosc = (byte)(gasnicaPojemnosc - 5);
- }
- }
- Game.WaitInCurrentScript(100);
- if (GTA.Native.Function.Call<bool>("IS_SCRIPT_FIRE_EXTINGUISHED", plomien[0]) && zgaszony[0] == false)
- {
- if (GTA.Native.Function.Call<int>("GET_NUMBER_OF_FIRES_IN_RANGE", -542.1921F, 1256.6660F, 20.5448F, 5.0F) == 0)
- {
- zgaszony[0] = true;
- control = (byte)(control + 1);
- timerChallenge = timerChallenge + 60;
- }
- }
- //if (GTA.Native.Function.Call<bool>("IS_SCRIPT_FIRE_EXTINGUISHED", plomien[29]) && zgaszony[29] == false)
- if (GTA.Native.Function.Call<bool>("IS_SCRIPT_FIRE_EXTINGUISHED", plomien[3]) && zgaszony[3] == false)
- {
- // tutaj sprawdzenie czy na pewno zgasil
- // petla for dla poprzednich ogni
- if (GTA.Native.Function.Call<int>("GET_NUMBER_OF_FIRES_IN_RANGE", -538.0640F, 1257.7440F, 33.7715F, 5.0F) == 0) // ostatni ogien
- {
- zgaszony[1] = true;
- control = (byte)(control + 1);
- Zdarzenie(11);
- Challenge3_clear();
- timerDraw.Stop();
- challengeRun = false;
- endChallenge = true;
- GTA.Native.Function.Call("TRIGGER_MISSION_COMPLETE_AUDIO", 1);
- endOfAll(2);
- return;
- }
- /// Zabezpieczenie anty cheat:
- /// jak suma kontrolna wiecej niz 1 to jest cheater
- /// jak ostatni ogien zgasi nie bedac w poblizu = dodaj do sumy kontrolnej i tez wykryje cheatera
- }
- if (control > 1)
- {
- Game.Console.Print("Ups, You used bug of ScriptHook or cheated. Challenge failed.");
- Challenge3_clear();
- ClearAll();
- }
- }
- private void Challenge3_clear()
- {
- GTA.Native.Function.Call("STOP_SOUND", soundID);
- GTA.Native.Function.Call("RELEASE_SOUND_ID", soundID);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr1);
- GTA.Native.Function.Call("STOP_PTFX", PTFX_nr2);
- GTA.Native.Function.Call("REMOVE_PTFX", PTFX_nr2);
- gasnica.Detach();
- gasnica.NoLongerNeeded();
- Player.Character.Task.ClearAll();
- Player.Character.Task.ClearSecondary();
- GTA.Native.Function.Call("BLOCK_CHAR_AMBIENT_ANIMS", Player.Character, false);
- GTA.Native.Function.Call("BLOCK_CHAR_VISEME_ANIMS", Player.Character, false);
- GTA.Native.Function.Call("BLOCK_PED_WEAPON_SWITCHING", Player.Character, false);
- GTA.Native.Function.Call("SET_BLOCKING_OF_NON_TEMPORARY_EVENTS", Player.Character, false);
- for (int numerOgnia = 0; numerOgnia < 30; numerOgnia++)
- {
- if (GTA.Native.Function.Call<bool>("DOES_SCRIPT_FIRE_EXIST", plomien[numerOgnia]))
- {
- GTA.Native.Function.Call("REMOVE_SCRIPT_FIRE",plomien[numerOgnia]);
- GTA.Native.Function.Call("EXTINGUISH_FIRE_AT_POINT", -537.7730F, 1260.8560F, 16.5451F, 3F);
- // lista 30 ognisk i wyczyscic to
- }
- zgaszony[numerOgnia] = false;
- }
- }
- private void endOfAll(int numerNadpisu)
- {
- NadpisanieCodes(numerNadpisu);
- //specialCars[numerNadpisu]
- if(!(MissionBlip==null)) if(MissionBlip.Exists()) MissionBlip.Delete();
- MissionBlip = GTA.Blip.AddBlip(specialCars[numerNadpisu]);
- MissionBlip.Display = BlipDisplay.ArrowAndMap;
- MissionBlip.Color = BlipColor.White;
- MissionBlip.Icon = BlipIcon.Person_Unknown;
- MissionBlip.Scale = 2.2F;
- GTA.Native.Function.Call("FLASH_BLIP_ALT",MissionBlip, true);
- do
- {
- smoothEnd = (byte)(smoothEnd+1);
- Game.WaitInCurrentScript(2);
- } while (smoothEnd <= 124);
- Game.WaitInCurrentScript(100);
- using (Bitmap bmpScreenCapture = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height))
- {
- using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmpScreenCapture))
- {
- makeScreen = true;
- if (!(System.IO.Directory.Exists(Game.InstallFolder + "//scripts/RinepimChallenge/")))
- {
- System.IO.Directory.CreateDirectory(Game.InstallFolder + "//scripts/RinepimChallenge");
- }
- Game.WaitInCurrentScript(25);
- string dataToday = string.Format("{0:yyyy-MM-dd_HH-mm}.jpg", DateTime.Now);
- Bitmap printscreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
- System.Drawing.Graphics graphicScreen = System.Drawing.Graphics.FromImage(printscreen as Image);
- graphicScreen.CopyFromScreen(0, 0, 0, 0, printscreen.Size);
- printscreen.Save(Game.InstallFolder + "//scripts/RinepimChallenge/Challenge1_" + dataToday, System.Drawing.Imaging.ImageFormat.Jpeg);
- makeScreen = false;
- Game.WaitInCurrentScript(4000);
- do
- {
- smoothEnd = (byte)(smoothEnd -1);
- Game.WaitInCurrentScript(2);
- } while (smoothEnd >= 1);
- endChallenge = false;
- ClearAll();
- }
- }
- }
- private void ClearAll()
- {
- if (!(lodzikCh2 == null))
- {
- if (lodzikCh2.Exists())
- {
- lodzikCh2.NoLongerNeeded();
- lodzikCh2.Delete();
- }
- }
- if (!(arrayArrow[0] == null))
- {
- arrayArrow[0].NoLongerNeeded();
- arrayArrow[0].Delete();
- }
- if (!(arrayArrow[1] == null))
- {
- arrayArrow[1].NoLongerNeeded();
- arrayArrow[1].Delete();
- }
- if (!(arrayArrow[2] == null))
- {
- arrayArrow[2].NoLongerNeeded();
- arrayArrow[2].Delete();
- }
- Player.Character.WillFlyThroughWindscreen = true;
- if (!(goodCar == null))
- {
- if (goodCar.Exists())
- {
- goodCar.DoorLock = DoorLock.None;
- goodCar.NoLongerNeeded();
- }
- }
- if (!(goodGuy == null))
- {
- if (goodGuy.Exists())
- {
- goodGuy.NoLongerNeeded();
- goodGuy.Delete();
- }
- }
- for (int myNumber = 0; myNumber <= 2; myNumber++)
- {
- if (!(startPed[myNumber] == null))
- {
- startPed[myNumber].Task.PlayAnimation(new AnimationSet("missroman6"), "partial_wave_a", 1.0F, AnimationFlags.Unknown11 | AnimationFlags.Unknown05 | AnimationFlags.Unknown09);
- //GTA.Native.Function.Call("SET_CHAR_KEEP_TASK", startPed[0], true);
- }
- }
- startPed[0].Heading = 220F;
- startPed[1].Heading = 264.72F;
- startPed[2].Heading = 292.31F;
- for (int myNumber = 0; myNumber <= 1; myNumber++)
- {
- zadanieCheck[myNumber] = false;
- }
- if (!(crashFlat == null))
- {
- if (crashFlat.Exists())
- {
- crashFlat.NoLongerNeeded();
- }
- }
- if (!(MissionBlip == null))
- {
- if (MissionBlip.Exists())
- {
- MissionBlip.Delete();
- }
- }
- drawRedCircle.Visible = false;
- challengeRun = false;
- if (!(cutSceneCam == null))
- {
- if (cutSceneCam.Exists())
- {
- cutSceneCam.FOV = 15;
- }
- }
- timerChallenge = 0;
- gasnicaPojemnosc = 255;
- timerAll = 0;
- ileLodowDel = 0;
- prepareRing.Start();
- timerDraw.Stop();
- //cutsceneNr1.Stop();
- challengeNr2.Stop();
- challengeNr3.Stop();
- challengeNr1_first.Stop();
- challengeNr1_second.Stop();
- SpecialCar_CHECK.Start();
- GTA.Native.Function.Call("SET_MISSION_FLAG", false);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement