Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("left")
- function worker(index)
- if playerlist[index] == nil then
- return
- end
- if playerlist[index] == "serverdb" then
- return
- end
- local pl = p.getPlayerByName(playerlist[index])
- local ent = pl.asEntity()
- local x, y, z = ent.getPosition()
- local response = http.get("https://highcalc.fcosma.it/rfi/portale/api/put_player?player="..playerlist[index].."&pos="..x..","..z).readAll()
- print("Put data of player "..playerlist[index].." -- Result: "..response)
- end
- while true do
- playerlist = p.getPlayerUsernames()
- for index = 1, #playerlist do
- worker(index)
- end
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement