Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Happy Holidays from the GTANet team!

[W.I.P] Police Blackout Escape Inspired By Watch Dogs


UltraNineNine
 Share

Recommended Posts

UltraNineNine

 

.

 

 

This will disable the vehicle light too

For Each v As Vehicle In World.GetVehicles(Player.Character.Position, 30)                If Exists(v) Then                    v.EngineRunning = False                End If
try using this native for vehicle lights:

FORCE_ALL_VEHICLE_LIGHTS_OFF(boolean off);

 

 

For streetlamps... use THIS!

public bool Nox(String name, GTA.Object obj, double Xx, double Yy, double Zz)    {        if (obj.Model == name)        {            Vector3 noxVectorum = obj.GetOffsetPosition(new Vector3((float)Xx, (float)Yy, (float)Zz));            World.AddExplosion(noxVectorum,                ExplosionType.Molotov,                1f, false, true, 0f);            Wait(1);            return true;        }        return false;    }    public void Deluminate()    {        Game.DisplayText("Deluminate!");        foreach (GTA.Object obj in World.GetAllObjects())        {            if (Exists(obj))            {                if(Nox("CJ_NYLAMP1", obj, -1.82063600, 0.02231500, 6.33843700)) { continue; }                if(Nox("CJ_NYLAMP2", obj, -2.17200700, 0.12333000, 8.01229700)) { continue; }                if(Nox("CJ_NYLAMP2b", obj, 2.21655300, 0.12538500, 8.00557600)) { continue; }                if(Nox("BM_NYlamp1", obj, -2.36057700, -0.04451300, 9.00610300)) { continue; }                if(Nox("BM_NYlamp1_italy", obj, -2.36051900, -0.04246800, 9.00714800)) { continue; }                if(Nox("BM_NYlamp10", obj, 1.10564800, -0.02796000, 6.95975000)) { continue; }                if(Nox("BM_NYlamp110b", obj, -1.15087100, -0.02192500, 6.95975000)) { continue; }                if(Nox("BM_NYlamp12", obj, 0.50356900, 0.00084300, 3.08407400)) { continue; }                if(Nox("BM_NYlamp1a", obj, -2.35546000, -0.04351300, 9.00610300)) { continue; }                if(Nox("BM_NYlamp1b", obj, 1.58855900, -0.03478700, 7.78166800)) { continue; }                if(Nox("BM_NYlamp1c", obj, -2.36583400, -0.04447800, 9.00714800)) { continue; }                if(Nox("BM_NYlamp2a", obj, 2.86529300, -0.03331400, 7.23945800)) { continue; }                if(Nox("BM_NYlamp2b", obj, 2.56053300, -0.03848800, 7.68502200)) { continue; }                if(Nox("BM_NYlamp3", obj, 0.58802200, 0.00009400, 6.62310900)) { continue; }                if(Nox("BM_NYlamp4", obj, 0.00244300, -0.00017500, 3.41847400)) { continue; }                if(Nox("BM_NYlamp5", obj, 0.00000000, 0.00000000, 2.59286800)) { continue; }                if(Nox("BM_NYlamp6", obj, -0.00296800, 0.90626500, 7.07489600)) { continue; }                if(Nox("BM_NYlamp6a", obj, 0.00018300, -0.99192200, 7.07489500)) { continue; }                if(Nox("BM_NYlamp6c", obj, 0.00302100, 0.90626500, 7.07489600)) { continue; }                if(Nox("BM_NYlamp7", obj, 0.42898600, 0.00000000, 3.51846300)) { continue; }                if(Nox("BM_NYlamp7_b", obj, -0.42384300, -0.00064000, 3.51846200)) { continue; }                if(Nox("BM_NYlamp7_c", obj, 0.42520900, -0.00085800, 3.51846300)) { continue; }                if(Nox("BM_NYlamp8a", obj, -0.04518500, -0.04813000, 4.05437000)) { continue; }                if(Nox("BM_NYlamp9", obj, 2.59298700, -0.03134200, 6.98542600)) { continue; }                if(Nox("CJ_DM_LIGHT_1", obj, -0.00109900, 0.00061100, 1.03649400)) { continue; }                if(Nox("BM_wall_light_06", obj, -0.00118600, -0.28953200, 0.18201800)) { continue; }                if(Nox("BM_Fount_Lamp", obj, -0.36859100, -0.00169400, 1.54113400)) { continue; }            }        }    }
Took me a bit to get all those values.. lol

 

 

Just played around with it and its pretty cool :D

 

I strongly suggest to read and learn from this code, don't just copy and paste ;)

That's my way of learning scripting man :)

Edited by UltraNineNine
  • Like 1
Link to comment
Share on other sites

InfamousSabre

Updated a bit for dual lamped street lights. I noticed some weren't turning off. Those same ones though, seem to have an invincible glass on one side. Weird. The light still goes off though.

public bool Nox(String name, GTA.Object obj, double Xx, double Yy, double Zz)    {        if (obj.Model == name)        {            Vector3 noxVectorum = obj.GetOffsetPosition(new Vector3((float)Xx, (float)Yy, (float)Zz));            World.AddExplosion(noxVectorum,                ExplosionType.Molotov,                1f, false, true, 0f);            Wait(1);            return true;        }        return false;    }    public void Deluminate()    {        Game.DisplayText("Deluminate!");        foreach (GTA.Object obj in World.GetAllObjects())        {            if (Exists(obj))            {                if(Nox("CJ_NYLAMP1", obj, -1.82063600, 0.02231500, 6.33843700)) { continue; }                if(Nox("CJ_NYLAMP2", obj, -2.17200700, 0.12333000, 8.01229700)) { continue; }                if(Nox("BM_NYlamp1", obj, -2.36057700, -0.04451300, 9.00610300)) { continue; }                if(Nox("BM_NYlamp1_italy", obj, -2.36051900, -0.04246800, 9.00714800)) { continue; }                if (Nox("BM_NYlamp10", obj, 1.10564800, -0.02796000, 6.95975000)) { continue; }                if (Nox("BM_NYlamp3", obj, 0.58802200, 0.00009400, 6.62310900)) { continue; }                if (Nox("BM_NYlamp4", obj, 0.00244300, -0.00017500, 3.41847400)) { continue; }                if (Nox("BM_NYlamp5", obj, 0.00000000, 0.00000000, 2.59286800)) { continue; }                if (Nox("BM_NYlamp6", obj, -0.00296800, 0.90626500, 7.07489600)) { continue; }                if (Nox("BM_NYlamp6a", obj, 0.00018300, -0.99192200, 7.07489500)) { continue; }                if (Nox("BM_NYlamp6c", obj, 0.00302100, 0.90626500, 7.07489600)) { continue; }                if (Nox("BM_NYlamp7", obj, 0.42898600, 0.00000000, 3.51846300)) { continue; }                if (Nox("BM_NYlamp7_c", obj, 0.42520900, -0.00085800, 3.51846300)) { continue; }                if (Nox("BM_NYlamp8a", obj, -0.04518500, -0.04813000, 4.05437000)) { continue; }                if (Nox("BM_NYlamp9", obj, 2.59298700, -0.03134200, 6.98542600)) { continue; }                if (Nox("CJ_DM_LIGHT_1", obj, -0.00109900, 0.00061100, 1.03649400)) { continue; }                if (Nox("BM_wall_light_06", obj, -0.00118600, -0.28953200, 0.18201800)) { continue; }                if (Nox("BM_Fount_Lamp", obj, -0.36859100, -0.00169400, 1.54113400)) { continue; }                if (Nox("BM_NYlamp12", obj, 0.50356900, 0.00084300, 3.08407400)) { continue; }                if (Nox("BM_NYlamp1a", obj, -2.35546000, -0.04351300, 9.00610300)) { continue; }                if (Nox("BM_NYlamp1c", obj, -2.36583400, -0.04447800, 9.00714800)) { continue; }                if (Nox("BM_NYlamp2a", obj, 2.86529300, -0.03331400, 7.23945800)) { continue; }                Nox("BM_NYlamp110b", obj, -1.15087100, -0.02192500, 6.95975000);                if (Nox("BM_NYlamp110b", obj, 1.10668200, -0.02192600, 6.95970100)) { continue; }                Nox("CJ_NYLAMP2b", obj, 2.21655300, 0.12538500, 8.00557600);                if (Nox("CJ_NYLAMP2b", obj, -2.17667800, 0.12343800, 8.00720200)) { continue; }                Nox("BM_NYlamp1b", obj, 1.58855900, -0.03478700, 7.78166800);                if (Nox("BM_NYlamp1b", obj, -1.61765900, -0.03474597, 7.78166600)) { continue; }                Nox("BM_NYlamp2b", obj, 2.56053300, -0.03848800, 7.68502200);                if (Nox("BM_NYlamp2b", obj, -2.58014900, -0.03065500, 7.68636900)) { continue; }                Nox("BM_NYlamp7_b", obj, -0.42384300, -0.00064000, 3.51846200);                if (Nox("BM_NYlamp7_b", obj, 0.42632300, -0.00030500, 3.51846200)) { continue; }            }        }    }
Edited by InfamousSabre
Link to comment
Share on other sites

UltraNineNine

 

Updated a bit for dual lamped street lights. I noticed some weren't turning off. Those same ones though, seem to have an invincible glass on one side. Weird. The light still goes off though.

 

public bool Nox(String name, GTA.Object obj, double Xx, double Yy, double Zz)    {        if (obj.Model == name)        {            Vector3 noxVectorum = obj.GetOffsetPosition(new Vector3((float)Xx, (float)Yy, (float)Zz));            World.AddExplosion(noxVectorum,                ExplosionType.Molotov,                1f, false, true, 0f);            Wait(1);            return true;        }        return false;    }    public void Deluminate()    {        Game.DisplayText("Deluminate!");        foreach (GTA.Object obj in World.GetAllObjects())        {            if (Exists(obj))            {                if(Nox("CJ_NYLAMP1", obj, -1.82063600, 0.02231500, 6.33843700)) { continue; }                if(Nox("CJ_NYLAMP2", obj, -2.17200700, 0.12333000, 8.01229700)) { continue; }                if(Nox("BM_NYlamp1", obj, -2.36057700, -0.04451300, 9.00610300)) { continue; }                if(Nox("BM_NYlamp1_italy", obj, -2.36051900, -0.04246800, 9.00714800)) { continue; }                if (Nox("BM_NYlamp10", obj, 1.10564800, -0.02796000, 6.95975000)) { continue; }                if (Nox("BM_NYlamp3", obj, 0.58802200, 0.00009400, 6.62310900)) { continue; }                if (Nox("BM_NYlamp4", obj, 0.00244300, -0.00017500, 3.41847400)) { continue; }                if (Nox("BM_NYlamp5", obj, 0.00000000, 0.00000000, 2.59286800)) { continue; }                if (Nox("BM_NYlamp6", obj, -0.00296800, 0.90626500, 7.07489600)) { continue; }                if (Nox("BM_NYlamp6a", obj, 0.00018300, -0.99192200, 7.07489500)) { continue; }                if (Nox("BM_NYlamp6c", obj, 0.00302100, 0.90626500, 7.07489600)) { continue; }                if (Nox("BM_NYlamp7", obj, 0.42898600, 0.00000000, 3.51846300)) { continue; }                if (Nox("BM_NYlamp7_c", obj, 0.42520900, -0.00085800, 3.51846300)) { continue; }                if (Nox("BM_NYlamp8a", obj, -0.04518500, -0.04813000, 4.05437000)) { continue; }                if (Nox("BM_NYlamp9", obj, 2.59298700, -0.03134200, 6.98542600)) { continue; }                if (Nox("CJ_DM_LIGHT_1", obj, -0.00109900, 0.00061100, 1.03649400)) { continue; }                if (Nox("BM_wall_light_06", obj, -0.00118600, -0.28953200, 0.18201800)) { continue; }                if (Nox("BM_Fount_Lamp", obj, -0.36859100, -0.00169400, 1.54113400)) { continue; }                if (Nox("BM_NYlamp12", obj, 0.50356900, 0.00084300, 3.08407400)) { continue; }                if (Nox("BM_NYlamp1a", obj, -2.35546000, -0.04351300, 9.00610300)) { continue; }                if (Nox("BM_NYlamp1c", obj, -2.36583400, -0.04447800, 9.00714800)) { continue; }                if (Nox("BM_NYlamp2a", obj, 2.86529300, -0.03331400, 7.23945800)) { continue; }                Nox("BM_NYlamp110b", obj, -1.15087100, -0.02192500, 6.95975000);                if (Nox("BM_NYlamp110b", obj, 1.10668200, -0.02192600, 6.95970100)) { continue; }                Nox("CJ_NYLAMP2b", obj, 2.21655300, 0.12538500, 8.00557600);                if (Nox("CJ_NYLAMP2b", obj, -2.17667800, 0.12343800, 8.00720200)) { continue; }                Nox("BM_NYlamp1b", obj, 1.58855900, -0.03478700, 7.78166800);                if (Nox("BM_NYlamp1b", obj, -1.61765900, -0.03474597, 7.78166600)) { continue; }                Nox("BM_NYlamp2b", obj, 2.56053300, -0.03848800, 7.68502200);                if (Nox("BM_NYlamp2b", obj, -2.58014900, -0.03065500, 7.68636900)) { continue; }                Nox("BM_NYlamp7_b", obj, -0.42384300, -0.00064000, 3.51846200);                if (Nox("BM_NYlamp7_b", obj, 0.42632300, -0.00030500, 3.51846200)) { continue; }            }        }    }

