XaskeL

Untitled

Jul 23rd, 2019
123
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local stock_glass = {
  2.     ['doorpart_dside_f0'] = {'door_lf', 'window_lf'}, -- door_lf_dummy – дамми передней левой двери
  3.     ['doorpart_pside_f0'] = {'door_rf', 'window_rf'}, -- door_rf_dummy – дамми передней правой двери
  4. }
  5.  
  6. addEventHandler('onClientRender', root,
  7.     function()
  8.         local vehicles = getElementsByType('vehicle', root, true)
  9.         for i, v in ipairs(vehicles) do
  10.             if getElementModel(v) == 495 or getElementModel(v) == 470 then
  11.                 for dummy, window in pairs(stock_glass) do -- синхронизация стекла от двери с тачкой
  12.                     local cx,cy,cz = getVehicleComponentRotation(v, dummy, 'parent')
  13.                     if cx and cy and cz then
  14.                         for d, e in ipairs(window) do
  15.                             setVehicleComponentRotation(v, e, cx, cy, cz, 'parent')
  16.                         end
  17.                     end
  18.                 end
  19.             end
  20.         end
  21.     end
  22. );
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×