Guest User

Untitled

a guest
Oct 13th, 2012
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function checkVehicle(vehicle, ped)
  2.     if vehicle and ped then
  3.         local vx, vy, vz = getElementPosition (vehicle)
  4.         local dmg = getElementHealth(vehicle)
  5.         if dmg and dmg < 500 then
  6.             detachElements(ped, vehicle)
  7.             triggerEvent("rescuedLost", ped)
  8.             killTimer(timer)
  9.             setElementData(vehicle, "CG:state", "empty")
  10.         end
  11.     end
  12. end
  13. function rescuedLost ()
  14.         local blip = createBlipAttachedTo(source,41)
  15.         setElementData(source, "CG:blip", blip)
  16.         local colShape = createColCuboid(0, 0, 0,8,8,8)
  17.         attachElements(colShape, source, -4, -4, 0)
  18.         addEventHandler("onClientColShapeHit", colShape, rescue)
  19. end
  20. addEvent("rescuedLost", false)
  21. addEventHandler("rescuedLost", root, rescuedLost)
RAW Paste Data