Good job Infamous you help me a lot,I have updated the source code at the first page and convert my code to C#,now I'm making the white line effect from this video:

should't be difficult :) Edited by UltraNineNine
  • Like 1
Link to comment
Share on other sites

WEISHENCHENG99

Wow this script is awesome,I play around with it and it's cool. Although,Can you make the police that is arresting the player look shocked when the light is turning off. That will improve the AI system :lol: .

Edited by WEISHENCHENG99
Link to comment
Share on other sites

UltraNineNine

Wow this script is awesome,I play around with it and it's cool. Although,Can you make the police that is arresting the player look shocked when the light is turning off. That will improve the AI system :lol: .

I can do that but I need the shocked animation first :)

Edited by UltraNineNine
  • Like 1
Link to comment
Share on other sites

WEISHENCHENG99

 

Wow this script is awesome,I play around with it and it's cool. Although,Can you make the police that is arresting the player look shocked when the light is turning off. That will improve the AI system :lol: .

I can do that but I need the shocked animation first :)

I already found it,use this:

Private peds As GTA.PedDim AnimSet2 As AnimationSetDim AnimName2 As String = ("shock_d")AnimSet2 = New AnimationSet("[email protected]")For Each peds As GTA.Ped In World.GetAllPeds                If Exists(peds) Then                    peds.Animation.Play(AnimSet2, AnimName2, 8, AnimationFlags.Unknown05 Or AnimationFlags.Unknown06)                End If            Next

The AnimationFlags.Unknown05 represents loop animation while AnimationFlags.Unknown06 represents to stop the ped in the last animation position

The anim are not the best but if you find the other anim then feel free to change it

Edited by WEISHENCHENG99
Link to comment
Share on other sites

UltraNineNine

I already found it,use this:

Private peds As GTA.PedDim AnimSet2 As AnimationSetDim AnimName2 As String = ("shock_d")AnimSet2 = New AnimationSet("[email protected]")For Each peds As GTA.Ped In World.GetAllPeds                If Exists(peds) Then                    peds.Animation.Play(AnimSet2, AnimName2, 8, AnimationFlags.Unknown05 Or AnimationFlags.Unknown06)                End If            Next

The AnimationFlags.Unknown05 represents loop animation while AnimationFlags.Unknown06 represents to stop the ped in the last animation position

The anim are not the best but if you find the other anim then feel free to change it

 

It seem that your method make the player execute the anim too

Edited by UltraNineNine
  • Like 1
Link to comment
Share on other sites

Not sure how VB works but to avoid that you have to change the condition and I noticed (not sure if I'm wrong here) Niko is always the first ped.

if(Exists(peds) && peds != Player.Character)    //anim
Edited by Noox
Link to comment
Share on other sites

UltraNineNine

 

Not sure how VB works but to avoid that you have to change the condition and I noticed (not sure if I'm wrong here) Niko is always the first ped.

if(Exists(peds) && peds != Player.Character)    //anim

Thx,I translate your code to VB and set it like this and now player won't be affect with the anim anymore.

 For Each peds As GTA.Ped In World.GetAllPeds                If (Exists(peds) _            AndAlso (peds <> Player.Character)) Then                    peds.Task.ClearAllImmediately()                    peds.Animation.Play(AnimSet2, AnimName2, 8, AnimationFlags.Unknown05 Or AnimationFlags.Unknown06)                End If            Next
Edited by UltraNineNine
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.