Facebook
From Soft Butterfly, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 1130
  1. function kara()
  2.     local gracz = getVehicleOccupant(source)
  3.     local auto = getPedOccupiedVehicle(gracz)
  4.     if (gracz) and (auto) then
  5.                 vmaxstart = getVehicleHandling(auto, "maxVelocity")
  6.                 predkosc = getElementHealth(auto) / 5
  7.                 setVehicleHandling(auto,"maxVelocity",predkosc)
  8.                 if getElementHealth(auto) > 900 then
  9.                         setVehicleHandling(auto,"maxVelocity",vmaxstart)
  10.                 end
  11.     end
  12. end
  13. addEventHandler("onVehicleDamage", getRootElement(), kara)