Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Having a problem with tables..?

Asked by 10 years ago

So, i have a table with a bunch of players names and i have a little Admin type script i made. How would i make it so that if one of the players in my table of admins chats it does it?

if Player.Name == admins[]

what do i put in the []?

1 answer

Log in to vote
1
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
10 years ago

Instead of having a table of strings, have a table of values set to true, then check if admins[Player.Name] exists.

admins={["1waffle1"]=true,["starkiller523"]=true}
...
if admins[Player.Name]then
...
Ad

Answer this question