Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Instead of:
- private GTA.Object diamondCase, virus, plutonium, drugBag, dildo;
- //whatever code here...
- private void Drop()
- {
- if (Exists(diamondCase) && diamondCase.isAttachedSomewhere && Player.Character.Position.DistanceTo(diamondCase.Position) <= 1.0f)
- {
- Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
- Wait(500);
- diamondCase.Detach();
- diamondCase.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
- }
- if (Exists(virus) && virus.isAttachedSomewhere && Player.Character.Position.DistanceTo(virus.Position) <= 1.0f)
- {
- Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
- Wait(500);
- virus.Detach();
- virus.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
- }
- if (Exists(plutonium) && plutonium.isAttachedSomewhere && Player.Character.Position.DistanceTo(plutonium.Position) <= 1.0f)
- {
- Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
- Wait(500);
- plutonium.Detach();
- plutonium.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
- }
- if (Exists(drugBag) && drugBag.isAttachedSomewhere && Player.Character.Position.DistanceTo(drugBag.Position) <= 1.0f)
- {
- Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
- Wait(500);
- drugBag.Detach();
- drugBag.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
- }
- if (Exists(dildo) && dildo.isAttachedSomewhere && Player.Character.Position.DistanceTo(dildo.Position) <= 1.0f)
- {
- Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
- Wait(500);
- dildo.Detach();
- dildo.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
- }
- }
- //--------------------------------------------------------------------------------
- //-------------------- Do this:
- //--------------------------------------------------------------------------------
- private GTA.Object[] dropObjects = new GTA.Object[] { diamondCase, virus, plutonium, drugBag, dildo };
- //whatever code here...
- private void Drop()
- {
- foreach (GTA.Object obj in this.dropObjects)
- {
- if (Exists(obj) && obj.isAttachedSomewhere && Player.Character.Position.DistanceTo(obj.Position) <= 1.0f)
- {
- Game.LocalPlayer.Character.Task.PlayAnimation(new AnimationSet("missgambetti3"), "pickup_obj", 4.0f);
- base.Wait(500);
- obj.Detach();
- obj.ApplyForce(new Vector3(0.0F, 0.0F, -5.0F));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment