Eggtooth Posted October 19, 2019 Share Posted October 19, 2019 (edited) 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 October 19, 2019 by Eggtooth Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now