GTAGaming Forums

GTAGaming Forums (http://www.gtagaming.com/forums/index.php)
-   Grand Theft Auto IV (http://www.gtagaming.com/forums/forumdisplay.php?f=273)
-   -   Help with scripting!!! (http://www.gtagaming.com/forums/showthread.php?t=142234)

Tomimn 07-22-2013 08:28 PM

Help with scripting!!!
 
Im new in this website,so please excuse me if im putting this thread on the wrong forum.
The thing is,ive downloaded the Dart.CS script from HippieCommunist (the one where you dart a ped and they start twitchin all over the place,and then lie "dying" on the ground").The script works well (besides a few crashes from time to times),but i really dont like that after they finish twitching the peds dont go into full ragdoll ("die"),instead they just lie on the ground and cry,is there a way to edit the .CS script or a line in it,so that the pedestrians will die after twitching?Please reply,this is important!a friend and i are desperate to get this working!Awesome people in this forum btw.
So that you wont have to download the script,this are the lines in the file
using System;
using System.Windows.Forms;
using GTA;

namespace Dart
{

// ### press numpad0 to stick a dart in nearest ped
// ### if any1 sees you do it, you will get wanted level (1 star)
// ### if a cop sees you do it, he will shoot you! (2 stars)

public class Dart : Script
{

public Dart()
{
this.Tick += new EventHandler(this.ScriptCommunicationExample2_Tick );
// Interval = Settings.GetValueInteger("INTERVAL", "SETTINGS", 10000);

Wait(0);

}


private void ScriptCommunicationExample2_Tick(object sender, EventArgs e)
{
{
Wait(0);

AnimationSet anims = new AnimationSet("gun@handgun");
AnimationFlags animflags = AnimationFlags.Unknown12 | AnimationFlags.Unknown11 | AnimationFlags.Unknown09;


AnimationSet animsp = new AnimationSet("pickup_object");
if ((isKeyPressed(Keys.T))&&Player.Character.isAlive& &!Player.Character.isGettingUp&&!Player.Character. isRagdoll)
{

GTA.Native.Function.Call("REQUEST_MODEL", 0x4A8EB4F3);
GTA.Object dart;

GTA.Native.Function.Call("REQUEST_ANIMS", "gun@handgun");
GTA.Native.Function.Call("REQUEST_ANIMS", "pickup_object");

Wait(0);
GTA.Ped[] pedArray = GTA.World.GetPeds(Player.Character.GetBonePosition (Bone.Pelvis), 0.9F, 3);

foreach (GTA.Ped Pede in pedArray)
{

if (Pede == Player.Character|| GTA.Native.Function.Call<bool>("IS_GROUP_MEMBER", Pede, Player.Group)|| !GTA.Native.Function.Call<bool>("IS_CHAR_FACING_CH AR", Player.Character, Pede, 30.0f) || Pede.Health<0) // || Pede.isSittingInVehicle()
{
continue;
}
if (Pede.Exists()&&!Player.Character.isRagdoll) {


if (Pede.isAlive&&Player.Character.isAlive)//
{

GTA.Native.Function.Call("REQUEST_MODEL", 0x4A8EB4F3);


dart = World.CreateObject(0x4A8EB4F3, Player.Character.Position.Around(99.0F));

Pede.Task.TurnTo(Player.Character); Wait(100);


// {
Player.Character.Task.ClearAll();
Player.Character.Task.PlayAnimation(anims, "melee", 6.0F, animflags);
// GTA.Native.Function.Call("TASK_PLAY_ANIM", Player.Character, "grenade_throw_short", "throw_grenade", 4.00, 0, 1, 1, 0, -2);
// }
Wait(350);
dart.Delete(); Wait(0);// dart.Delete();
Wait(0);
dart = World.CreateObject(0x4A8EB4F3, Player.Character.Position.Around(99.0F));
dart.AttachToPed(Pede, Bone.Neck, new Vector3(0.06F, 0.02F, 0.06F), new Vector3(0.0F, 0.5F, 0.0F));
Wait(0);

GTA.Native.Function.Call("Play_Audio_Event","FRONT END_OTHER_COUNTDOWN");
GTA.Native.Function.Call("Play_Audio_Event","FRONT END_FIRE_FAIL_ROCKET");




// if (Pede.isSittingInVehicle()) { Pede.Task.LeaveVehicleImmediately(Pede.CurrentVehi cle); Wait(3250);

Pede.Task.ClearAll();
Pede.Euphoria.BeingShot.Start(99700);
Pede.Euphoria.LeanToPosition.Amount = 1.2F;
Pede.Euphoria.LeanToPosition.ApplyAsForce = true;
Pede.Euphoria.LeanToPosition.Position = Pede.Position.Around(0.3F);
Pede.Euphoria.LeanToPosition.Start();


Wait(30);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(10);


Pede.Euphoria.LeanToPosition.Position = Pede.Position.Around(0.3F);
Pede.Euphoria.LeanToPosition.Start();
Pede.Euphoria.LeanToPosition.Position = Pede.Position.Around(0.4F);
Pede.Euphoria.LeanToPosition.Start();
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Pede.Euphoria.LeanToPosition.Position = Pede.Position.Around(0.5F);
Pede.Euphoria.LeanToPosition.Start();
Wait(50);
Pede.Euphoria.LeanToPosition.Position = Pede.Position.Around(0.7F);
Pede.Euphoria.LeanToPosition.Start();
Wait(30);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(40);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Pede.Health = 0;


GTA.Native.Function.Call("CREATE_NM_MESSAGE", 1 ,41);

GTA.Native.Function.Call("SEND_NM_MESSAGE", Pede);

GTA.Native.Function.Call("CREATE_NM_MESSAGE",1 ,271);

GTA.Native.Function.Call("SEND_NM_MESSAGE", Pede);



GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
Wait(20);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);


GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);


GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);
GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

GTA.Native.Function.Call("FIRE_PED_WEAPON", Pede, Pede.Position.Around(9.0F).X, Pede.Position.Around(9.0F).Y, Pede.Position.Around(9.0F).Z);

Wait(20);

GTA.Ped[] pedArray2 = GTA.World.GetPeds(Player.Character.Position, 10.85F, 5);
// GTA.Ped ped;
foreach (GTA.Ped Pede2 in pedArray2)
{//
if (!Pede2.isAliveAndWell|| Pede2 == Pede|| Pede2 == null || Pede2 == Player.Character || Pede2.isRagdoll || GTA.Native.Function.Call<bool>("IS_GROUP_MEMBER", Pede2, Player.Group) )
{
continue;
}
if (Player.WantedLevel<=0){//Pede.RelationshipGroup != RelationshipGroup.Cop &&
if(Pede.RelationshipGroup == RelationshipGroup.Cop)
{
GTA.Native.Function.Call("ALTER_WANTED_LEVEL", Player, 0);
GTA.Native.Function.Call("APPLY_WANTED_LEVEL_CHANG E_NOW", Player);
}
else {
GTA.Native.Function.Call("ALTER_WANTED_LEVEL", Player, 0);
GTA.Native.Function.Call("APPLY_WANTED_LEVEL_CHANG E_NOW", Player);
}
}
}
Pede.NoLongerNeeded();
dart.NoLongerNeeded();


}

// break;


}


}
}


}

}
}
}


All times are GMT -6. The time now is 12:19 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.