Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- --LATO SENSORE
- se = sensor.wrap("top")
- --LATO ATTIVAZIONE REDSTONE
- lato = "front"
- --GIOCATORI PER CUI SI SPEGNE
- giocatore1 = "dionesalvi"
- giocatore2 = ""
- giocatore3 = ""
- rs.setOutput(lato, false)
- os.loadAPI("ocs/apis/sensor")
- while true do
- ta = se.getTargets()
- for k,v in pairs(ta) do
- if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 then
- print("Rilevato giocatore non autorizzato: "..k)
- rs.setOutput(lato, true)
- elseif v["Name"] == "Player" and k == "lego11" and k == giocatore1 and k == giocatore2 and k == giocatore3 then
- rs.setOutput(lato, false)
- print("Rilevato giocatore autorizzato: "..k)
- sleep(0.2)
- end
- end
- sleep(0.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement