Jump to content

setVehicleDoorsUndamageable has any effect?


Surge

Recommended Posts

Posted

Hi, is this setVehicleDoorsUndamageable function is still bugged? I added setVehicleLocked fuction as it required, but nothing happend, doors were still damaged and fall off.

Is there any solution to set these doors rly undamagable?

Posted (edited)
crun setVehicleLocked(getPedOccupiedVehicle(getLocalPlayer()), true)
crun setVehicleDoorsUndamageable(getPedOccupiedVehicle(getLocalPlayer()), true)
function vehdoorsdamagable()
    if isPedInVehicle(source()) then 
        playerVehicle = getPedOccupiedVehicle ( source() )   
        if ( playerVehicle ) then    
            for _, car in ipairs( getElementsByType ("vehicle") ) do
                setVehicleDoorsUndamageable ( car, true )
            end
            outputChatBox("Doors are not damageable")
        end
    end
end
addCommandHandler("doors", vehdoorsdamagable)

 

Edited by Surge
Posted
9 hours ago, JustinMTA said:

Search function works wonders xD
This is what you need

 

I've tried it, but doesn't work for me :D

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