iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 04:18 PM |
okey so local table = {} while wait() do for i,v in pairs (table) do if game.Players.iiNemo.Name ~= v then table.insert(table, game.Players.iiNemo.Name) end end end
if game.Players.iiNemo.Name ~= v then is this correct, like will it work? If not halp meh!! |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 24 May 2017 04:20 PM |
correct for what.
You're saying "if my name is not this_index then"
|
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 04:23 PM |
| If my name is not in that table then print('chicken') could u do that ;) |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 24 May 2017 04:27 PM |
local tab,isThar = {},false;
for _,v in next,tab do if v == "iiNemo" then isThar = true; end end
if not isThar then print("chicken"); end
----------------------
An easier way to do this would be using a dictionary w/ bools:
wiki.roblox.com/index.php?title=Table#Dictionaries
local tab = {["iiNemo"]=true}; local name = game.Players.iiNemo.Name;
if not tab[name] then print("chicken"); end
|
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 04:37 PM |
| How would I insert another player's name into the table or whatever then? |
|
|
| Report Abuse |
|
|
RBXAiden
|
  |
| Joined: 08 Jan 2017 |
| Total Posts: 300 |
|
|
| 24 May 2017 04:40 PM |
| Just insert another script and do same thing just change the name from your name to another persons name. |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 04:42 PM |
| my title is wrong, YOU muy ######## |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
| |
|
|
| 24 May 2017 04:47 PM |
local names = {} names.iiNemo = true print(names.iiNemo) names.iiNemo = nil print(names.iiNemo)
|
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 04:50 PM |
| when u have no idea how to script like me ^ |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 04:50 PM |
| How would I insert another player's name into the table or whatever then? |
|
|
| Report Abuse |
|
|
| |
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
| |
|
|
| 24 May 2017 04:54 PM |
are u stupid what i said works, ur just a complete idiot |
|
|
| Report Abuse |
|
|
|
| 24 May 2017 04:56 PM |
and even more proof
local list = {} local person = "iiNemo"
if list[person] then print("they are in the list") else print("they are not in the list") end
list[person] = true
if list[person] then print("they are in the list") else print("they are not in the list") end |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 05:21 PM |
if list[person] then doesn't wurrkk |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 24 May 2017 05:23 PM |
THEN THEY AREN'T IN THE LIST :)))))))))))))))))
|
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 05:28 PM |
if g[v.Name] then table.remove(PlayersParticipating, v.Name) end if not n[v.Name] then table.insert(AfkPlayers, v.Name) end else if not g[v.Name] then table.insert(PlayersParticipating, v.Name) end if not n[v.Name] then table.remove(AfkPlayers, v.Name) end mah script |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 05:29 PM |
if g[v.Name] then table.remove(PlayersParticipating, v.Name) end if not n[v.Name] then table.insert(AfkPlayers, v.Name) end else if not g[v.Name] then table.insert(PlayersParticipating, v.Name) end if n[v.Name] then table.remove(AfkPlayers, v.Name) end |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 24 May 2017 05:29 PM |
table.remove(tab,index) removes index from tab. Not value from tab.
|
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 05:33 PM |
| Not value from tab.. Could u be a bit more specific I don't understand spanish |
|
|
| Report Abuse |
|
|
|
| 24 May 2017 05:36 PM |
kid
u dont use table.insert NOR table.remove
to add a name
list[name] = true
to remove a name
list[name] = nil |
|
|
| Report Abuse |
|
|
|
| 24 May 2017 05:37 PM |
and to go through the names
for name in next,list do print(name) end |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 24 May 2017 05:54 PM |
| spawn(function() while wait() do print(#PlayersParticipating) for i, v in pairs (game.Players:GetChildren()) do for # ## next, PlayersParticipating do for n in next, AfkPlayers do if v.Afk.Value == true then if g[v.Name] then PlayersParticipating[v.Name] = nil end if not n[v.Name] then AfkPlayers[v.Name] = true end else if not g[v.Name] then PlayersParticipating[v.Name] = true end if not n[v.Name] then AfkPlayers[v.Name] = nil end end end end end end end) dusent wurk |
|
|
| Report Abuse |
|
|
|
| 24 May 2017 06:04 PM |
| what in the world r u trying to do |
|
|
| Report Abuse |
|
|