Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local stock_glass = {
- ['doorpart_dside_f0'] = {'door_lf', 'window_lf'}, -- door_lf_dummy – дамми передней левой двери
- ['doorpart_pside_f0'] = {'door_rf', 'window_rf'}, -- door_rf_dummy – дамми передней правой двери
- }
- addEventHandler('onClientRender', root,
- function()
- local vehicles = getElementsByType('vehicle', root, true)
- for i, v in ipairs(vehicles) do
- if getElementModel(v) == 495 or getElementModel(v) == 470 then
- for dummy, window in pairs(stock_glass) do -- синхронизация стекла от двери с тачкой
- local cx,cy,cz = getVehicleComponentRotation(v, dummy, 'parent')
- if cx and cy and cz then
- for d, e in ipairs(window) do
- setVehicleComponentRotation(v, e, cx, cy, cz, 'parent')
- end
- end
- end
- end
- end
- end
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement