Posted 22 January 2013 - 06:39 AM
I am trying to make a script in Computercraft and misc perherial that detect what name the player has who is right clicking on the block(part of misc perherial mod)
is it possible to do something like this?
local Table1 = {arg1 ,"tilde1000", "thorsteingp", "Alex", "Amber", "Alice"}
if test == Table1 then
print("you may pass")
else
print("you cant pass")
end
any help would be appreciated :)/>
is it possible to do something like this?
local Table1 = {arg1 ,"tilde1000", "thorsteingp", "Alex", "Amber", "Alice"}
if test == Table1 then
print("you may pass")
else
print("you cant pass")
end
function clear()
term.clear()
term.setCursorPos(1,1)
end
rednet.open("left")
while true do
event, playerName = os.pullEvent("player")
–print("Hello " .. playerName)
if playerName == "tilde1000" or playerName == "thorsteingp" or "player" then –If name = tilde1
clear()
print("Hello "..playerName)
print("you may pass")
rednet.broadcast("openGate")
print("open gate")
redstone.setOutput("top",true)
sleep(2)
redstone.setOutput("top",false)
rednet.broadcast("closeGate")
print("close gate")
else
redstone.setOutput("bottom",true)
sleep(2)
redstone.setOutput("bottom",false)
clear()
print("You do not have acceses!")
end
end
any help would be appreciated :)/>