|
| 17 May 2014 01:57 PM |
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(chat) if string.sub(chat, 1, 4) == "msg/" and if player.Name = {"SuperSonic1350","SuperSonic1350Alt","ILoveTrainSim2006"} then addMessage(player.Name, string.sub(chat, 5)) end end) end)
Its suppposed to detect if me, or my other alts had said "msg/". The problem is it doesnt work if i try "and". |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 01:58 PM |
| Tired, so explanation is not good :\ |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 17 May 2014 01:59 PM |
| if player.Name = "SuperSonic1350" or "SuperSonic1350Alt" or "ILoveTrainSim2006" then |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 02:00 PM |
@youssef Tried that already and red underline |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 May 2014 02:01 PM |
local youAndYourOtherAlternateAccounts = {SuperSonic1350 = true, SuperSonic1350Alt = true, ILoveTrainSim2006 = true}; game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(chat) if string.sub(chat, 1, 4) == "msg/" and if youAndYourOtherAlternateAccounts[player.Name] then addMessage(player.Name, string.sub(chat, 5)) end end end) end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 May 2014 02:08 PM |
| what line is the red underline on? |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 02:08 PM |
| if youAndYourOtherAlternateAccounts[player.Name] then |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 May 2014 02:13 PM |
| if string.sub(chat, 1, 4) == "msg/" then |
|
|
| Report Abuse |
|
|