Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Online Ofline Player Checker
- wModul = "top"
- OnlinePlayer = "left"
- Protokoll = "1900Info"
- --Code
- shell.run("clear")
- print("Online / Offline Checker")
- print("")
- print("In Betrieb")
- function check()
- local event = os.pullEvent("redstone")
- if redstone.getInput(OnlinePlayer) == true then
- rednet.broadcast("Benutzer ging Online", Protokoll)
- else
- rednet.broadcast("Benutzer ging Offline", Protokoll)
- end
- end
- function status()
- senderId, message, protocol = rednet.receive("1900Player")
- if message == "status?" then
- if redstone.getInput(OnlinePlayer) == true then
- rednet.send(senderId, "Online", "1900Player")
- else
- rednet.send(senderId, "Offline", "1900Player")
- end
- end
- end
- rednet.open(wModul)
- while true do -- Endloschleife
- parallel.waitForAny(status, check)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement