Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: C#  |  size: 8.45 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Windows.Forms;
  3. using GTA;
  4.  
  5. //animation flag 09 changes animation from backwars sex to standing up bj
  6.  
  7. public class StalkerMod : Script
  8. {
  9.     Ped malePed = null; //male
  10.     Ped femalePed = null; //female
  11.     //AnimationStuff
  12.     AnimationSet anims = new AnimationSet("amb@service_idles_a");
  13.     AnimationSet anims1 = new AnimationSet("amb@payphone");
  14.     AnimationSet anims2 = new AnimationSet("misscar_sex");
  15.      AnimationFlags animflags = AnimationFlags.Unknown11 | AnimationFlags.Unknown01 | AnimationFlags.Unknown09;
  16.      AnimationFlags animflags1 = AnimationFlags.Unknown12 | AnimationFlags.Unknown11 | AnimationFlags.Unknown09;
  17.     Blip maleBlip;
  18.     Blip femaleBlip;
  19.  
  20.     int RandomNum(int min, int max)
  21.     {
  22.         return new Random().Next(min, max + 1);
  23.     }
  24.     Blip CreateBlip(Ped target, BlipIcon icon, string name)
  25.     {
  26.         Blip blip = target.AttachBlip();
  27.         blip.Icon = icon;
  28.         blip.Name = name;
  29.         return blip;
  30.     }
  31.  
  32.     public StalkerMod()
  33.     {
  34.  
  35.         this.Tick += new EventHandler(this.Stalk_Tick);
  36.     }
  37.  
  38.     private void Stalk_Tick(object sender, EventArgs e)
  39.     {
  40.         if (!Game.Exists(malePed) || !Game.Exists(femalePed) && RandomNum(1, 100) <= 30)
  41.         {
  42.             foreach (Ped ped in World.GetPeds(Player.Character.Position, 20.0f))
  43.             {
  44.                 if (ped == Player.Character || ped.isSittingInVehicle() || !ped.isAliveAndWell)
  45.                 {
  46.                     continue;
  47.                 }
  48.  
  49.                 if (ped.Gender == Gender.Male && !Game.Exists(malePed))
  50.                 {
  51.                     malePed = ped; SetupPed(malePed);
  52.                     maleBlip = CreateBlip(malePed, BlipIcon.Person_Male, "Stalker");
  53.                     continue;
  54.                 } //save a male to PED then move on to next ped in array
  55.  
  56.                 if (ped.Gender == Gender.Female && !Game.Exists(femalePed))
  57.                 {
  58.                     femalePed = ped; SetupPed(femalePed);
  59.                     femaleBlip = CreateBlip(femalePed, BlipIcon.Person_Female, "Victim");
  60.                     continue;
  61.                 } //save a female to PED1 then move on to next ped in array
  62.  
  63.                 if (Game.Exists(malePed) && Game.Exists(femalePed))
  64.                 {
  65.                     break;
  66.                 } // once u got both peds exit this loop
  67.             }
  68.         }
  69.      
  70.         if (Game.Exists(malePed) && Game.Exists(femalePed))
  71.         {
  72.                        
  73.             if (femalePed.Position.DistanceTo(malePed.Position) > .8f && femalePed.isAlive)
  74.             {
  75.                DeleteBlipSafely(femaleBlip);
  76.                
  77.                 malePed.Task.RunTo(femalePed.Position);
  78.                 Wait(10000);
  79.             }
  80.             else
  81.             {
  82.                 if (Game.Exists(malePed) && Game.Exists(femalePed) && femalePed.Position.DistanceTo(malePed.Position) < .8f && femalePed.isAlive)
  83.                 {
  84.                     GTA.Native.Function.Call("ON_FIRE_SCREAM", femalePed);
  85.                     malePed.CanSwitchWeapons = true;
  86.                     malePed.Weapons.Knife.Ammo = 1;
  87.                     malePed.Task.SwapWeapon(Weapon.Melee_Knife);
  88.                     malePed.Weapons.Knife.Select();
  89.                    // Game.DisplayText("STALKER!");
  90.                     DeleteBlipSafely(femaleBlip);
  91.                    
  92.                     femalePed.Money = 400;
  93.                     malePed.Task.TurnTo(femalePed);
  94.                     Wait(1000);
  95.                     femalePed.Task.TurnTo(malePed);
  96.                     Wait(1000);
  97.                     femalePed.Task.GoTo(malePed);
  98.                     Wait(1000);
  99.                     femalePed.Task.HandsUp(1500);
  100.                     femalePed.Task.PlayAnimation(new AnimationSet("amb@payphone"), "duck_cower", 5.0f, animflags1);
  101.                     malePed.Task.TurnTo(femalePed);
  102.                     Rape();
  103.                     Wait(1000);
  104.                     malePed.Task.StandStill(1500);
  105.                     GTA.Native.Function.Call("UNLOCK_RAGDOLL", femalePed, 0);
  106.                     GTA.Native.Function.Call("ON_FIRE_SCREAM", femalePed);
  107.                     counter_right_3();
  108.                     Wait(50); //Wait(5000);
  109.                     counter_right_3();
  110.                     GTA.Native.Function.Call("EXPLODE_CHAR_HEAD", femalePed);
  111.                     femalePed.Task.Die();
  112.                        
  113.                     malePed.Task.TurnTo(femalePed);
  114.                     Wait(1000);
  115.                     malePed.Task.GoTo(femalePed);
  116.                     Wait(5000);
  117.                     malePed.Task.ClearAll();
  118.                  
  119.                     Wait(1000);
  120.                                  
  121.                     malePed.Task.ClearAll();
  122.                 malePed.Task.WanderAround();
  123.                
  124.                     Wait(20000);
  125.  
  126.                     if (Game.Exists(femalePed))
  127.                     {
  128.                         femalePed.Delete();
  129.                     }
  130.                
  131.                 }
  132.  
  133.             }
  134.             }
  135.         else
  136.         {
  137.             if (Game.Exists(malePed))
  138.             {
  139.                 malePed.NoLongerNeeded();
  140.                 malePed = null;
  141.             }
  142.             if (Game.Exists(femalePed) && Game.Exists(femalePed))
  143.             {
  144.                 femalePed.NoLongerNeeded();
  145.                 femalePed = null;
  146.             }
  147.         }
  148.    
  149.     }
  150.      private static void DeleteBlipSafely(Blip blip)
  151.         {
  152.             if (Game.Exists(blip))
  153.             {
  154.                 blip.Delete();
  155.             }
  156.         }
  157.  
  158.  
  159.      private void Rape()
  160.      {
  161.          GTA.Native.Function.Call("ON_FIRE_SCREAM", femalePed);
  162.          malePed.Task.GoTo(femalePed);
  163.          Wait(1000);
  164.          malePed.Task.TurnTo(femalePed);
  165.          Wait(1000);
  166.          femalePed.Task.TurnTo(malePed);
  167.          Wait(1000);
  168.      
  169.          femalePed.GetOffsetPosition(new Vector3(0.5f, 1.2f, 0.0f));
  170.                  GTA.Native.Function.Call("WARP_CHAR_FROM_CAR_TO_COORD", femalePed, femalePed.Position.X, femalePed.Position.Y, femalePed.Position.Z - 1.30f);
  171.          femalePed.GetOffsetPosition(new Vector3(0.5f, 1.2f, 0.0f));
  172.          femalePed.FreezePosition = true;
  173.          Wait(0);
  174.          femalePed.Task.PlayAnimation(new AnimationSet("misscar_sex"), "f_sex_loop", 5.0f, animflags);
  175.    
  176.     malePed.Task.ClearAll();
  177.          malePed.Task.PlayAnimation(new AnimationSet("missjacob2"), "piss_loop", 5.0f, animflags);
  178.     Wait(50);
  179.          if (GTA.Native.Function.Call<bool>("IS_CHAR_PLAYING_ANIM", femalePed, "misscar_sex", "f_sex_loop"))
  180.     {
  181.    
  182.         femalePed.Task.TurnTo(malePed);
  183.              Wait(50);
  184.          
  185.              malePed.Task.GoTo(femalePed);
  186.              GTA.Native.Function.Call("SET_CHAR_COLLISION", femalePed, 0);
  187.        malePed.GetOffsetPosition(new Vector3(-.5f, -2.0f, 0.0f));
  188.      
  189.        femalePed.Task.TurnTo(malePed);
  190.              Wait(10000);
  191.              femalePed.Task.TurnTo(malePed);
  192.          }
  193.          
  194.     GTA.Native.Function.Call("SET_CHAR_COLLISION", femalePed, 1);
  195.     Wait(1000);
  196.    
  197.     femalePed.FreezePosition = false;
  198.      }
  199.  
  200.     private void counter_right_3()
  201.     {
  202.         GTA.Native.Function.Call("TASK_PLAY_ANIM", malePed, "counter_right_3", "melee_counters", 4.0f, 0, 1, 1, 0, 900);
  203.         GTA.Native.Function.Call("UNLOCK_RAGDOLL", femalePed, 1);
  204.         GTA.Native.Function.Call("SET_CHAR_ANIM_CURRENT_TIME", malePed, "melee_counters", "counter_right_3", 0.22f);
  205.         GTA.Native.Function.Call("SWITCH_PED_TO_RAGDOLL_WITH_FALL", femalePed, 2200, 5000, 1);
  206.         Wait(300);
  207.     }
  208.    
  209.  
  210.     private static void SetupPed(Ped ped)
  211.     {
  212.         if (ped.Gender == Gender.Male)
  213.         {
  214.             ped.RelationshipGroup = RelationshipGroup.Civillian_Male;
  215.         }
  216.         else
  217.         {
  218.             ped.RelationshipGroup = RelationshipGroup.Civillian_Female;
  219.         }
  220.         ped.BecomeMissionCharacter();
  221.         ped.BlockPermanentEvents = true;
  222.             ped.Task.AlwaysKeepTask = true;
  223.     }
  224.  
  225. }
  226.  
  227.  
  228.  
  229.  
  230. ////////////////////////////////////
  231. //you could set all their head components to invisible, have blood spurting out of their neck and make them die
  232.  
  233. //public static class PedExtensions
  234. //{
  235.  
  236. //public static void Decapitate(this Ped ped)
  237. //{
  238.  
  239. // Make head invisible.
  240. // Create blood spurt particle effects.
  241. // ped.Die();
  242. // }
  243. //}
  244. //then (for instance) you could do Game.LocalPlayer.Character.Decapitate();
  245. //////////////