Advertisement
Guest User

Untitled

a guest
Jun 24th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. addEventHandler("onClientVehicleDamage", root,
  2.     function(_,_,loss)
  3.         if (getElementDimension(source)~=9) then
  4.             local hp=getElementHealth(source)
  5.             hp=hp-loss
  6.             if (hp<300) then
  7.                 cancelEvent()
  8.                 setElementHealth(source, 300)
  9.                 if getVehicleEngineState(source) then
  10.                     triggerServerEvent("wylacz_silnik",resourceRoot,source)
  11.                 end
  12.             end
  13.         end
  14.     end
  15. )
  16.  
  17. -- gdy pojazd leży na dachu i się pali to wybucha -- zablokowane w zasobie es_interfejs_pojazdow/interfejs_c.lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement