Jump to content

[REL] Synced Fire


Recommended Posts

My latest community resource, synced fire, can be found here.

Now at the moment, it is very basic and has barely any functionality. I encourage you to leave your feedback in this topic; how it could be improved, exports to add, etc. I will be updating the resource as time goes by.

This resource is temporary, and will be rendered useless once the MTA team add native support for synced fire, but that's been planned for the last 3-4 years.

Feel free to contribute towards the resource, modify it for personal use, etc (just don't proclaim to have made it, or own it).

Link to comment

Alternate client script:

  
function applyFire() 
    local fire = engineLoadDFF("fire.dff",1) 
    engineReplaceModel(fire,2023) 
end 
addEventHandler("onClientResourceStart",resourceRoot,applyFire) 
  
function createExtinguisher(wep,_,_,_,_,_,hit) 
    if wep ~= 42 then return end 
    if getElementModel(hit) == 2023 then 
        triggerServerEvent("fireExtinguished",localPlayer,hit) 
    end 
end 
addEventHandler("onClientPlayerWeaponFire",localPlayer,createExtinguisher) 

Link to comment
Alternate client script:
  
function applyFire() 
    local fire = engineLoadDFF("fire.dff",1) 
    engineReplaceModel(fire,2023) 
end 
addEventHandler("onClientResourceStart",resourceRoot,applyFire) 
  
function createExtinguisher(wep,_,_,_,_,_,hit) 
    if wep ~= 42 then return end 
    if getElementModel(hit) == 2023 then 
        triggerServerEvent("fireExtinguished",localPlayer,hit) 
    end 
end 
addEventHandler("onClientPlayerWeaponFire",localPlayer,createExtinguisher) 

The fire objects have collisions disabled so players can run through them, thus they are not triggered onClientPlayerWeaponFire.

Link to comment
  • 1 year later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...