|
| 04 Oct 2012 06:38 PM |
I'm thinking I did something wrong with the table.insert, any Help?
-----------------------
admins = {"thecaptain97"} banned = {"Noob"}
function checkBan(p) for i = 1,#banned do if (banned[i]==p.Name) then return true end end return false end
function checkAdmin(p) for w = 1,#admins do if (admins[w]==p.Name) then return true end end return false end
game.Players.PlayerAdded:connect(function(ply) if (checkBan(ply)==true) then repeat wait() until ply.PlayerGui script.Crash:clone().Parent = ply.PlayerGui elseif (checkAdmin(ply)==true) then ply.Chatted:connect(function(msg) if (string.sub(msg,1,4):lower()=="ban/") then if (game.Players:findFirstChild(string.sub(msg,5))) then bandude = game.Players[string.sub(msg,5)] table.insert(banned,bandude.Name,#banned+1)--AROUND HERE repeat wait() until ply.PlayerGui script.Crash:clone().Parent = ply.PlayerGui end end end) end end)
|
|
|
| Report Abuse |
|
|
| 04 Oct 2012 06:41 PM |
table.insert(banned,#banned+1,bandude.Name)
¤ ¤ † K M X D † ¤ ¤
|
|
|
| Report Abuse |
|
|
| 04 Oct 2012 06:42 PM |
| Thanks knightmare, I knew I did something Wrong There, since I rarely use table.insert |
|
|
| Report Abuse |
|
|
| 04 Oct 2012 06:45 PM |
No problem.
¤ ¤ † K M X D † ¤ ¤ |
|
|
| Report Abuse |
|