lego11

Allarme con command block

Jul 11th, 2019
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("ocs/apis/sensor")
  2.  
  3. --LATO SENSORE
  4. se = sensor.wrap("back")
  5. cb = peripheral.wrap("right")
  6.  
  7.  
  8. --GIOCATORI PER CUI L'ALLARME NON SI ATTIVA
  9. giocatore1 = "lor54"
  10. giocatore2 = "Kiiw"
  11. giocatore3 = ""
  12.  
  13.  
  14. emailMandata = 0
  15. os.loadAPI("ocs/apis/sensor")
  16. while true do
  17. ta = se.getTargets()
  18. for k,v in pairs(ta) do
  19. if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 then
  20. print("Rilevato giocatore non autorizzato: "..k)
  21. cb.setCommand("kill "..k)
  22. cb.runCommand()
  23. sleep(0.1)
  24. end
  25. end
  26. sleep(1)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment