LewdLamb

Untitled

Jan 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. function checkTargets( Sensor )
  2. targets = sensors.getAvailableTargetsforProbe(ctrl, Sensor, probe)
  3. for i,val in ipairs(targets) do
  4. what,x,y,z = string.match(val,"([a-z]+), (-?[0-9]+), (-?[0-9]+), (-?[0-9])")
  5. if what == "vq" then
  6. x,y,z = tonumber(x), tonumber(y), tonumber(z)
  7. print("Position data recorded")
  8. sensors.setTarget(ctrl,Sensor,i)
  9. print("Sensor target set")
  10. local reading = sensors.getReading(ctrl,Sensor)
  11. print("Getting reading of player")
  12.  
  13. local Name = reading.name
  14. if string.find("Lying") ~= null then
  15. LyingPos = vector.new(x,y,z)
  16. end
  17. end
  18. end
Add Comment
Please, Sign In to add comment