mrfergie
|
  |
| Joined: 25 Mar 2010 |
| Total Posts: 522 |
|
|
| 24 Jan 2015 05:31 PM |
I have this to teleport players. But I dont want a allowed people to be teleported. So I have this,
if teleportto~=nil and h.Parent.Name ~= allows then
Also, I have the allows set like this,
allows = {"Player1", "Player2"}
But it only reads the first value of allows (Player1). How can I use multiple allowed names?? |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 05:34 PM |
function findInTable(t,v) for a,b in next,t do if b == v then return true end end; end;
allows = {"Player1", "Player2"};
if teleportto~=nil and not findInTable(allows, h.Parent.Name) then -- code end; |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 05:34 PM |
| Oh please not again one of these thumbs up glitch games... |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 05:35 PM |
| Iterate through the table with a generic for loop. |
|
|
| Report Abuse |
|
|