LostProphet

Crazy code

Sep 11th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.66 KB | None | 0 0
  1. //Instead of:
  2.  
  3. private GTA.Object diamondCase, virus, plutonium, drugBag, dildo;
  4.  
  5. //whatever code here...
  6.  
  7. private void Drop()
  8. {
  9.     if (Exists(diamondCase) && diamondCase.isAttachedSomewhere && Player.Character.Position.DistanceTo(diamondCase.Position) <= 1.0f)
  10.     {
  11.         Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
  12.         Wait(500);
  13.         diamondCase.Detach();
  14.         diamondCase.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
  15.     }
  16.     if (Exists(virus) && virus.isAttachedSomewhere && Player.Character.Position.DistanceTo(virus.Position) <= 1.0f)
  17.     {
  18.         Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
  19.         Wait(500);
  20.         virus.Detach();
  21.         virus.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
  22.     }
  23.     if (Exists(plutonium) && plutonium.isAttachedSomewhere && Player.Character.Position.DistanceTo(plutonium.Position) <= 1.0f)
  24.     {
  25.         Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
  26.         Wait(500);
  27.         plutonium.Detach();
  28.         plutonium.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
  29.     }
  30.     if (Exists(drugBag) && drugBag.isAttachedSomewhere && Player.Character.Position.DistanceTo(drugBag.Position) <= 1.0f)
  31.     {
  32.         Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
  33.         Wait(500);
  34.         drugBag.Detach();
  35.         drugBag.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
  36.     }
  37.     if (Exists(dildo) && dildo.isAttachedSomewhere && Player.Character.Position.DistanceTo(dildo.Position) <= 1.0f)
  38.     {
  39.         Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
  40.         Wait(500);
  41.         dildo.Detach();
  42.         dildo.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
  43.     }
  44. }
  45.  
  46. //--------------------------------------------------------------------------------
  47. //-------------------- Do this:
  48. //--------------------------------------------------------------------------------
  49.  
  50. private GTA.Object[] dropObjects =  new GTA.Object[] { diamondCase, virus, plutonium, drugBag, dildo };
  51.  
  52. //whatever code here...
  53.  
  54. private void Drop()
  55. {
  56.     foreach (GTA.Object obj in this.dropObjects)
  57.     {
  58.         if (Exists(obj) && obj.isAttachedSomewhere && Player.Character.Position.DistanceTo(obj.Position) <= 1.0f)
  59.         {
  60.             Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
  61.             base.Wait(500);
  62.             obj.Detach();
  63.             obj.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
  64.         }
  65.     }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment