ch3y3zze Posted October 8, 2012 Share Posted October 8, 2012 (edited) OK i just wrote this bored. This will give u a wanted level if a cop spots u near a dead body while injured... so this adds realism because if a cop sees someone bloody or injured standing next to someone dead or beatup then u will be wanted for questioning so i give u 1 star. Also it will be easier for cops to spot u the more injured u r for all u realism enthusiasts...enjoy namespace DeadBody{ using System; using System.Windows.Forms; using GTA; using GTA.Native; public class Main : Script { bool nearBody; Random random; public Main() { random = new Random(); Interval = 3000; Tick += new EventHandler(Main_Tick); } void Main_Tick(object sender, EventArgs e) { if (Game.LocalPlayer.WantedLevel == 0) { foreach (Ped ped in World.GetPeds(Game.LocalPlayer.Character.Position, 15)) { if (ped == Game.LocalPlayer.Character) continue; if (ped.isAliveAndWell) continue; nearBody = Game.LocalPlayer.Character.Health < 100 && Game.LocalPlayer.Character.Position.DistanceTo(ped.Position) < 10; if (nearBody) break; } if (nearBody) { foreach (Ped ped in World.GetPeds(Game.LocalPlayer.Character.Position, 50)) { if (ped == Game.LocalPlayer.Character) continue; if (ped.PedType != PedType.Cop) continue; if (Function.Call<bool>("HAS_CHAR_SPOTTED_CHAR_IN_FRONT", ped, Game.LocalPlayer.Character)) { if (Game.LocalPlayer.Character.Health < 100 && random.Next(21, 121) > Game.LocalPlayer.Character.Health) { Game.DisplayText("SPOTTED NEAR DEAD BODY"); Game.LocalPlayer.WantedLevel = 1; } } } } } } }} Edited October 8, 2012 by ch3y3zze Link to comment Share on other sites More sharing options...
Grady Featherstone Posted October 8, 2012 Share Posted October 8, 2012 Nice!!!!! Works really well!!! Good job! Link to comment Share on other sites More sharing options...
ch3y3zze Posted October 8, 2012 Author Share Posted October 8, 2012 (edited) thanks man... i totally forgot i dont even use the copList so that can be deleted >_< Edited October 8, 2012 by ch3y3zze Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now