Jump to content

Detect vehicle by type?


Eggtooth

Recommended Posts

So I want to detect if a vehicle is burnt via LUA code.

 

I am trying to overwrite a method from Vehicles.lua to basically not do certain block for certain vehicles. Basically wanna do "if not burnt then do the condition multiply" thingy to exclude burnt vehicles from being checked for parts conditions. I can't seem to find a way to get vehicle type via Lua.. is that possible somehow?

 

Quote

            if not vehicle:getVehicleType("burnt") then
            
            local conditionMultiply = 100/item:getConditionMax();
            
            item:setConditionMax(item:getConditionMax()*conditionMultiply);
            item:setCondition(item:getCondition()*conditionMultiply);
            end

 

Edited by Eggtooth
Link to comment
Share on other sites

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
×
×
  • Create New...