[NEW UPDATE] PeekerJ's Destructions

f334e2ed96ab654ab6b6f954f9c5c1d3367a1cb2.png|543.225x420

SHOWCASE

ezgif-616e56ee47ea4dd9
woodenrbridgedest
cranedest

PeekerJ’s Destructions script gives you an entirely new way to play out your roleplay, like destroying a bridge when chased by the cops so they can’t pass, or just creating a unique distraction for your crimes. You can currently destroy three primary objects, which currently are the Wooden Bridge, the Crane on the construction site and the Radio Tower [NEW].

Animations can be triggered via exports (you can wire them in the scripts yourself)… And two items, which i’ve added for basic triggering. You can respawn the objects by restarting the script (pj_destruction). Destroyed objects are automatically destroyed (after animation) for every reconnect or rejoin till the restart of the script or server restart.

This script just gives you an possibillity to destroy things however you want, by shooting at them, planting an explosive, by using an item…

Here’s the list of all current features:

  • Destroying a Crane
  • Destroying a Bridge
  • Destroying a Radio Tower
  • Can be fixed in-game using exports
  • Triggerable via exports (server and client side)
  • Masked Events (prevents cheaters triggering it)
  • Collision while playing animation
  • Optimized
  • Full Synchronization (Networked)
  • 3D Sounds
  • Two Items, allowing anyone to trigger these explosions

CONFIG PREVIEW

INCLUDED SCRIPTS:

Usage Example for Radio Tower using any explosive

local hasbeentriggered = false

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0) 
        if not hasbeentriggered then
            if IsExplosionInSphere(-1, 756.6488, 1273.7079, 360.2944, 50.0) then
                exports['pj_destruction']:TriggerRadioTowerClient()
                print("Radio Tower explosion detected, triggering destruction sequence.")
                hasbeentriggered = true
            end
        end
    end
end)

What’s planned/to do:

  • Big LSIA Bridge Destruction
  • Fort Zancudo Tower Destruction
  • Maze Bank Tower Destruction
  • Windmill Destruction
  • Lighthouse Destruction
  • And more…

States

  • 1: Normal (intact)
  • 2: Destroyed (explosion FX + destroyed representation)
  • 3: Construction (repair/in-progress visuals)

Server broadcasts numeric states to clients to rebuild appropriate visuals and may emit FX events when transitioning to destroyed/construction.

Exports (Server)

Call these from other server resources:

  • Set bridge state directly:
    local changed = exports['pj_destruction']:SetBridgeState(STATE) -- STATE: 1/2/3
    
  • Set crane state directly:
    local changed = exports['pj_destruction']:SetCraneState(STATE)  -- STATE: 1/2/3
    
  • Set radio tower state directly:
    local changed = exports['pj_destruction']:SetRadioTowerState(STATE) -- STATE: 1/2/3
    

Return values:

  • true if the state actually changed
  • false if the state was already the requested value or validation blocked the change

Exports (Client)

Call these from other client scripts to ask the server to perform the action (they send a NetEvent to the server which then updates state and syncs):

  • Trigger destruction (bridge/crane) via client:
    exports['pj_destruction']:TriggerWoodenBridgeClient()
    exports['pj_destruction']:TriggerTowerCraneClient()
    exports['pj_destruction']:TriggerRadioTowerClient()
    
  • Fix to normal (bridge/crane) via client:
    exports['pj_destruction']:FixWoodenBridgeClient()
    exports['pj_destruction']:FixTowerCraneClient()
    exports['pj_destruction']:FixRadioTowerClient()
    


Trigger Exports (Server)

Call these from other client scripts to ask the server to perform the action (they send a NetEvent to the server which then updates state and syncs):

  • Trigger destruction (bridge/crane) via server:
    exports['pj_destruction']:TriggerWoodenBridge()
    exports['pj_destruction']:TriggerTowerCrane()
    exports['pj_destruction']:TriggerRadioTower()
    
  • Fix to normal (bridge/crane) via server:
    exports['pj_destruction']:FixWoodenBridge()
    exports['pj_destruction']:FixTowerCrane()
    exports['pj_destruction']:FixRadioTower()
    

PURCHASE (TEBEX)

DISCORD

Assets are accessible No
Subscription-based No
Polygons (model and LOD) 10000+
Texture size and amount 20mb+
Requirements & dependencies Included in purchase (Assets and Sounds)
Support Yes
18 Likes

This looks really amazing. But what you planned as a free dlc, updates or paid dlcs?

its 2025 dude … it be paid dlcs like everyone else :confused:

1 Like

Everything will be as an additional update to the pack :slight_smile:

Are you able to “repair” them?

Interested to use these as sort of a Public Safety/Road Repair job mission.

1 Like

Not quite, they are fixed automatically on server restart. I might add exports or such that can be triggered and fixed whenever, so you can integrate them anywhere you like.

2 Likes

Would be nice if you added an option to save the state on restart and something to trigger repairs, especially expanding it to other structures would be great for a lot scenarios.

1 Like

Actually a nice idea (saving the state in the database) and having an export or something to trigger the repairing (construction ymap) and another export to trigger the fully repaired and ready to destroy again bridge. I’ll push an update later when i’m home :smiley:

1 Like

Amazing!

I’ll hold you to your word! I bought it and Love it.

Edit: Check your DC DMs please. Its missing files.

1 Like

Just making the update, should be ready in an hour or so! :smiley:

Just pushed the update, check the portal! :smiley:

  • Added MySQL persistence (oxmysql/mysql-async) for destructible states.
  • Introduced 3-state system: 1=Normal, 2=Destroyed, 3=Construction.
  • Server exports to set/fix states:
    • SetBridgeState, FixWoodenBridge, SetCraneState, FixTowerCrane
  • Client exports to request actions server-side:
    • TriggerWoodenBridgeClient, TriggerTowerCraneClient, FixWoodenBridgeClient, FixTowerCraneClient
  • Reliable client sync on resource start and player join with delayed initialization.
  • Cleanup and refactor of client handlers to accept numeric states and handle FX/visual transitions.
  • README updated with usage, exports, and ox_inventory examples.

Notes:

  • Ensure DB resource (oxmysql or mysql-async) is started before pj_destruction.
  • Adjust config for UseDatabaseStates and default state fallbacks as needed.
1 Like

Fixed animations ending too soon (another trigger)

New update :smiley:

You can join the discord here for support: PeekerJ's Scripts

This is absolutely insane. Gonna run this by Ice-T’s server.
Incredible work!!

– Dan

1 Like

Glad to hear it’s useful to you! :smiley: