Jump to content

Fuel Tank


XxCozzaxX

Recommended Posts

Posted

I have seen explodable fuel tanks... but how do i make it for ALL resources/vehicles, i want it so automatically they are explodable but even map vehicles want it, how can i do this?

Posted
local vehicles = getElementsByType ( "vehicle" )
for theKey,theVehicle in ipairs(vehicles) do
if ( isVehicleFuelTankExplodable ( theVehicle ) == false ) then
setVehicleFuelTankExplodable ( theVehicle, true )
end
end

Posted
Works fine in the resource the code is in... but for map files it doesnt work.

it should work for map files.. BUT.. you are probably 1st setting it explodable, then loading a map (new cars, not set!)

if ( isVehicleFuelTankExplodable ( theVehicle ) == false ) then
setVehicleFuelTankExplodable ( theVehicle, true )
end

i dont see a point of checking if it false and setting to true.. after setting all to true.. it will be just the same, without "if"

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