Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkVehicle(vehicle, ped)
- if vehicle and ped then
- local vx, vy, vz = getElementPosition (vehicle)
- local dmg = getElementHealth(vehicle)
- if dmg and dmg < 500 then
- detachElements(ped, vehicle)
- triggerEvent("rescuedLost", ped)
- killTimer(timer)
- setElementData(vehicle, "CG:state", "empty")
- end
- end
- end
- function rescuedLost ()
- local blip = createBlipAttachedTo(source,41)
- setElementData(source, "CG:blip", blip)
- local colShape = createColCuboid(0, 0, 0,8,8,8)
- attachElements(colShape, source, -4, -4, 0)
- addEventHandler("onClientColShapeHit", colShape, rescue)
- end
- addEvent("rescuedLost", false)
- addEventHandler("rescuedLost", root, rescuedLost)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement