I need help to create this script that replaces objects across a table, thus getting more practical and quick to convert objects
Garage_OBJ_DFF = {
{"garage_1.dff",1455},
{"garage_2.dff",1455},
}
Garage_OBJ_TXD = {
{"garage_1.txd",1455},
{"garage_1.txd",1484},
}
Garage_OBJ_COL = {
{"garage_1.col",1484},
{"garage_2.col",1484},
}
function replacemodels(player)
for i,object1,object2 in ipairs(Garage_OBJ_DFF) do
table.insert(object1[1],object2[2])
object1 = engineLoadDFF
object2 = engineReplaceModel
end
for i,object1,object2 in ipairs(Garage_OBJ_TXD) do
table.insert(object1[1],object2[2])
object1 = engineLoadTXD
object2 = engineImportTXD
end
for i,object1,object2 in ipairs(Garage_OBJ_COL) do
table.insert(object1[1],object2[2])
object1 = engineLoadCOL
object2 = engineReplaceCOL
end
end
addEventHandler("onClientRender",root,replacemodels)