Advertisement
bugg94

trol ccsensor

Mar 5th, 2014
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2.  
  3. s = sensor.wrap("right")
  4.  
  5. while true do
  6.  
  7.     for k, v in pairs(t) do
  8.     pos = v.Position
  9.     if v.Name == "player" then -- si le sensor trouve un player
  10.  
  11.  
  12.         if k == "jmud" then -- si le player s'appelle jmud active un courant redstone sur la face gauche du computer
  13.  
  14.             rs.setOutput("left") = true
  15.         else -- si non il ne fait rien
  16.  
  17.             rs.SetOutput("left") = false
  18.  
  19.     end
  20.  
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement