Jump to content

is it possible?


yoya99

Recommended Posts

Something like this should do it.

function blowVehicleOnHit(loss) 
    -- Calculate speed in mph 
    local speedx,speedy,speedz = getElementVelocity(source) 
    local actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5)  
    local mph = actualspeed*111.847 
  
    -- Blow vehicle 
    if mph > 50 then blowVehicle(source) end 
end 
addEventHandler("onVehicleDamage", root, blowVehicleOnHit) 

Edited by Guest
Link to comment

brutus

* cough *

  
    function blowVehicleOnHit(loss) 
        -- Calculate speed in mph 
        local speedx,speedy,speedz = getElementVelocity(source) -- cough cough cough 
        local actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) 
        local mph = actualspeed*111.847 
      
        -- Blow vehicle 
        if mph > 50 then blowVehicle(source) end 
    end 
    addEventHandler("onVehicleDamage", root, blowVehicleOnHit) 

* cough *

Link to comment

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...